calling COM functions from a .NET wrapper

R

rocio

I have a COM/ActiveX dll for an external application, that I would like to
use in my .NET CF app. It came with a dll wrapper so that it can be used
from CF.

The original COM is a control, with methods and events. I need to access
some of the events via the wrapper dll, but I do not know how. I'm using
VB.NET. I'm not even sure on how or what to search for in the web for
information about this.

Your help will be very appreciated.
 
C

Chris Tacke, eMVP

A flat wrapper can marshal data across the managed/unmanaged boundary, but
it can't marshal connection points. It's possible they convert them to
system events that you could catch and then call a method to get the event
data, but that sounds kludgey to me, so it's unlikely.

At any rate, contact the vendor and ask them if the wrapper supports
connection points in any way, and if so get a sample.
 
R

rocio

Tx. Chris.
Yes, I contacted the vendor and got a sample application in C#. But it
helped a lot.
atill declaring events in c# is different than in VB, I ended up using
AddHandler to define the events on the object that instantiates the wrapper
class.

-r
 

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