开发者

Getting Types in Win32 Dll

I want to ge开发者_StackOverflow中文版t 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜