78 .szKey =
L"VS_VERSION_INFO",
84 .dwFileVersionMS = 0x00050002,
85 .dwFileVersionLS = 0x0ECE0000,
86 .dwProductVersionMS = 0x00050002,
87 .dwProductVersionLS = 0x0ECE0000,
88 .dwFileFlagsMask = 0x00000002,
89 .dwFileFlags = 0x00000000,
93 .dwFileDateMS = 0x00020074,
94 .dwFileDateLS = 0x00000000,
101 .szKey =
L"StringFileInfo",
107 .szKey =
L"000004B0",
114 .szKey =
L"CompanyName",
116 .Value =
L"ReactOS Project",
123 .szKey =
L"Comments",
130 .szKey =
L"Comments2",
148 DWORD dwVersionInfoSizeW, dwVersionInfoSizeA;
150 CHAR szSubBlock[256];
151 USHORT uLanguage, uCodePage;
157 ok(dwVersionInfoSizeW > 0,
"GetFileVersionInfoSizeW failed\n");
161 ok(dwVersionInfoSizeA > 0,
"GetFileVersionInfoSizeA failed\n");
162 ok(dwVersionInfoSizeA == dwVersionInfoSizeW,
"Unexpected size\n");
165 pvVersionInfoA =
malloc(dwVersionInfoSizeA);
166 memset(pvVersionInfoA, 0xCC, dwVersionInfoSizeA);
168 ok(
result,
"GetFileVersionInfoA failed\n");
172 "\\VarFileInfo\\Translation",
175 ok(
result,
"VerQueryValueA failed\n");
176 ok(cbLen >= 4,
"Unexpected value\n");
177 ok((cbLen & 0x3) == 0,
"Unexpected value\n");
182 sprintf(szSubBlock,
"\\StringFileInfo\\%04X%04X\\CompanyName", uLanguage, uCodePage);
187 ok(
result,
"VerQueryValueA failed\n");
188 ok(cbLen >= 2,
"Unexpected value\n");
189 ok((cbLen & 0x1) == 0,
"Unexpected value\n");
191 free(pvVersionInfoA);
197 DWORD dwVersionInfoSizeW;
199 WCHAR szSubBlock[256];
200 USHORT uLanguage, uCodePage;
206 ok(dwVersionInfoSizeW > 0,
"GetFileVersionInfoSizeW failed\n");
209 pvVersionInfoW =
malloc(dwVersionInfoSizeW);
211 ok(
result,
"GetFileVersionInfoW failed\n");
215 L"\\VarFileInfo\\Translation",
218 ok(
result,
"VerQueryValueA failed\n");
219 ok(cbLen >= 4,
"Unexpected value\n");
220 ok((cbLen & 0x3) == 0,
"Unexpected value\n");
225 _swprintf(szSubBlock,
L"\\StringFileInfo\\%04X%04X\\CompanyName", uLanguage, uCodePage);
230 ok(
result,
"VerQueryValueA failed\n");
231 ok(cbLen >= 2,
"Unexpected value\n");
232 ok((cbLen & 0x1) == 0,
"Unexpected value\n");
234 free(pvVersionInfoW);
255 L"\\StringFileInfo\\000004B0\\CompanyName",
258 ok(
result,
"VerQueryValueW failed\n");
265 L"\\StringFileInfo\\000004B0\\Comments",
268 ok(
result,
"VerQueryValueW failed\n");
275 L"\\StringFileInfo\\000004B0\\Comments2",
278 ok(
result,
"VerQueryValueW failed\n");
285 L"\\StringFileInfo\\000004B0\\FooBar",
288 ok(
result,
"VerQueryValueW failed\n");
void Test_VerQueryValueA(void)
void Test_StaticVersionInfo(void)
void Test_VerQueryValueW(void)
static const TEST_VERSIONINFO g_VersionInfo
#define ok_eq_wstr(value, expected)
#define ok_eq_int(value, expected)
struct tagVS_FIXEDFILEINFO VS_FIXEDFILEINFO
DWORD WINAPI GetFileVersionInfoSizeA(LPCSTR filename, LPDWORD handle)
BOOL WINAPI VerQueryValueA(LPCVOID pBlock, LPCSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
BOOL WINAPI GetFileVersionInfoW(LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data)
BOOL WINAPI GetFileVersionInfoA(LPCSTR filename, DWORD handle, DWORD datasize, LPVOID data)
BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR filename, LPDWORD handle)
#define memcpy(s1, s2, n)
int _swprintf(wchar_t *buffer, const wchar_t *format,...)
#define sprintf(buf, format,...)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define FIELD_OFFSET(t, f)
#define VS_FFI_STRUCVERSION
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_In_ ULONG _In_opt_ PVOID pvData