I have a very old (VC ++ 5.0) proprietary DLL that I need to use with C # (Visual Studio 2010). The example indicates that to access this component I need to call CreateDispatch("application")which points to OLE.
The following is sample code (C ++):
IComponentServer Server;
Server.CreateDispatch("Component.Server");
I added the link through Visual Studio to the TLB file that I have, and I can successfully import its namespace, but IComponentServerhas no method called CreateDispatch.
What is the right approach to instantiate an OLE component through C #?
source
share