Commit 2a95a8ae authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

msi: Split process_action_return_value into two different functions.

parent eb16fd51
...@@ -336,21 +336,21 @@ static void file_running_action(MSIPACKAGE* package, HANDLE Handle, ...@@ -336,21 +336,21 @@ static void file_running_action(MSIPACKAGE* package, HANDLE Handle,
list_add_tail( &package->RunningActions, &action->entry ); list_add_tail( &package->RunningActions, &action->entry );
} }
static UINT process_action_return_value(UINT type, HANDLE ThreadHandle) static UINT custom_get_process_return( HANDLE process )
{ {
DWORD rc=0; DWORD rc = 0;
if (type == 2)
{
GetExitCodeProcess(ThreadHandle,&rc);
if (rc == 0) GetExitCodeProcess( process, &rc );
return ERROR_SUCCESS; if (rc != 0)
else
return ERROR_FUNCTION_FAILED; return ERROR_FUNCTION_FAILED;
} return ERROR_SUCCESS;
}
static UINT custom_get_thread_return( HANDLE thread )
{
DWORD rc = 0;
GetExitCodeThread(ThreadHandle,&rc); GetExitCodeThread( thread, &rc );
switch (rc) switch (rc)
{ {
...@@ -385,9 +385,9 @@ static UINT process_handle(MSIPACKAGE* package, UINT type, ...@@ -385,9 +385,9 @@ static UINT process_handle(MSIPACKAGE* package, UINT type,
if (!(type & msidbCustomActionTypeContinue)) if (!(type & msidbCustomActionTypeContinue))
{ {
if (ProcessHandle) if (ProcessHandle)
rc = process_action_return_value(2,ProcessHandle); rc = custom_get_process_return(ProcessHandle);
else else
rc = process_action_return_value(1,ThreadHandle); rc = custom_get_thread_return(ThreadHandle);
} }
CloseHandle(ThreadHandle); CloseHandle(ThreadHandle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment