如何从.NET平台上用C#调用Win32 API

如题所述

第1个回答  推荐于2016-03-17
引入using System.Runtime.InteropServices;
引入api函数的格式(以引入 FindWindow为例,使用和成员函数一样使用)
[DllImport("user32.dll", EntryPoint = "FindWindow")]
public static extern int FindWindow(
string lpClassName,
string lpWindowName
);
具体api函数列表 你可以找一个win32api的chm查看

类似这样本回答被提问者和网友采纳
第2个回答  2014-11-14
 [System.Runtime.InteropServices.DllImport("win32.dll")]

第3个回答  2014-11-14
问题太笼统,请补充说明
相似回答