anuxs's Blog

.net blog

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

http://www.pinvoke.net/

PINVOKE.NET attempts to address the difficulty of calling Win32 or other unmanaged APIs in managed code (languages such as C# and VB .NET). Manually defining and using PInvoke signatures (also known as Declare statements in VB) is an error-prone process that can introduce extremely subtle bugs. The rules are complex, and if you make a mistake, you’ll probably corrupt memory.

以后就不用羡慕c++可以直接调用win32api了。c#里面一样可以调用,一样的方便。几乎所有的微软sdk的C#声明在pinvoke.net里面。爽啊。

今天用NetMessageBufferSend写了一个发消息的小东东玩了玩。以前都是在cmd.exe里面用手发送的,同事用VC写了一GUI的工具,我操起c#也搞了一个。简单啊。。。。

posted on 2004-05-16 02:47  anuxs  阅读(3680)  评论(3编辑  收藏  举报