C# Win32API类
class Win32API
{
[DllImport("User32.dll")] //User32.dll是Windows操作系统的核心动态库之一
public static extern int FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32", EntryPoint = "RegisterWindowMessage")]
public static extern int RegisterWindowMessage(
string lpString
);
[DllImport("user32", EntryPoint = "SendMessage")]
public static extern int SendMessage(
int hwnd,
int wMsg,
int wParam,
ref int lParam
);
[DllImport("OLEACC.DLL", EntryPoint = "ObjectFromLresult")]
public static extern int ObjectFromLresult(
int lResult,
ref System.Guid riid,
int wParam,
[System.Runtime.InteropServices.MarshalAs(UnmanagedType.Inte易做图ce), System.Runtime.InteropServices.In, System.Runtime.InteropServices.Out]ref System.Object ppvObject
//注意这个函数ObjectFromLresult的声明.
);
}
摘自 Bychentufeiyang的专栏
补充:软件开发 , C# ,