Passing a .Net Class as a parameter through 1 or 2 levels of COM objects

B

Brian

This question is the same issue as my last post, but has been simplified
somewhat as the question was unclear.



If I had a .NET program that was equivalent to a VB6 ActiveX DLL with 2
Class Module's, is it possible to pass one of these classes as a parameter
to an early bound COM object and how would this be done.



The object is passed to VBScript via the Windows scripting host (COM) . This
is then passed to a late bound COM object via the VB script which would use
the .Nets object's methods in the late bound COM object as if it were the
original COM component.
 
C

CJ Taylor

The class would have to be common to both of them. In this case, you would
have to create an instance of the class as it is defined in COM since COM
doesn't know anything about its attaching .NET class, however, .NET knows
about the COM object, so for them to be early bound and communicate with a
common class, then the common class to be used as a paramter has to be
defined in the COM object.

HTH,
CJ
 

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