下面代码是什么意思啊????????
[DllImport("user32.dll", EntryPoint = "FindWindowA")]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", EntryPoint = "PostMessageA")]
public static extern bool PostMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
[DllImport("user32.dll", EntryPoint = "GetWindowThreadProcessId")]
public static extern int GetWindowThreadProcessId(IntPtr hWnd, out int lpdwProcessId);
[DllImport("kernel32.dll", EntryPoint = "OpenProcess")]
public static extern IntPtr OpenProcess(int dwDesiredAccess, bool bInheritHandle, int dwProcessId);
[DllImport("kernel32.dll", EntryPoint = "CloseHandle")]
public static extern bool CloseHandle(IntPtr hObject);
[DllImport("kernel32.dll", EntryPoint = "ReadProcessMemory")]
public static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, int nSize, IntPtr lpNumberOfBytesRead);
public const int WM_LBUTTONDOWN = 513;
public const int WM_LBUTTONUP = 514;
public const int STANDARD_RIGHTS_REQUIRED = 983040;
public const int SYNCHRONIZE = 1048576; --------------------编程问答-------------------- DllImport,引用非托管dll,最后面是定一些消息 --------------------编程问答--------------------
MSDN上有它们的用途和用法 --------------------编程问答--------------------
参考DllImport的用法
http://blog.csdn.net/jame_peng/article/details/4387906
--------------------编程问答-------------------- 我想引用下面这个函数应该怎么写
HHOOK SetWindowsHookEx(
int idHook, // type of hook to install
HOOKPROC lpfn, // address of hook procedure
HINSTANCE hMod, // handle of application instance
DWORD dwThreadId // identity of thread to install hook for
); --------------------编程问答-------------------- ??????急啊
--------------------编程问答-------------------- 导入Windows库,调用系统API --------------------编程问答-------------------- [DllImport("XXX.dll")]//XXX是dll文件的名字
public static extern HHOOK SetWindowsHookEx(int idHook, HOOKPROC lpfn, HINSTANCE hMod, DWORD dwThreadId);
--------------------编程问答--------------------
那个dll --------------------编程问答--------------------
按照上面写的
HHOOK缺少using指令或程序集应用
补充:.NET技术 , C#