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
06d6a03d
Commit
06d6a03d
authored
Jul 09, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Jul 09, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Handle to Service Control Manager is checked first.
parent
64054b00
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
service.c
dlls/advapi32/service.c
+6
-6
service.c
dlls/advapi32/tests/service.c
+0
-1
No files found.
dlls/advapi32/service.c
View file @
06d6a03d
...
@@ -1228,12 +1228,6 @@ SC_HANDLE WINAPI OpenServiceW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
...
@@ -1228,12 +1228,6 @@ SC_HANDLE WINAPI OpenServiceW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
TRACE
(
"%p %s %d
\n
"
,
hSCManager
,
debugstr_w
(
lpServiceName
),
dwDesiredAccess
);
TRACE
(
"%p %s %d
\n
"
,
hSCManager
,
debugstr_w
(
lpServiceName
),
dwDesiredAccess
);
if
(
!
lpServiceName
)
{
SetLastError
(
ERROR_INVALID_ADDRESS
);
return
NULL
;
}
hscm
=
sc_handle_get_handle_data
(
hSCManager
,
SC_HTYPE_MANAGER
);
hscm
=
sc_handle_get_handle_data
(
hSCManager
,
SC_HTYPE_MANAGER
);
if
(
!
hscm
)
if
(
!
hscm
)
{
{
...
@@ -1241,6 +1235,12 @@ SC_HANDLE WINAPI OpenServiceW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
...
@@ -1241,6 +1235,12 @@ SC_HANDLE WINAPI OpenServiceW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
return
FALSE
;
return
FALSE
;
}
}
if
(
!
lpServiceName
)
{
SetLastError
(
ERROR_INVALID_ADDRESS
);
return
NULL
;
}
r
=
RegOpenKeyExW
(
hscm
->
hkey
,
lpServiceName
,
0
,
KEY_ALL_ACCESS
,
&
hKey
);
r
=
RegOpenKeyExW
(
hscm
->
hkey
,
lpServiceName
,
0
,
KEY_ALL_ACCESS
,
&
hKey
);
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
{
{
...
...
dlls/advapi32/tests/service.c
View file @
06d6a03d
...
@@ -93,7 +93,6 @@ static void test_open_svc(void)
...
@@ -93,7 +93,6 @@ static void test_open_svc(void)
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
svc_handle
=
OpenServiceA
(
NULL
,
NULL
,
0
);
svc_handle
=
OpenServiceA
(
NULL
,
NULL
,
0
);
ok
(
!
svc_handle
,
"Expected failure
\n
"
);
ok
(
!
svc_handle
,
"Expected failure
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
/* TODO: Add some tests with invalid handles. These produce errors on Windows but crash on Wine */
/* TODO: Add some tests with invalid handles. These produce errors on Windows but crash on 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