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
0900c72b
Commit
0900c72b
authored
Jul 31, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Jul 31, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/service: Cater better for domain in test.
parent
a0dd646e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
service.c
dlls/advapi32/tests/service.c
+3
-7
No files found.
dlls/advapi32/tests/service.c
View file @
0900c72b
...
@@ -140,8 +140,8 @@ static void test_open_svc(void)
...
@@ -140,8 +140,8 @@ static void test_open_svc(void)
static
void
test_create_delete_svc
(
void
)
static
void
test_create_delete_svc
(
void
)
{
{
SC_HANDLE
scm_handle
,
svc_handle1
;
SC_HANDLE
scm_handle
,
svc_handle1
;
CHAR
username
[
UNLEN
+
1
],
*
domain
;
CHAR
username
[
UNLEN
+
1
],
domain
[
MAX_PATH
]
;
DWORD
user_size
=
UNLEN
+
1
,
domain_size
=
0
;
DWORD
user_size
=
UNLEN
+
1
;
CHAR
account
[
UNLEN
+
3
];
CHAR
account
[
UNLEN
+
3
];
static
const
CHAR
servicename
[]
=
"Winetest"
;
static
const
CHAR
servicename
[]
=
"Winetest"
;
static
const
CHAR
pathname
[]
=
"we_dont_care.exe"
;
static
const
CHAR
pathname
[]
=
"we_dont_care.exe"
;
...
@@ -155,14 +155,10 @@ static void test_create_delete_svc(void)
...
@@ -155,14 +155,10 @@ static void test_create_delete_svc(void)
/* Get the username and turn it into an account to be used in some tests */
/* Get the username and turn it into an account to be used in some tests */
GetUserNameA
(
username
,
&
user_size
);
GetUserNameA
(
username
,
&
user_size
);
/* Get the domainname to cater for that situation */
/* Get the domainname to cater for that situation */
GetComputerNameEx
(
ComputerNameDnsDomain
,
NULL
,
&
domain_size
);
if
(
GetEnvironmentVariableA
(
"USERDOMAIN"
,
domain
,
MAX_PATH
))
domain
=
HeapAlloc
(
GetProcessHeap
(),
0
,
domain_size
);
GetComputerNameEx
(
ComputerNameDnsDomain
,
domain
,
&
domain_size
);
if
(
domain_size
>
1
)
sprintf
(
account
,
"%s
\\
%s"
,
domain
,
username
);
sprintf
(
account
,
"%s
\\
%s"
,
domain
,
username
);
else
else
sprintf
(
account
,
".
\\
%s"
,
username
);
sprintf
(
account
,
".
\\
%s"
,
username
);
HeapFree
(
GetProcessHeap
(),
0
,
domain
);
/* All NULL */
/* All NULL */
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
...
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