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

编程入门 行业动态 更新时间:2024-10-27 16:23:37
本文介绍了访问Windows API的常量和结构的的P / Invoke的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

快速的问题:我如何可以访问从.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

本文发布于:2023-06-10 16:30:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/615058.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:常量   结构   Windows   API   Invoke

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!