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
2fb1ac86
Commit
2fb1ac86
authored
Mar 26, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Mar 27, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advpack: Set hexe to a non-NULL value to test that the handle is NULL on return.
parent
05eaadc1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
install.c
dlls/advpack/install.c
+7
-0
install.c
dlls/advpack/tests/install.c
+5
-5
No files found.
dlls/advpack/install.c
View file @
2fb1ac86
...
...
@@ -231,5 +231,12 @@ HRESULT WINAPI RunSetupCommandW(HWND hWnd, LPCWSTR szCmdName,
hWnd
,
debugstr_w
(
szCmdName
),
debugstr_w
(
szInfSection
),
debugstr_w
(
szDir
),
debugstr_w
(
lpszTitle
),
phEXE
,
dwFlags
,
pvReserved
);
if
(
!
szCmdName
||
!
szDir
)
return
E_INVALIDARG
;
if
(
!
(
dwFlags
&
RSC_FLAG_INF
))
*
phEXE
=
NULL
;
return
E_UNEXPECTED
;
}
dlls/advpack/tests/install.c
View file @
2fb1ac86
...
...
@@ -55,7 +55,7 @@ static void test_RunSetupCommand()
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %ld
\n
"
,
hr
);
/* try to run a non-existent exe */
hexe
=
NULL
;
hexe
=
(
HANDLE
)
0xdeadbeef
;
hr
=
pRunSetupCommand
(
NULL
,
"idontexist.exe"
,
"Install"
,
"c:
\\
windows
\\
system32"
,
"Title"
,
&
hexe
,
0
,
NULL
);
todo_wine
{
...
...
@@ -66,7 +66,7 @@ static void test_RunSetupCommand()
ok
(
!
TerminateProcess
(
hexe
,
0
),
"Expected TerminateProcess to fail
\n
"
);
/* try a bad directory */
hexe
=
NULL
;
hexe
=
(
HANDLE
)
0xdeadbeef
;
hr
=
pRunSetupCommand
(
NULL
,
"winver.exe"
,
"Install"
,
"windows
\\
system32"
,
"Title"
,
&
hexe
,
0
,
NULL
);
todo_wine
{
...
...
@@ -77,17 +77,17 @@ static void test_RunSetupCommand()
ok
(
!
TerminateProcess
(
hexe
,
0
),
"Expected TerminateProcess to fail
\n
"
);
/* try to run an exe with the RSC_FLAG_INF flag */
hexe
=
NULL
;
hexe
=
(
HANDLE
)
0xdeadbeef
;
hr
=
pRunSetupCommand
(
NULL
,
"winver.exe"
,
"Install"
,
"c:
\\
windows
\\
system32"
,
"Title"
,
&
hexe
,
RSC_FLAG_INF
,
NULL
);
todo_wine
{
ok
(
hr
==
SPAPI_E_WRONG_INF_STYLE
,
"Expected SPAPI_E_WRONG_INF_STYLE, got %ld
\n
"
,
hr
);
}
ok
(
hexe
==
NULL
,
"Expected hexe to be NULL
\n
"
);
ok
(
hexe
==
(
HANDLE
)
0xdeadbeef
,
"Expected hexe to be 0xdeadbeef
\n
"
);
ok
(
!
TerminateProcess
(
hexe
,
0
),
"Expected TerminateProcess to fail
\n
"
);
/* run winver.exe */
hexe
=
NULL
;
hexe
=
(
HANDLE
)
0xdeadbeef
;
hr
=
pRunSetupCommand
(
NULL
,
"winver.exe"
,
"Install"
,
"c:
\\
windows
\\
system32"
,
"Title"
,
&
hexe
,
0
,
NULL
);
todo_wine
{
...
...
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