Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
08e7a1bf
Commit
08e7a1bf
authored
Jul 20, 2009
by
Stefan Leichter
Committed by
Alexandre Julliard
Jul 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Test a combination of CreateServiceA and GetSecurityInfo.
parent
f81784bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
service.c
dlls/advapi32/tests/service.c
+14
-0
No files found.
dlls/advapi32/tests/service.c
View file @
08e7a1bf
...
...
@@ -28,6 +28,7 @@
#include "winsvc.h"
#include "winnls.h"
#include "lmcons.h"
#include "aclapi.h"
#include "wine/test.h"
...
...
@@ -37,6 +38,8 @@ static BOOL (WINAPI *pChangeServiceConfig2A)(SC_HANDLE,DWORD,LPVOID);
static
BOOL
(
WINAPI
*
pEnumServicesStatusExA
)(
SC_HANDLE
,
SC_ENUM_TYPE
,
DWORD
,
DWORD
,
LPBYTE
,
DWORD
,
LPDWORD
,
LPDWORD
,
LPDWORD
,
LPCSTR
);
static
DWORD
(
WINAPI
*
pGetSecurityInfo
)(
HANDLE
,
SE_OBJECT_TYPE
,
SECURITY_INFORMATION
,
PSID
*
,
PSID
*
,
PACL
*
,
PACL
*
,
PSECURITY_DESCRIPTOR
*
);
static
BOOL
(
WINAPI
*
pQueryServiceConfig2A
)(
SC_HANDLE
,
DWORD
,
LPBYTE
,
DWORD
,
LPDWORD
);
static
BOOL
(
WINAPI
*
pQueryServiceConfig2W
)(
SC_HANDLE
,
DWORD
,
LPBYTE
,
DWORD
,
LPDWORD
);
static
BOOL
(
WINAPI
*
pQueryServiceStatusEx
)(
SC_HANDLE
,
SC_STATUS_TYPE
,
LPBYTE
,
...
...
@@ -48,6 +51,7 @@ static void init_function_pointers(void)
pChangeServiceConfig2A
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"ChangeServiceConfig2A"
);
pEnumServicesStatusExA
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"EnumServicesStatusExA"
);
pGetSecurityInfo
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"GetSecurityInfo"
);
pQueryServiceConfig2A
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"QueryServiceConfig2A"
);
pQueryServiceConfig2W
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"QueryServiceConfig2W"
);
pQueryServiceStatusEx
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"QueryServiceStatusEx"
);
...
...
@@ -1743,7 +1747,17 @@ static void test_sequence(void)
return
;
}
else
{
ok
(
svc_handle
!=
NULL
,
"Could not create the service : %d
\n
"
,
GetLastError
());
if
((
svc_handle
!=
NULL
)
&&
(
pGetSecurityInfo
!=
NULL
))
{
PSID
sidOwner
,
sidGroup
;
PACL
dacl
,
sacl
;
PSECURITY_DESCRIPTOR
pSD
;
HRESULT
retval
=
pGetSecurityInfo
(
svc_handle
,
SE_SERVICE
,
DACL_SECURITY_INFORMATION
,
&
sidOwner
,
&
sidGroup
,
&
dacl
,
&
sacl
,
&
pSD
);
todo_wine
ok
(
ERROR_SUCCESS
==
retval
,
"Expected GetSecurityInfo to succeed: result %d
\n
"
,
retval
);
}
}
if
(
!
svc_handle
)
return
;
...
...
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