快速的问题:我如何可以访问从.NET中的Win32 API定义的BN_CLICKED常量和其他的常量?他们是否在某些库中定义?我一定要定义他们自己?如果是这样,我在哪里可以找到这些值?并且是值特定版本的Windows版本之间?
Quick question: How can I access the BN_CLICKED constant and other constants defined for the Win32 API from .NET? Are they defined in some library? Do I have to define them myself? If so, where can I find these values? And are the values version-specific between versions of Windows?
推荐答案我找到的PInvoke互操作助理是很有益的: blogs.microsoft.co.il/blogs/sasha/archive/2008/01/12/p-invoke-signature-generator.aspx.
I find the PInvoke Interop Assistant to be really helpful: blogs.microsoft.co.il/blogs/sasha/archive/2008/01/12/p-invoke-signature-generator.aspx.
它拥有几乎一切,可转换C ++到C#/ VB为您服务。我很少,如果有的话,求助于谷歌搜索/ pinvoke了。
It has almost everything and can convert the C++ to C#/VB for you. I rarely, if ever, resort to searching google/pinvoke anymore.
下面是MSDN杂志文章:msdn.microsoft/en-us/magazine/cc164193.aspx
Here's the MSDN Magazine Article: msdn.microsoft/en-us/magazine/cc164193.aspx
和这里的下载:download.microsoft/download/f/2/7/f279e71e-efb0-4155-873d-5554a0608523/CLRInsideOut2008_01.exe
更多推荐
访问Windows API的常量和结构的的P / Invoke
发布评论