I have incomplete types from my COM type library .tlb
(which was generated by regasm
OF .NET v4+
) I am unsure if this is because cppc.exe
derived the wrong header for it or if this is merely a symptom of it.
I know it's incomplete because all the generated classes come out a. as struct
s and b. with empty interface bodies (no methods defined).
I'm sure I've done something wrong when making my .dll suitable for regasm; I've changed the Assembly-Info and I've made default constructors for-all types. Was I meant to do something else maybe?
If you mark your assembly as COM-visible, all public classes with a default constructor are exposed with the help of a
dispinterface
. This interface type is designed for late bound clients, such as scripting languages, which invoke methods and properties via Dispatch identifiers (DISPIDs). An accompanying type library won't contain any entries for the interface.In order to bind to a fixed layout, you’ll need to switch to a
dual
orIUnknown
interface. Simply edit yourAssemblyInfo.cs
as follows:Now, the methods of the interface are visible in the type library, as well as in IntelliSense.
Note however that with an
AutoDual
exposed class, you'll need to need to take care when updating the assembly. See this link for further info.