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
83d8cbcc
Commit
83d8cbcc
authored
Jul 23, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Jul 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/service: Handle is checked before servicename.
parent
fc4c7390
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
service.c
dlls/advapi32/service.c
+10
-10
service.c
dlls/advapi32/tests/service.c
+0
-1
No files found.
dlls/advapi32/service.c
View file @
83d8cbcc
...
...
@@ -2273,16 +2273,16 @@ BOOL WINAPI GetServiceDisplayNameA( SC_HANDLE hSCManager, LPCSTR lpServiceName,
TRACE
(
"%p %s %p %p
\n
"
,
hSCManager
,
debugstr_a
(
lpServiceName
),
lpDisplayName
,
lpcchBuffer
);
if
(
!
lpServiceName
)
hscm
=
sc_handle_get_handle_data
(
hSCManager
,
SC_HTYPE_MANAGER
);
if
(
!
hscm
)
{
SetLastError
(
ERROR_INVALID_
PARAMETER
);
SetLastError
(
ERROR_INVALID_
HANDLE
);
return
FALSE
;
}
hscm
=
sc_handle_get_handle_data
(
hSCManager
,
SC_HTYPE_MANAGER
);
if
(
!
hscm
)
if
(
!
lpServiceName
)
{
SetLastError
(
ERROR_INVALID_
HANDLE
);
SetLastError
(
ERROR_INVALID_
ADDRESS
);
return
FALSE
;
}
...
...
@@ -2320,16 +2320,16 @@ BOOL WINAPI GetServiceDisplayNameW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
TRACE
(
"%p %s %p %p
\n
"
,
hSCManager
,
debugstr_w
(
lpServiceName
),
lpDisplayName
,
lpcchBuffer
);
if
(
!
lpServiceName
)
hscm
=
sc_handle_get_handle_data
(
hSCManager
,
SC_HTYPE_MANAGER
);
if
(
!
hscm
)
{
SetLastError
(
ERROR_INVALID_
PARAMETER
);
SetLastError
(
ERROR_INVALID_
HANDLE
);
return
FALSE
;
}
hscm
=
sc_handle_get_handle_data
(
hSCManager
,
SC_HTYPE_MANAGER
);
if
(
!
hscm
)
if
(
!
lpServiceName
)
{
SetLastError
(
ERROR_INVALID_
HANDLE
);
SetLastError
(
ERROR_INVALID_
ADDRESS
);
return
FALSE
;
}
...
...
dlls/advapi32/tests/service.c
View file @
83d8cbcc
...
...
@@ -392,7 +392,6 @@ static void test_get_displayname(void)
SetLastError
(
0xdeadbeef
);
ret
=
GetServiceDisplayNameA
(
NULL
,
NULL
,
NULL
,
&
displaysize
);
ok
(
!
ret
,
"Expected failure
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
...
...
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