阿杰 发表于 2016-10-19 06:32:47

【C#】C#调用API 及使用例子

using System.Text;
using System.Runtime.InteropServices;
public class api
{
   
    public static extern int MsgBox(int hWnd, String text, String caption, uint type);

   
    public static extern int GetShortPathName(string path, StringBuilder shortPath, int shortPathLength);
}

调用:api.MsgBox(0, "a", "b", 64);

Tesla.Angela 发表于 2016-11-12 09:11:24

有点像VB.NET
页: [1]
查看完整版本: 【C#】C#调用API 及使用例子