X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/04ef50df3a0fa3c343800c554e609f98fc7575cc..1483041dab88f43563c26405c1e2a41d6babe6a0:/src/msw/utilsexc.cpp diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index e63bb93ba0..8fcae76c3c 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -259,8 +259,10 @@ size_t wxPipeOutputStream::OnSysWrite(const void *buffer, size_t len) #ifdef __WIN32__ -static DWORD wxExecuteThread(wxExecuteData *data) +static DWORD __stdcall wxExecuteThread(void *arg) { + wxExecuteData *data = (wxExecuteData*)arg; + WaitForSingleObject(data->hProcess, INFINITE); // get the exit code @@ -646,7 +648,7 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) DWORD tid; HANDLE hThread = ::CreateThread(NULL, 0, - (LPTHREAD_START_ROUTINE)wxExecuteThread, + wxExecuteThread, (void *)data, 0, &tid);