Question

I want to get the types and details in a plain Win32.dll just like we can in a COM. In COM, everything embed inside idl results in TLB, MSFT exposes APIS in which we can extract types.

I need the types defined in the Win32 and all of the details on that type (e.g. members and its types). Parsing a PE file and looking up exported tables only gives the exported functions, I want all custom types (Win32 interfaces, classes and member details with types) defined in it.

Was it helpful?

Solution

Try first whether pinvoke.net has the definitions for Win32 API in question. If so, copy & paste to your source code. If not available, you can use the existing defitions and MSDN documentation and SDK header files to hand-craft the correct method signatures and data structures.

Another option is to introduce C++ CLI that can create a mixed native-CLR asembly. The CLI project can use the Win32 API just like a native C++ project and reveal a higher level .Net interface for your other assemblies.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top