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
72c54e5d
Commit
72c54e5d
authored
Dec 08, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Dec 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapi32/tests: Fix test failures when the computername is fully qualified on W2K3 and earlier.
parent
af0bb4a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
19 deletions
+17
-19
eventlog.c
dlls/advapi32/tests/eventlog.c
+17
-19
No files found.
dlls/advapi32/tests/eventlog.c
View file @
72c54e5d
...
...
@@ -712,7 +712,7 @@ static void test_readwrite(void)
BOOL
ret
,
sidavailable
;
BOOL
on_vista
=
FALSE
;
/* Used to indicate Vista, W2K8 or Win7 */
int
i
;
char
*
localcomputer
;
char
*
localcomputer
=
NULL
;
DWORD
size
;
if
(
pCreateWellKnownSid
)
...
...
@@ -730,24 +730,6 @@ static void test_readwrite(void)
user
=
NULL
;
}
if
(
pGetComputerNameExA
)
{
size
=
0
;
SetLastError
(
0xdeadbeef
);
pGetComputerNameExA
(
ComputerNameDnsFullyQualified
,
NULL
,
&
size
);
/* Cope with W2K (needed size is not set) */
if
(
size
==
0
&&
GetLastError
()
==
ERROR_MORE_DATA
)
size
=
1024
;
localcomputer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
pGetComputerNameExA
(
ComputerNameDnsFullyQualified
,
localcomputer
,
&
size
);
}
else
{
size
=
MAX_COMPUTERNAME_LENGTH
+
1
;
localcomputer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
GetComputerNameA
(
localcomputer
,
&
size
);
}
/* Write an event with an incorrect event type. This will fail on Windows 7
* but succeed on all others, hence it's not part of the struct.
*/
...
...
@@ -878,6 +860,22 @@ static void test_readwrite(void)
if
(
on_vista
)
skip
(
"There is no DWORD alignment enforced for UserSid on Vista, W2K8 or Win7
\n
"
);
if
(
on_vista
&&
pGetComputerNameExA
)
{
/* New Vista+ behavior */
size
=
0
;
SetLastError
(
0xdeadbeef
);
pGetComputerNameExA
(
ComputerNameDnsFullyQualified
,
NULL
,
&
size
);
localcomputer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
pGetComputerNameExA
(
ComputerNameDnsFullyQualified
,
localcomputer
,
&
size
);
}
else
{
size
=
MAX_COMPUTERNAME_LENGTH
+
1
;
localcomputer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
GetComputerNameA
(
localcomputer
,
&
size
);
}
/* Read all events from our created eventlog, one by one */
handle
=
OpenEventLogA
(
NULL
,
eventlogname
);
i
=
0
;
...
...
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