Mike McCormack : msi:
Split process_action_return_value into two different functions.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Nov 22 05:21:16 CST 2006
Module: wine
Branch: master
Commit: 2a95a8ae781266e4cfc004dbb3498d24df07112b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2a95a8ae781266e4cfc004dbb3498d24df07112b
Author: Mike McCormack <mike at codeweavers.com>
Date: Wed Nov 22 17:04:42 2006 +0900
msi: Split process_action_return_value into two different functions.
---
dlls/msi/custom.c | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index 4358c81..2d8aced 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -336,21 +336,21 @@ static void file_running_action(MSIPACKA
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;
-
- if (type == 2)
- {
- GetExitCodeProcess(ThreadHandle,&rc);
-
- if (rc == 0)
- return ERROR_SUCCESS;
- else
- return ERROR_FUNCTION_FAILED;
- }
+ DWORD rc = 0;
- GetExitCodeThread(ThreadHandle,&rc);
+ GetExitCodeProcess( process, &rc );
+ if (rc != 0)
+ return ERROR_FUNCTION_FAILED;
+ return ERROR_SUCCESS;
+}
+
+static UINT custom_get_thread_return( HANDLE thread )
+{
+ DWORD rc = 0;
+
+ GetExitCodeThread( thread, &rc );
switch (rc)
{
@@ -385,16 +385,16 @@ static UINT process_handle(MSIPACKAGE* p
if (!(type & msidbCustomActionTypeContinue))
{
if (ProcessHandle)
- rc = process_action_return_value(2,ProcessHandle);
+ rc = custom_get_process_return(ProcessHandle);
else
- rc = process_action_return_value(1,ThreadHandle);
+ rc = custom_get_thread_return(ThreadHandle);
}
CloseHandle(ThreadHandle);
if (ProcessHandle)
CloseHandle(ProcessHandle);
}
- else
+ else
{
TRACE("Asynchronous Execution of action %s\n",debugstr_w(Name));
/* asynchronous */
More information about the wine-cvs
mailing list