ActiveX Question Revisited

J

James Pannozzi

I have a C++ App which currently uses #import to access some ActiveX DLL's
provided to me from some companies.

These desktop ActiveX apps typically have a GUI with a VB form in which the
desktop
user inputs some values and gets back some computed value(s).

Details of the interface and documentation as well as special ActiveX DLL's
(with the GUI part
removed) are provided to me by said companies. All works well.

But...

One of our competitors, apparently using .NET has set up a website which
seems to be interfacing to these same desktop Active-X apps
(apparently set up on the website server)
from several of these companies - WITHOUT any documentation, interface
documentation
or specially built DLL's.

Forgetting about C++ for the moment, how is this done?

Are there tools in .NET which can deduce the interface (functions, pass
parameters etc.) of an Active X DLL app,
and then build an interface in which the .NET app can interact with the
ActiveX app just as though the data were
being input through the VB form fields rather than from the .NET app?

Or have they somehow reverse engineered the ActiveX apps?

Thanks
Jim
 
J

James Pannozzi

Thanks for links and info.

Time to start studying !

Jim

Aaron Hare said:
Hi James.

Yes, there are some good tools for importing COM/ActiveX type libraries
into managed assemblies. The first thing you'll probably want to look at is
the tlbimp tool
(http://msdn.microsoft.com/library/en-us/cptools/html/cpgrftypelibraryimport
ertlbimpexe.asp). Tlbimp lets you create a managed wrapper (sometimes
called an "interop assembly" or "runtime callable wrapper") around a COM
object that you can reference from managed code.
Also, if the ActiveX components you are using are publicly available, you
might want to find out if the vendor has a PIA (Primary Interop Assembly)
available for them. Using the PIA instead of using tlbimp has numerous
advantages, as discussed at
http://msdn.microsoft.com/library/en-us/dndotnet/html/whypriinterop.asp.
Finally, if you're planning to do a lot of managed/unmanaged interop, you
might want to check out ".NET and COM the Complete Interoperability Guide"
by Adam Nathan. The book covers almost every aspect of interop in depth.
 

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