X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b0c89ddf397e8b240839b09d27ea8d683ba9c880..d21d2e5adf7a5acf3b496a9c4e87eab220bd75d8:/src/msw/utilsexc.cpp?ds=inline diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index 628d647ac2..8fcae76c3c 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -45,7 +45,7 @@ #include -#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__) +#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__) && !defined(__WXMICROWIN__) #include #ifndef __MWERKS__ #include @@ -57,7 +57,7 @@ #include #endif -#if defined(__WIN32__) && !defined(__WXWINE__) +#if defined(__WIN32__) && !defined(__WXWINE__) && !defined(__WXMICROWIN__) #include #ifndef __GNUWIN32__ @@ -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);