I have a very old (VC++ 5.0) proprietary DLL which I need to use from C# (Visual Studio 2010). The example specifies that to access this component I need to call CreateDispatch("application")
which indicates towards OLE.
The following is the example code (C++):
IComponentServer Server;
Server.CreateDispatch("Component.Server");
I added a Reference through Visual Studio to the TLB file I have, and I can import its namespace successfully, but IComponentServer
does not have any method called CreateDispatch
.
What is the right approach to create the instance of an OLE component through C#?