关闭

学习笔记1

110人阅读 评论(0) 收藏 举报
分类:

获取窗口句柄:

HWND FindWindow(
  LPCTSTR lpClassName,  // pointer to class name
  LPCTSTR lpWindowName  // pointer to window name
);

获取窗口信息:

BOOL GetWindowRect(
  HWND hWnd,      // handle to window
  LPRECT lpRect   // address of structure for window coordinates
);

设置鼠标位置:

BOOL SetCursorPos(
  int X,  // horizontal position
  int Y   // vertical position
);

获取鼠标位置:

BOOL GetCursorPos(
  LPPOINT lpPoint   // address of structure for cursor position
);

鼠标事件:

VOID mouse_event(
  DWORD dwFlags, // flags specifying various motion/click variants
  DWORD dx,      // horizontal mouse position or position change
  DWORD dy,      // vertical mouse position or position change
  DWORD dwData,  // amount of wheel movement
  DWORD dwExtraInfo 
                 // 32 bits of application-defined information
);

根据窗口句柄获取进程ID:

DWORD GetWindowThreadProcessId(
  HWND hWnd,             // handle to window
  LPDWORD lpdwProcessId  // address of variable for process identifier
);

打开一个进程:

HANDLE OpenProcess(
  DWORD dwDesiredAccess,  // access flag
  BOOL bInheritHandle,    // handle inheritance flag
  DWORD dwProcessId       // process identifier
);


读取进程指定地址内存:

BOOL ReadProcessMemory(
  HANDLE hProcess,  // handle to the process whose memory is read
  LPCVOID lpBaseAddress,
                    // address to start reading
  LPVOID lpBuffer,  // address of buffer to place read data
  DWORD nSize,      // number of bytes to read
  LPDWORD lpNumberOfBytesRead 
                    // address of number of bytes read
);

话说ReadProcessMemory对于现在连变量类型都搞不清楚的我实在是太难了。

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:228次
    • 积分:22
    • 等级:
    • 排名:千里之外
    • 原创:2篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条
    文章分类
    文章存档
    阅读排行
    评论排行