X-Git-Url: http://git.osdn.net/view?p=dokopop%2Fdokopop.git;a=blobdiff_plain;f=DCHookTest%2FUtil.cpp;h=d2bb816d5c73280f2e9f0ca38caf12dce4af58b1;hp=15318ecb2a29a59ef074926edfafb6e90f374542;hb=724ae101fe9d1e128a65981925a9f8762e0c3c86;hpb=7ca0a6ddd604498cddd4e5cd8d856ffdf9784015 diff --git a/DCHookTest/Util.cpp b/DCHookTest/Util.cpp index 15318ec..d2bb816 100644 --- a/DCHookTest/Util.cpp +++ b/DCHookTest/Util.cpp @@ -424,8 +424,14 @@ bool _WinExec( const char *cmd, int show, int waittime, const char *dir) return false; bool ret = true; if ( waittime ){ +// DWORD startTime = GetTickCount(); int r = WaitForInputIdle( pi.hProcess, waittime ); ret = r==0; + if (!ret){ + dbw("CreateProcess: %d, 0x%X", r, GetLastError()); + } else { +// dbw("CreateProcess: %d", GetTickCount() - startTime); + } } CloseHandle( pi.hProcess ); return ret; @@ -491,11 +497,11 @@ bool LaunchAMODI() #else SW_HIDE; #endif - if (!_WinExec( AMODI_EXE_PATH, show, 500)) + if (!_WinExec( AMODI_EXE_PATH, show, 300)) return false; HWND hwnd = NULL; - for (int i=0;i<30;i++){ + for (int i=0;i<10;i++){ hwnd = FindAMODI(); if (hwnd) break;