How to Call Windows API [duplicate]

两盒软妹~` 提交于 2019-12-18 04:45:14

问题


Possible Duplicate:
Windows API and .net languages

I want to call native Windows API from .NET Framework. I want to have an easy way where I can call native API from high-level layer like other .NET APIs. Please refer to any resource which you know. Any help will be appreciated.


回答1:


You can use PInvoke in order to call Windows API functions.

There is also PInvoke Interop Assistant which generates a PInvoke signature of a function if you provide its Win32 signature.




回答2:


You can call unmanaged DLL's and other functions from the WinAPI using P/Invoke in C#. This link documents how to use a lot of these functions.

http://pinvoke.net/



来源:https://stackoverflow.com/questions/9032769/how-to-call-windows-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!