【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);
有点像VB.NET
页:
[1]