CF2 SP1 COM Connection point Framework bug?

G

Guest

Hi,

I have a CF2 SP1 C# application running on WinCE 4.2 device built with the
latest release of Platform Builder that includes CF2 SP1.

I have imported some COM objects into my C# project in Visual Studio
2005(including the beta patch for CF2 SP1).

I am seeing 2 issues.

1. When I register for an event - any of 3 that I've tried(one without any
parameters on the event callback), The application will no longer shut down.
It appears to shut down but remains in the process viewer and all the C++ COM
dlls are locked as is the C# exe. Yes, I am un-registering for the event.
And... the callback method just returns - no code running on the C# side. It
is as if there is an AddRef happening on the callback that does not have a
corresponding Release. Oh, if I comment out the registration and
unregistration for the event, the app closes cleanly.

2. If I set a break point in the callback function or throw a message box
up in the callback function, Visual Studio crashes.

Am I fighting a problem in Visual Studio that will be fixed in the release
patch?
Is this a bug in CF2 SP1 for WinCE 4.2?
Is there a work around other than going back to wrapping the COM objects
with a C++ native dll and posting messages back to a MessageWindow class?

Thanks in advance,
-Kory
 
G

Guest

Ok, I have more information...

This boils down to a marshalling problem. When I try to insert the dispatch
pointer created by .NET that is sent into the advise method,
RegisterInterfaceInGlobal throws a bunch of first chance exceptions. If I
take the GIT out of the picture and just call back from the background
thread, it of course takes Visual Studio down the same way.

Any ideas on how to get around this without posting window messages from the
background thread?

Any hope of MS fixing this in CF2.0?
 

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