请问如何从窗口handle得到进程handle
我用GetForegroundWindow得到当前窗口的handle,请问怎么得到它的进程 问题点数:0、回复次数:2Top
1 楼akiko(弥弥)回复于 2003-11-02 20:11:19 得分 0
GetWindowThreadProcessId
OpenProcessTop
2 楼dzqsuper(数风流人物-还看打倒日本猪的人(抵制日货))回复于 2003-11-02 20:48:07 得分 0
DWORD GetWindowThreadProcessId(
HWND hWnd, // handle to window
LPDWORD lpdwProcessId // address of variable for process identifier
);
Parameters
hWnd
Handle to the window.
lpdwProcessId
Pointer to a 32-bit value that receives the process identifier. If this parameter is not NULL, GetWindowThreadProcessId copies the identifier of the process to the 32-bit value; otherwise, it does not.
Top




