CF2.0: deploying my COM DLL to the emulator under VS2005

S

Smith

Hi,

I've got a VS2005 Beta1 ATL DLL project and created an interop assembly with
tlbimp. I have another project, Smartphone 2003 SE that I test with the
Smartphone 2003 SE Legacy emulator (the other Smartphone emulator doesn't
work, I have a deployment issue).
I have referenced the interop assembly from the .NET application but I
suspect the actual underlying COM DLL doesn't get deployed when hitting F5
to start debugging.

Can you help deploying this DLL and register it in the emulator space? I've
got absolutely no clue about what I should do.

Thanks.
 
A

Alex Feinman [MVP]

Simply right-click on your ATL project in the solution explorer and select
Deploy. This will register it as well.
 
S

Smith

I am using Beta1.

The ATL project and the .NET are located in two different solutions (see
below why).

When I right-click on the ATL Project in the first solution and select
Deploy, the emulator is launched but I get a deployment error "%1 is not a
valid Win32 application". Furthermore, I suspect the new Smartphone 2003 SE
emulator is launched, not the Legacy one.

With the other solution and .NET project, I've got to deploy using the
Legacy Smartphone 2003 SE project otherwise I get the same of deployment
issues.

Looks like there is an emulator version (legacy or non-legacy) mismatch and
Visual Studio is getting confused when both my ATL SmartDevice DLL project
and my .NET C# project reside in the same solution, sometimes launching both
emulators concurrently.

You can reproduce the problems I describe by doing the following:

- create an ATL SmartDevice project (DLL) supporting both PocketPC 2003 and
SmartPhone 2003, then add an ATL freethreaded SimpleObject.
- build it then deploy it. First, you won't have the choice whether to use
the legacy or new emulator and then you'll end up with the "%1 is not a
valid Win32 application" issue.

When building a SmartPhone 2003 SE .NET application, if you deploy it to the
new (non-legacy) emulator, you'll also end up with deployment issues.

I was also unable to build a proxy/stub library for the ATL project, merging
it or not in the main DLL. I got compilation errors talking about
PROXYFILE_FIRST_START or something like that. But this is another subject (I
use automation-compliant interfaces now anyway so this is irrevelant).

Apparently Beta1 has serious problems with emulators and C++.

Any idea about whether Beta2 addresses these problems?

Thanks for your help.
 
A

Alex Feinman [MVP]

I understand that I can reproduce this, but Beta 1 had so many issues with
smart device projects, that now with beta 2 availability (it's already on
MSDN) you would be much better of by switching to it.
 
S

Smith

Thanks Alex for your quick answer.
Beta2 is being downloaded at the moment. I'll report back as soon as I get
it running.
 
P

Peter Foot [MVP]

Smartphone 2003 projects in VS2005 are .NETCF v1.0 - v2.0 is not available
for current Smartphone devices. As .NETCF v1.0 doesn't support COM interop
you can't use an assembly generated by tlbimp in a Smartphone 2003 .NET
project. The only workaround is to create a native code wrapper around the
com object in C++ to flatten the calls, then P/Invoke this from your .NETCF
v1.0 application.

Peter
 
S

Smith

I am seriously confused now.

With Beta1 it looks like all embedded Visual C# projects are CF 1.0 projects
regardless of the platform you target at project creation time: Smartphone
2003, PocketPC 2003, or Windows CE. Well, I draw this conclusion since I am
unable to access System.Collection.Generics.Collection through IntelliSense.

Something however I don't follow is that CF 2.0 _is_ shipped with Beta1 in
"C:\Program Files\Microsoft Visual Studio
8\SDK\v2.0\CompactFramework\WindowsCE". Furthermore it seems to be deployed
when I run the Smartphone 2003 application.

Could you please shed some light at least on what is planned to be supported
with VS 2005 and CF 2.0? PocketPC 2003 platform only?

I'm lost.
 
P

Peter Foot [MVP]

..NETCF v2.0 will only be supported on Pocket PC 2003, Windows CE 5.0 and
future Windows Mobile and Windows CE devices.
It's been a while since I used Beta1 (Beta2 is available now), but the
current state is that Smartphone 2003 projects are v1.0 only, Pocket PC 2003
supports both v1.0 and v2.0.
There are a number of classes in the System.Collections.Generic namespaces
in .NETCF v2.0 but there is no System.Collections.Generic.Collection class.

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://www.peterfoot.net |
http://www.opennetcf.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top