As this is Interop between the managed and unmanaged worlds this is not entirely straight forward. There are a number of steps you'd need to follow to achieve this.
First up create your component in C# and register it to the Global Assembly Cache using the gacutil command line tool
Next define a COM Interface for the component, register this also.
Next create a COM Adapter for the component which implements the COM Interface.
Implement the COM Interface in your component.
Deploy the COM Adapter by regsitering to the GAC and generating a COM type library using the regasm command line tool.
Finally add the reference to the COM Adapter in your VB6 project.
There is a fair bit of documentation on this but havign only done this in training exercises rather than real world development I can't provide much more than theory.
Hope this gets you started though...
Rob
Go placidly amidst the noise and haste, and remember what peace there may be in silence - Erhmann 1927
I have attempted to create a C# class that exposes a couple of public members to a COM client. Although the VB6 client can call the methods and properties of the .NET server and the code executes properly, there is no intellisense in VB 6 for the class (making it difficult to use).
I have tried to use regasm with the tlb option and tlbexp. Is there something else?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.