I have a VB6 Standard EXE with no embedded type library. I'd like to generate an interop assembly from that executable and reference it from a .NET project. This should allow me to instantiate COM classes defined in the executable from .NET.
Since I don't have a type library, I tried creating the IDL from scratch, used MIDL to generate a typelib, and generated an interop assembly from the typelib. I can reference the interop assembly from my .NET project, but still can't instantiate any COM classes. I believe my interop assembly doesn't know about the EXE and therefore can't actually execute the code I call.
I've already successfully instantiated COM classes defined in VB6 ActiveX DLLs from .NET, where the interop assemblies know the ClassID of the corresponding COM DLLs containing the implementation.
In the IDL I'm creating from scratch, what should I be using as the UUID for the library definition? Should this refer to the EXE somehow?
[
uuid(WHATUUID-SHOU-LDII-NCLU-DEHEREXXXXXX),
version(1.0),
helpstring("for TLB on EXE")
]
library MyExe { ... }
These questions are close, but I'm still stuck. Is what I'm trying to do possible? I'd rather avoid late-binding. Thanks for any help.