Ecore_Exe: fix warning on Windows

Summary: ExitProcess() has not the signature expected by CreateRemoteThread()

Test Plan: compilation

Reviewers: raster, zmike, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8870
This commit is contained in:
Vincent Torri 2019-05-09 14:09:08 -04:00 committed by Mike Blumenkrantz
parent 524139a16f
commit 84e6fabbb3
1 changed files with 12 additions and 1 deletions

View File

@ -260,6 +260,15 @@ _ecore_exe_thread_procedure(LPVOID data EINA_UNUSED)
return 1;
}
static DWORD __stdcall
_ecore_exe_exit_process(void *data)
{
UINT *code;
code = (UINT *)data;
ExitProcess(*code);
return 1;
}
static BOOL CALLBACK
_ecore_exe_enum_windows_procedure(HWND window,
LPARAM data)
@ -267,6 +276,7 @@ _ecore_exe_enum_windows_procedure(HWND window,
Ecore_Exe *obj = (Ecore_Exe *) data;
Ecore_Exe_Data *exe = efl_data_scope_get(obj, ECORE_EXE_CLASS);
DWORD thread_id;
UINT code = 0;
if (!exe) return EINA_FALSE;
thread_id = GetWindowThreadProcessId(window, NULL);
@ -295,7 +305,8 @@ _ecore_exe_enum_windows_procedure(HWND window,
/* Exit process */
if (CreateRemoteThread(exe->process, NULL, 0,
(LPTHREAD_START_ROUTINE)ExitProcess, NULL,
(LPTHREAD_START_ROUTINE)_ecore_exe_exit_process,
&code,
0, NULL))
return EINA_FALSE;