/*************Global functions for hosting******************/ //Function to enumerate all windows. int CALLBACK EnumWindowsProc(HWND hwnd, LPARAM param) { DWORD pID; DWORD TpID = GetWindowThreadProcessId(hwnd, &pID);//get process id if (TpID == (DWORD)param) { apphwnd=hwnd;//hwnd is the window handle return false; } return true; }
//Functio to start a orocess and return the process handle HANDLE StartProcess(LPCTSTR program, LPCTSTR args) {