COM Interoperability in Compact framework.

P

Paranthaman M

Hello..

Can anyone tell me how to achieve the communication between COM object that
has callbacks and events and the C# object in .NET Compact framework 1.1 ?

Using P/Invoke, communication between managed and unmanaged code can be
achieved. (i.e, a call to the COM method can be made through win32 wrapper
DLL). But when the COM object has Connection points through which it
generates events and offers callback interfaces, how can the managed code
write sinks or event handlers for the COM events. How will the managed code
handle the callback interface ? In other words, is it possible to use the
message window class for this purpose and if so how ?

Regards,
Param.
 
D

Daniel Moth

I have not done COM Interop in the way you describe, but it sounds like at
some point in unmanaged code you want to notify and pass data to managed
code. You could use the MessageWindow or any other IPC mechanism:
http://www.danielmoth.com/Blog/2004/09/ipc-with-cf-on-ce-part-1.html

The fact that you are in the same process is irrelevant to the techniques
described; you are still trying to have one piece of code communicate to
another piece of code without the ability to make direct calls.

Cheers
Daniel
 

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