After a bit of labor everything now compiles without warning and deploys ok,
a dll and a test harness exe that uses the dll. But when I run the test.exe
program built in VS2005 I get "test.exe is not a valid Pocket PC
application". Which is exactly what I got using evc4.0 on a WM5 PDA device.
So I'm no better off.
I also used VS2005 to rebuilt a .Net C# test app which does a P/Invoke into
some standard "flat" (non-class) functions in my C++ dll. It now gets
"Can't find P/Invoke DLL", even though it's right there in the same
directory.
Note that all these mechanism work fine with PocketPC 2003, evc4.0, and
VS2003.
Anybody know what I might be doing wrong in trying to get unmanaged C++ code
to work on a WM5 device? It's getting fairly ridiculous how much time I've
spent on a simple porting task.
--
Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625
Did you find a solution to this, all my existing applications C# and
VB.Net that worked on VS2003 calling DLL functions now no longer work
on VS2005.
I get Can't find PInvoke DLL "-----"
John
The same thing is happening to me. I am compiling an unmanaged C++
application and initially I would get not a Pocket PC application
error, or I would get an error that said it could not run the
application because it either cannot find all of the components or it
is not signed with a trusted certificate.
Basically when I would compile it using evc 3.0 it would run, but
because so much has changed I needed to use some of the new APIs. I am
getting really frusterated with this whole WM 5.0 port too.
Matt
If that doesn't fix your issue try creating a new dll project. Then
put in all of the classes for the DLL and compile it. This is what I
needed to do to get this to work. One suggestion for this is to create
a simple application that calls something from the DLL. Then create a
simple DLL that just contains the object being called. When you get
this to work, then start bringing over the DLL classes.
This is what I did and my application runs(soft of). If you have any
questions, let me know and I will try to help out.
Matt
As for the thread this relates to (where I get the "trusted
cert...or...component not found"), I finally tracked that down to a stupid
error on my part. I had a .lib file like "x.lib", but due to some naming
shortcuts I took in creating it manually, internally it referenced "y.dll".
So it really was component-not-found after all. Once I built the .lib file
correctly I no longer go that error. Now I get the "Can't find error". I
can't make this go away in VS2005, and no one has said how to keep using
evc4.0 SP4 to build for WM5. So I'm still stuck.
--
Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625
<cla...@gmail.com> wrote in message
news:1132063099.8...@o13g2000cwo.googlegroups.com...
Also, I am not really sure how you could build something with the wrong
lib. Typically when I would do that I would get an error saying it was
unable to open the x.lib or whatever the lib was named.
Matt
The lib situation was that I linked with x.lib, which existed but internally
had references to y.dll. So at load time the system looked for y.dll which
didn't exist. The reason for the discrepancy was that I had created the
.lib manually from a "y.def" file using the LIB utility, creating a y.lib
file. But then I just renamed it to x.lib thinking that was ok, but it's
not - it still contains references to y.dll inside it from the original use
of lib.exe.
--
Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625
"Matt" <zimme...@hotmail.com> wrote in message
news:1132237111.8...@o13g2000cwo.googlegroups.com...
Matt
I am not really sure if you moved past this yet, but I may be able to
help. I think there was something wrong in the upgrade utility. If
you just create a new project and add all of your files to it and make
is similar to the old one, it should work. That is what I did and now
things are finally starting to work.
Matt
>I've been unable to get some unmanaged C++ code to work on WM5 with the
>evc4.0 compiler, so I bit the bullet and tried doing it with VS2005. I've
>been informed when you build C++ code for a Smart Device in VS2005 you get
>unmanaged code by definition, since you can't build managed C++ code for a
>Smart Device.
Are you targeting a Pocket PC or a Smartphone? Are you using MFC?
I'm just porting my programs to WM 5 for Pocket PC. I started with
apps built using eVC 3 and the Pocket PC SDK. Those executables
actually installed and ran. But I needed a few tweaks to get all the
controls placed properly in landscape mode and to eliminate the
extraneous vertical scrollbar. I now have executables that should run
on any Pocket PC from the original to WM 5. I'm using straight Win32.
>
>After a bit of labor everything now compiles without warning and deploys ok,
>a dll and a test harness exe that uses the dll. But when I run the test.exe
>program built in VS2005 I get "test.exe is not a valid Pocket PC
>application". Which is exactly what I got using evc4.0 on a WM5 PDA device.
>So I'm no better off.
Are you using the _proper_ Pocket PC menu functions (SHCreatemenu) or
the old Windows CE menu functions (CommandBar_Create)? And have you
included the extra menu structure (SHMENUBAR) in your resource script?
>I also used VS2005 to rebuilt a .Net C# test app which does a P/Invoke into
>some standard "flat" (non-class) functions in my C++ dll. It now gets
>"Can't find P/Invoke DLL", even though it's right there in the same
>directory.
I don't use any or these, so I can't help.
>
>Note that all these mechanism work fine with PocketPC 2003, evc4.0, and
>VS2003.
>
>Anybody know what I might be doing wrong in trying to get unmanaged C++ code
>to work on a WM5 device? It's getting fairly ridiculous how much time I've
>spent on a simple porting task.
-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).
Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com