访问Windows API的常量和结构的的P / Invoke常量、结构、Windows、API

由网友(点灭⊕百城)分享简介:快速的问题:我如何可以访问从.NET中的Win32 API定义的BN_CLICKED常量和其他的常量?他们是否在某些库中定义?我一定要定义他们自己?如果是这样,我在哪里可以找到这些值?并且是值特定版本的Windows版本之间?Quick question: How can I access the BN_CLICKE...

快速的问题:我如何可以访问从.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互操作助理是很有益的: http://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: http://blogs.microsoft.co.il/blogs/sasha/archive/2008/01/12/p-invoke-signature-generator.aspx.

它拥有几乎一切,可转换C ++到C#/ VB为您服务。我很少,如果有的话,求助于谷歌搜索/ pinvoke.net了。

It has almost everything and can convert the C++ to C#/VB for you. I rarely, if ever, resort to searching google/pinvoke.net anymore.

下面是MSDN杂志文章:http://msdn.microsoft.com/en-us/magazine/cc164193.aspx

Here's the MSDN Magazine Article: http://msdn.microsoft.com/en-us/magazine/cc164193.aspx

和这里的下载:http://download.microsoft.com/download/f/2/7/f279e71e-efb0-4155-873d-5554a0608523/CLRInsideOut2008_01.exe

阅读全文

相关推荐

最新文章