我使用GetProcessID不小心从应用程序中删除了Win2K兼容性.我这样使用它,以获取已启动应用程序的主要HWND。ShellExecuteEx(&info);//LaunchapplicationHANDLEhan=info.hProcess;//Getprocesscbinfo.han=han;//CallEnumWindowstoenumeratewindows....//withthisasthecallbackstaticBOOLCALLBACKenumproc(HWNDhwnd,LPARAMlParam){DWORDid;GetWIndowThreadProcessI