开发者

how to access defines and structs inside a .h from C#/.NET?

In accessing PDH.dll (a Win32 API) (see link) using P/Invoke, it turns out that I need access to sever开发者_如何转开发al constants and structs. I found these are defined inside a file PDH.h.

How do I access these defines and structs? Do I have to rewrite them with C#? Is there another way?


I think you have to rewrite them in C#


As already mentioned, you need to rewrite them in C#. But if you are lucky, someone will have already done them for you at PInvoke.net

Alternatively, you could try using the Interop Signature Toolkit, which can generate C# definitions from a C header file.


You have to rewrite them in C#.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜