From 7b2f41b2571dbc15abb77b5462b14473eabafcb2 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Mon, 11 May 2015 14:23:10 +0000 Subject: minus CreateThread git-svn-id: http://svn.miranda-ng.org/main/trunk@13532 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AvatarHistory/src/AvatarDlg.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'plugins/AvatarHistory') diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp index 2fc20eeaa1..1ddb14c113 100644 --- a/plugins/AvatarHistory/src/AvatarDlg.cpp +++ b/plugins/AvatarHistory/src/AvatarDlg.cpp @@ -21,7 +21,7 @@ Avatar History Plugin #include "stdafx.h" HGENMENU hMenu = NULL; -DWORD WINAPI AvatarDialogThread(LPVOID param); +void __cdecl AvatarDialogThread(void *param); static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam); int ShowSaveDialog(HWND hwnd, TCHAR* fn,MCONTACT hContact = NULL); @@ -75,7 +75,6 @@ int OpenAvatarDialog(MCONTACT hContact, char* fn) return 0; } - DWORD dwId; struct AvatarDialogData *avdlg = (struct AvatarDialogData*)malloc(sizeof(struct AvatarDialogData)); memset(avdlg, 0, sizeof(struct AvatarDialogData)); avdlg->hContact = hContact; @@ -88,15 +87,14 @@ int OpenAvatarDialog(MCONTACT hContact, char* fn) MultiByteToWideChar(CP_ACP, 0, fn, -1, avdlg->fn, SIZEOF(avdlg->fn)); } - CloseHandle(CreateThread(NULL, 0, AvatarDialogThread, (LPVOID)avdlg, 0, &dwId)); + CloseHandle(mir_forkthread(AvatarDialogThread, (void*)avdlg)); return 0; } -DWORD WINAPI AvatarDialogThread(LPVOID param) +void __cdecl AvatarDialogThread(void *param) { struct AvatarDialogData* data = (struct AvatarDialogData*)param; DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_AVATARDLG), data->parent, AvatarDlgProc, (LPARAM)param); - return 0; } void EnableDisableControls(HWND hwnd) -- cgit v1.2.3