Index: gui/win32/interface.c =================================================================== --- gui/win32/interface.c (版本 24910) +++ gui/win32/interface.c (工作副本) @@ -459,7 +459,7 @@ if(sub_window) ShowWindow(mygui->subwindow, SW_SHOW); } -static DWORD WINAPI GuiThread(void) +static unsigned __stdcall GuiThread(void* param) { MSG msg; @@ -486,12 +486,12 @@ void guiInit(void) { - DWORD threadId; + unsigned threadId; memset(&guiIntfStruct, 0, sizeof(guiIntfStruct)); /* Create The gui thread */ if (!mygui) { - CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) GuiThread, NULL, 0, &threadId); + _beginthreadex(NULL, 0, GuiThread, NULL, 0, &threadId); mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Creating GUI Thread 0x%04x\n", threadId); } @@ -508,7 +508,6 @@ fflush(stderr); mygui->uninit(mygui); free(mygui); - TerminateThread(GuiThread, 0); mygui = NULL; } /* Remove tray icon */