Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1ed6bc2e
Commit
1ed6bc2e
authored
May 02, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
May 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Properly map script function return values to MSI errors.
parent
283db88d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
script.c
dlls/msi/script.c
+15
-4
No files found.
dlls/msi/script.c
View file @
1ed6bc2e
...
@@ -273,6 +273,20 @@ static HRESULT create_activescriptsite(MsiActiveScriptSite **obj)
...
@@ -273,6 +273,20 @@ static HRESULT create_activescriptsite(MsiActiveScriptSite **obj)
return
S_OK
;
return
S_OK
;
}
}
static
UINT
map_return_value
(
LONG
val
)
{
switch
(
val
)
{
case
0
:
case
IDOK
:
case
IDIGNORE
:
return
ERROR_SUCCESS
;
case
IDCANCEL
:
return
ERROR_INSTALL_USEREXIT
;
case
IDRETRY
:
return
ERROR_INSTALL_SUSPEND
;
case
IDABORT
:
default:
return
ERROR_INSTALL_FAILURE
;
}
}
/*
/*
* Call a script.
* Call a script.
*/
*/
...
@@ -354,13 +368,10 @@ DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function
...
@@ -354,13 +368,10 @@ DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function
hr
=
IDispatch_Invoke
(
pDispatch
,
dispid
,
&
IID_NULL
,
LOCALE_USER_DEFAULT
,
DISPATCH_METHOD
,
&
dispparamsNoArgs
,
&
var
,
NULL
,
NULL
);
hr
=
IDispatch_Invoke
(
pDispatch
,
dispid
,
&
IID_NULL
,
LOCALE_USER_DEFAULT
,
DISPATCH_METHOD
,
&
dispparamsNoArgs
,
&
var
,
NULL
,
NULL
);
if
(
FAILED
(
hr
))
goto
done
;
if
(
FAILED
(
hr
))
goto
done
;
/* Check return value, if it's not IDOK we failed */
hr
=
VariantChangeType
(
&
var
,
&
var
,
0
,
VT_I4
);
hr
=
VariantChangeType
(
&
var
,
&
var
,
0
,
VT_I4
);
if
(
FAILED
(
hr
))
goto
done
;
if
(
FAILED
(
hr
))
goto
done
;
if
(
V_I4
(
&
var
)
==
IDOK
)
ret
=
map_return_value
(
V_I4
(
&
var
));
ret
=
ERROR_SUCCESS
;
else
ret
=
ERROR_INSTALL_FAILURE
;
VariantClear
(
&
var
);
VariantClear
(
&
var
);
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment