更新时间:2022-04-25 00:50:18
您需要使用Interop来调用非托管代码.
You need to use Interop to call into unmanaged code.
using System.Runtime.InteropServices; // DllImport
public class Win32 {
[DllImport("User32.Dll")]
public static extern void SetWindowText(int h, String s);
}
这是一篇详细讨论该主题的文章(以及代码的来源).
Here is an article that discusses the topic in detail (also where the code is sourced from).
http://msdn中调用非托管DLL.microsoft.com/en-us/magazine/cc301501.aspx