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
2509c06e
Commit
2509c06e
authored
Jul 15, 2005
by
Paul Vriens
Committed by
Alexandre Julliard
Jul 15, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a test, specifically for NT/W2K/XP/W2K3.
parent
5bb8f968
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
info.c
dlls/version/tests/info.c
+49
-0
No files found.
dlls/version/tests/info.c
View file @
2509c06e
...
...
@@ -235,8 +235,57 @@ static void test_info(void)
#endif
}
static
void
test_unicode
(
void
)
{
DWORD
hdlA
,
retvalA
;
DWORD
hdlW
,
retvalW
;
BOOL
retA
,
retW
;
PVOID
pVersionInfoA
=
NULL
;
PVOID
pVersionInfoW
=
NULL
;
char
mypathA
[
MAX_PATH
]
=
""
;
WCHAR
mypathW
[
MAX_PATH
];
/* If we call GetFileVersionInfoA on a system that supports Unicode (NT/W2K/XP/W2K3 by default)
* then the versioninfo will contain Unicode strings.
* Wine however always converts a VersionInfo32 to VersionInfo16 when called through GetFileVersionInfoA
* regardless of Windows version
* The test is to call both the A and W versions, which should have the same Version Information,
* on systems that support both calls.
*/
/* First get the versioninfo via the W versions */
GetModuleFileNameW
(
NULL
,
mypathW
,
MAX_PATH
);
if
(
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
{
trace
(
"GetModuleFileNameW not existing on this platform, skipping rest of test
\n
"
);
return
;
}
retvalW
=
GetFileVersionInfoSizeW
(
mypathW
,
&
hdlW
);
pVersionInfoW
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
retvalW
);
retW
=
GetFileVersionInfoW
(
mypathW
,
0
,
retvalW
,
pVersionInfoW
);
/* And now via the A versions */
GetModuleFileNameA
(
NULL
,
mypathA
,
MAX_PATH
);
retvalA
=
GetFileVersionInfoSizeA
(
mypathA
,
&
hdlA
);
pVersionInfoA
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
retvalA
);
retA
=
GetFileVersionInfoA
(
mypathA
,
0
,
retvalA
,
pVersionInfoA
);
ok
(
retvalA
==
retvalW
,
"The size of the struct should be the same for both A/W calls, it is (%ld) vs. (%ld)
\n
"
,
retvalA
,
retvalW
);
todo_wine
{
ok
(
!
memcmp
(
pVersionInfoA
,
pVersionInfoW
,
retvalA
),
"Both structs should be the same, they aren't
\n
"
);
}
HeapFree
(
GetProcessHeap
(),
0
,
pVersionInfoA
);
HeapFree
(
GetProcessHeap
(),
0
,
pVersionInfoW
);
}
START_TEST
(
info
)
{
test_info_size
();
test_info
();
test_unicode
();
}
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