//
archives

LoadTypeLib

This tag is associated with 3 posts

Marshaling a SAFEARRAY of Managed Structures by P/Invoke Part 2.

1. Introduction. 1.1 In part 1 of this series of articles, I explained how managed arrays may be transferred to unmanaged code as a SAFEARRAY. 1.2 In part 1, the SAFEARRAY was passed to unmanaged code as an “in” (read-only) parameter. 1.3 Here in part 2, I shall continue the discussion this time with the aim of … Continue reading

How to Determine if a Type Library was Generated from a .NET assembly.

1. Introduction. 1.1 When a .NET assembly (DLL or EXE) that contains a COM-visible class is compiled and registered via REGASM.EXE, a type library will be generated. 1.2 A type library may also be generated directly via TLBEXP.EXE. 1.3 The fact that this type library was generated from a managed source can be detected. 1.4 … Continue reading

Using a VT_RECORD VARIANT in Managed Code Part 4

1. Introduction. 1.1 In part 3, I started to use the VariantStructGeneric structure to work with VT_RECORD VARIANTs in managed code. 1.2 We can see that the VariantStructGeneric structure completely replicates the unmanaged VARIANT structure and its use in managed code is intuitive for those who are familiar with VARIANTs. 1.3 In part 3, I demonstrated … Continue reading