[C#]直接调用Win32APIDLL.doc

[C#]直接调用Win32APIDLL.doc

[C#] 直接調用Win32 API DLL 若要宣告直接調用DLL方法,請按下列方法操作: 第一步: 引用System.Runtime.InteropServices using System.Runtime.InteropServices; 第二步: 直接從 C# 調用 DLL,使用 C# 關鍵字 static 和 extern 聲明方法。 使用DllImportAttribute 類別來使用API [DllImport(user32.dll)] //替換成所需的DLL檔 public static extern ReturnType FunctionName(type arg1,type arg2,...);//替換成所需的方法及參數 API查詢: 1.Windows API Reference for C#, VB.NET and VB6 /articles/Win32-API-DllImport-art9.asp 2.C# Windows API.rar 為了怕微軟又變更連結所以整個都給它Copy下來,以便不急之需 ============================================================================================================== Dll

文档评论(0)

1亿VIP精品文档

相关文档