简体   繁体   中英

How to export all methods in an unmanaged dll to managed c#?

I have a c++ dll with 10 methods and 12 properties, is there any way or any application to export the p/invoke format of the methods to be used in c# ? I have use OLE Viewer to inspect all the methods, for example :

[id(0x00000013)]
BSTR GetCPUID(
short BeginAddress,
short EndAddress);

but i dont know how to use this function in c#.

Probably this article may help you

http://www.codeproject.com/Articles/18032/How-to-Marshal-aC-Class

Let me know if this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM