CF to COM interaction

G

Guest

I've created a lightweight COM wrapper in eC++ that allows me to call out
from managed code to a COM object. However, the COM object in question
raises events at certain times, which I need to trap and access. I've
noticed that the Compact Framework offers the GuidAttribute / DispIDAttribute
/ COMVisibleAttribute features, while omitting most others that alloe managed
code to interact with COM. Seeing that that these features are there for a
reason, is there a way for me to expose managed code to a COM object using
the aforementioned COM interface attributes?

FYI - please don't refer me to v2.0 of the CF. I develop production systems
with non-beta products only (not to say that what I've engineered is oriented
to eventually use CF 2.0).

Thanks,

Jeff Potts.
 
P

Peter Foot [MVP]

This isn't possible with V1.0. You'll have to implement your interface to
handle the events in native code, and then have this signal your managed
code e.g. through a windows message, named event or similar.

Peter
 
G

Guest

I was afriad of that, but it never hurts to ask.

Next stupid question: if the DispIDAttibute, GuidAttibute, and
ComVisibleAttribute facilities are essentially useless (seeing that they
focused towards COM interaction), why were they included in CF v1.0 in the
first place?
 
G

Guest

Thanks for the help. It's not quite what I'm looking for, but I appreciate
the effort.

Once again, thanks.

Jeff Potts.

Sergey Bogdanov said:
I have written an example which integrates IE into CF1.0 application.
The example also demonstrates how to trap events from COM. I suppose it
could be useful for you:
http://www.sergeybogdanov.com/Samples/WebBrowserCE.zip

--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


Jeff said:
I've created a lightweight COM wrapper in eC++ that allows me to call out
from managed code to a COM object. However, the COM object in question
raises events at certain times, which I need to trap and access. I've
noticed that the Compact Framework offers the GuidAttribute / DispIDAttribute
/ COMVisibleAttribute features, while omitting most others that alloe managed
code to interact with COM. Seeing that that these features are there for a
reason, is there a way for me to expose managed code to a COM object using
the aforementioned COM interface attributes?

FYI - please don't refer me to v2.0 of the CF. I develop production systems
with non-beta products only (not to say that what I've engineered is oriented
to eventually use CF 2.0).

Thanks,

Jeff Potts.
 

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