11#define WIN32_NO_STATUS
33#define HID_DATABASE_FULLPATH 2
35#define SDB_DATABASE_MAIN_SHIM 0x80030000
43#define TAG_TYPE_MASK 0xF000
45#define TAG_TYPE_NULL 0x1000
46#define TAG_TYPE_BYTE 0x2000
47#define TAG_TYPE_WORD 0x3000
48#define TAG_TYPE_DWORD 0x4000
49#define TAG_TYPE_QWORD 0x5000
50#define TAG_TYPE_STRINGREF 0x6000
51#define TAG_TYPE_LIST 0x7000
52#define TAG_TYPE_STRING 0x8000
53#define TAG_TYPE_BINARY 0x9000
56#define TAG_INCLUDE (0x1 | TAG_TYPE_NULL)
58#define TAG_MATCH_MODE (0x1 | TAG_TYPE_WORD)
60#define TAG_SIZE (0x1 | TAG_TYPE_DWORD)
61#define TAG_CHECKSUM (0x3 | TAG_TYPE_DWORD)
62#define TAG_MODULE_TYPE (0x6 | TAG_TYPE_DWORD)
63#define TAG_VERFILEOS (0x9 | TAG_TYPE_DWORD)
64#define TAG_VERFILETYPE (0xA | TAG_TYPE_DWORD)
65#define TAG_PE_CHECKSUM (0xB | TAG_TYPE_DWORD)
66#define TAG_PROBLEMSEVERITY (0x10 | TAG_TYPE_DWORD)
67#define TAG_HTMLHELPID (0x15 | TAG_TYPE_DWORD)
68#define TAG_FLAGS (0x17 | TAG_TYPE_DWORD)
69#define TAG_LAYER_TAGID (0x1A | TAG_TYPE_DWORD)
70#define TAG_LINKER_VERSION (0x1C | TAG_TYPE_DWORD)
71#define TAG_LINK_DATE (0x1D | TAG_TYPE_DWORD)
72#define TAG_UPTO_LINK_DATE (0x1E | TAG_TYPE_DWORD)
73#define TAG_APP_NAME_RC_ID (0x24 | TAG_TYPE_DWORD)
74#define TAG_VENDOR_NAME_RC_ID (0x25 | TAG_TYPE_DWORD)
75#define TAG_SUMMARY_MSG_RC_ID (0x26 | TAG_TYPE_DWORD)
76#define TAG_OS_PLATFORM (0x23 | TAG_TYPE_DWORD)
78#define TAG_TIME (0x1 | TAG_TYPE_QWORD)
79#define TAG_BIN_FILE_VERSION (0x2 | TAG_TYPE_QWORD)
80#define TAG_BIN_PRODUCT_VERSION (0x3 | TAG_TYPE_QWORD)
81#define TAG_UPTO_BIN_PRODUCT_VERSION (0x6 | TAG_TYPE_QWORD)
82#define TAG_UPTO_BIN_FILE_VERSION (0xD | TAG_TYPE_QWORD)
83#define TAG_FLAG_LUA (0x10 | TAG_TYPE_QWORD)
85#define TAG_DATABASE (0x1 | TAG_TYPE_LIST)
86#define TAG_INEXCLUD (0x3 | TAG_TYPE_LIST)
87#define TAG_EXE (0x7 | TAG_TYPE_LIST)
88#define TAG_MATCHING_FILE (0x8 | TAG_TYPE_LIST)
89#define TAG_SHIM_REF (0x9| TAG_TYPE_LIST)
90#define TAG_LAYER (0xB | TAG_TYPE_LIST)
91#define TAG_APPHELP (0xD | TAG_TYPE_LIST)
92#define TAG_LINK (0xE | TAG_TYPE_LIST)
93#define TAG_DATA (0xF | TAG_TYPE_LIST)
94#define TAG_STRINGTABLE (0x801 | TAG_TYPE_LIST)
96#define TAG_STRINGTABLE_ITEM (0x801 | TAG_TYPE_STRING)
98#define TAG_NAME (0x1 | TAG_TYPE_STRINGREF)
99#define TAG_MODULE (0x3 | TAG_TYPE_STRINGREF)
100#define TAG_VENDOR (0x5 | TAG_TYPE_STRINGREF)
101#define TAG_APP_NAME (0x6 | TAG_TYPE_STRINGREF)
102#define TAG_COMMAND_LINE (0x8 | TAG_TYPE_STRINGREF)
103#define TAG_COMPANY_NAME (0x9 | TAG_TYPE_STRINGREF)
104#define TAG_WILDCARD_NAME (0xB | TAG_TYPE_STRINGREF)
105#define TAG_PRODUCT_NAME (0x10 | TAG_TYPE_STRINGREF)
106#define TAG_PRODUCT_VERSION (0x11 | TAG_TYPE_STRINGREF)
107#define TAG_FILE_DESCRIPTION (0x12 | TAG_TYPE_STRINGREF)
108#define TAG_FILE_VERSION (0x13 | TAG_TYPE_STRINGREF)
109#define TAG_ORIGINAL_FILENAME (0x14 | TAG_TYPE_STRINGREF)
110#define TAG_INTERNAL_NAME (0x15 | TAG_TYPE_STRINGREF)
111#define TAG_LEGAL_COPYRIGHT (0x16 | TAG_TYPE_STRINGREF)
112#define TAG_APPHELP_DETAILS (0x18 | TAG_TYPE_STRINGREF)
113#define TAG_LINK_URL (0x19 | TAG_TYPE_STRINGREF)
114#define TAG_APPHELP_TITLE (0x1B | TAG_TYPE_STRINGREF)
116#define TAG_COMPILER_VERSION (0x22 | TAG_TYPE_STRINGREF)
118#define TAG_GENERAL (0x2 | TAG_TYPE_NULL)
120#define TAG_EXE_ID (0x4 | TAG_TYPE_BINARY)
121#define TAG_DATA_BITS (0x5 | TAG_TYPE_BINARY)
122#define TAG_DATABASE_ID (0x7 | TAG_TYPE_BINARY)
181DEFINE_GUID(GUID_DATABASE_TEST, 0xe39b0eb0, 0x55db, 0x450b, 0x9b, 0xd4, 0xd2, 0x0c, 0x94, 0x84, 0x26, 0x0f);
182DEFINE_GUID(GUID_MAIN_DATABASE, 0x11111111, 0x1111, 0x1111, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11);
196 if (!pSdbGetDatabaseInformation || !pSdbFreeDatabaseInformation)
198 skip(
"GetDatabaseInformation or SdbFreeDatabaseInformation not found\n");
203 memset(pInfo, 0xDE,
sizeof(*pInfo) * 2);
205 fResult = pSdbGetDatabaseInformation(
pdb, pInfo);
206 ok(fResult,
"SdbGetDatabaseInformation failed\n");
216 ok(pInfo->
dwMajor == 3,
"Expected pInfo->dwMajor to be 3, was: %d\n", pInfo->
dwMajor);
217 ok(pInfo->
dwMinor == 0,
"Expected pInfo->dwMinor to be 0, was: %d\n", pInfo->
dwMinor);
219 ok(pInfo[1].dwSomething == 0 || pInfo[1].dwSomething == 0xdededede,
"Something amiss: 0x%x\n", pInfo[1].dwSomething);
220 ok(pInfo[1].dwMajor == 0xdededede,
"Cookie2 corrupt: 0x%x\n", pInfo[1].dwMajor);
224 ok(pInfo->
dwMajor == 2,
"Expected pInfo->dwMajor to be 2, was: %d\n", pInfo->
dwMajor);
227 ok(pInfo->
dwMinor == 1,
"Expected pInfo->dwMinor to be 1, was: %d\n", pInfo->
dwMinor);
234 ok(pInfo->
dwMinor == dwExpect,
"Expected pInfo->dwMinor to be %d, was: %d\n", dwExpect, pInfo->
dwMinor);
237 ok(pInfo[1].dwSomething == 0xdededede,
"Cookie1 corrupt: 0x%x\n", pInfo[1].dwSomething);
238 ok(pInfo[1].dwMajor == 0xdededede,
"Cookie2 corrupt: 0x%x\n", pInfo[1].dwMajor);
251 static const WCHAR tag_size_string[] =
L"SIZE";
252 static const WCHAR tag_flag_lua_string[] =
L"FLAG_LUA";
253 static const WCHAR invalid_tag[] =
L"InvalidTag";
266 TAGID tagid, ptagid, stringref = 6;
271 ok(
pdb !=
NULL,
"failed to create database\n");
274 ret = pSdbWriteDWORDTag(
pdb,
tags[0], 0xDEADBEEF);
275 ok(
ret,
"failed to write DWORD tag\n");
276 ret = pSdbWriteQWORDTag(
pdb,
tags[1], 0xDEADBEEFBABE);
277 ok(
ret,
"failed to write QWORD tag\n");
278 ret = pSdbWriteStringRefTag(
pdb,
tags[2], stringref);
279 ok(
ret,
"failed to write stringref tag\n");
280 tagid = pSdbBeginWriteListTag(
pdb,
tags[3]);
283 ok(
ret,
"failed to write string tag\n");
285 ok(
ret,
"failed to write NULL tag\n");
287 ok(
ret,
"failed to write WORD tag\n");
288 ret = pSdbEndWriteListTag(
pdb, tagid);
289 ok(
ret,
"failed to update list size\n");
291 pSdbCloseDatabaseWrite(
pdb);
296 ok(
pdb !=
NULL,
"unexpected NULL handle\n");
303 tag = pSdbGetTagFromTagID(
pdb, tagid);
306 string = pSdbTagToString(
tag);
307 ok(
lstrcmpW(
string, tag_size_string) == 0,
"unexpected string %s, expected %s\n",
310 dword = pSdbReadDWORDTag(
pdb, tagid, 0);
311 ok(dword == 0xDEADBEEF,
"unexpected value %u, expected 0xDEADBEEF\n", dword);
317 tag = pSdbGetTagFromTagID(
pdb, tagid);
320 string = pSdbTagToString(
tag);
323 ok(
lstrcmpW(
string, tag_flag_lua_string) == 0,
"unexpected string %s, expected %s\n",
328 ok(
lstrcmpW(
string, invalid_tag) == 0,
"unexpected string %s, expected %s\n",
332 qword = pSdbReadQWORDTag(
pdb, tagid, 0);
333 ok(qword == 0xDEADBEEFBABE,
"unexpected value 0x%I64x, expected 0xDEADBEEFBABE\n", qword);
336 string = pSdbGetStringTagPtr(
pdb, tagid);
337 ok(
string && (
lstrcmpW(
string,
temp) == 0),
"unexpected string %s, expected %s\n",
341 tagid = pSdbGetFirstChild(
pdb, ptagid);
343 string = pSdbGetStringTagPtr(
pdb, tagid);
344 ok(
string && (
lstrcmpW(
string,
temp) == 0),
"unexpected string %s, expected %s\n",
347 ok(pSdbReadStringTag(
pdb, tagid,
buffer, 6),
"failed to write string to buffer\n");
349 ok(!pSdbReadStringTag(
pdb, tagid,
buffer, 3),
"string was written to buffer, but failure was expected");
350 ok(pSdbGetTagDataSize(
pdb, tagid) == 5 *
sizeof(
WCHAR),
"string has unexpected size\n");
352 tagid = pSdbGetNextChild(
pdb, ptagid, tagid);
353 tag = pSdbGetTagFromTagID(
pdb, tagid);
355 ok(pSdbGetTagDataSize(
pdb, tagid) == 0,
"null tag with size > 0\n");
357 tagid = pSdbGetNextChild(
pdb, ptagid, tagid);
358 word = pSdbReadWORDTag(
pdb, tagid, 0);
359 ok(
word == 0xACE,
"unexpected value 0x%x, expected 0x%x\n",
word, 0xACE);
363 pSdbCloseDatabase(
pdb);
373 ok(
pdb !=
NULL,
"unexpected NULL handle\n");
378 ok(
ret,
"failed to write tag from binary file\n");
379 pSdbCloseDatabaseWrite(
pdb);
387 ok(
pdb !=
NULL,
"unexpected NULL handle\n");
394 ok(
ret,
"failed to read binary tag\n");
396 pSdbCloseDatabase(
pdb);
409 WCHAR path1[] = {
't',
'e',
's',
't',
'.',
's',
'd',
'b',0};
421 ok(
pdb !=
NULL,
"Expected a valid database\n");
425 ok(tagdb == 12,
"Expected tag to be 12, was %u\n", tagdb);
428 ok(
ret,
"Expected SdbWriteStringTag to succeed\n");
429 ret = pSdbEndWriteListTag(
pdb, tagdb);
430 ok(
ret,
"Expected SdbEndWriteListTag to succeed\n");
433 ok(tagdb == 30,
"Expected tag to be 24, was %u\n", tagdb);
436 ok(
ret,
"Expected SdbWriteStringTag to succeed\n");
437 ret = pSdbEndWriteListTag(
pdb, tagdb);
438 ok(
ret,
"Expected SdbEndWriteListTag to succeed\n");
440 pSdbCloseDatabaseWrite(
pdb);
444 ok(
pdb !=
NULL,
"Expected a valid database\n");
449 ok(tagdb == 12,
"Expected tag to be 12, was %u\n", tagdb);
450 size = pSdbGetTagDataSize(
pdb, tagdb);
451 ok(
size == 12,
"Expected size to be 12, was %u\n",
size);
454 ok(tagstr == 18,
"Expected string tag to be 18, was %u\n", tagstr);
455 tag = pSdbGetTagFromTagID(
pdb, tagstr);
457 size = pSdbGetTagDataSize(
pdb, tagstr);
458 ok(
size == 4,
"Expected size to be 4, was 0x%x\n",
size);
460 tagstr = pSdbFindNextTag(
pdb, tagdb, tagstr);
461 ok(tagstr == 24,
"Expected string tag to be 24, was %u\n", tagstr);
462 tag = pSdbGetTagFromTagID(
pdb, tagstr);
464 size = pSdbGetTagDataSize(
pdb, tagstr);
465 ok(
size == 4,
"Expected size to be 4, was 0x%x\n",
size);
468 ok(tagdb == 30,
"Expected tag to be 30, was %u\n", tagdb);
469 size = pSdbGetTagDataSize(
pdb, tagdb);
470 ok(
size == 12,
"Expected size to be 12, was %u\n",
size);
473 ok(tagstr == 36,
"Expected string tag to be 36, was %u\n", tagstr);
474 tag = pSdbGetTagFromTagID(
pdb, tagstr);
476 size = pSdbGetTagDataSize(
pdb, tagstr);
477 ok(
size == 4,
"Expected size to be 4, was %u\n",
size);
479 tagstr = pSdbFindNextTag(
pdb, tagdb, tagstr);
480 ok(tagstr == 42,
"Expected string tag to be 42, was %u\n", tagstr);
481 tag = pSdbGetTagFromTagID(
pdb, tagstr);
483 size = pSdbGetTagDataSize(
pdb, tagstr);
484 ok(
size == 4,
"Expected size to be 4, was 0x%x\n",
size);
487 ok(tagdb == 48,
"Expected tag to be 48, was %u\n", tagdb);
488 size = pSdbGetTagDataSize(
pdb, tagdb);
489 ok(
size == 32,
"Expected size to be 32, was %u\n",
size);
491 tagstr = pSdbGetFirstChild(
pdb, tagdb);
492 ok(tagstr == 54,
"Expected string tag to be 54, was %u\n", tagstr);
493 tag = pSdbGetTagFromTagID(
pdb, tagstr);
495 size = pSdbGetTagDataSize(
pdb, tagstr);
496 ok(
size == 10,
"Expected size to be 10, was %u\n",
size);
497 ptr = pSdbGetStringTagPtr(
pdb, tagstr);
498 ok(
ptr !=
NULL,
"Expected a valid pointer\n");
502 tagstr = pSdbGetNextChild(
pdb, tagdb, tagstr);
503 ok(tagstr == 70,
"Expected string tag to be 70, was %u\n", tagstr);
504 tag = pSdbGetTagFromTagID(
pdb, tagstr);
506 size = pSdbGetTagDataSize(
pdb, tagstr);
507 ok(
size == 10,
"Expected size to be 10, was %u\n",
size);
508 ptr = pSdbGetStringTagPtr(
pdb, tagstr);
509 ok(
ptr !=
NULL,
"Expected a valid pointer\n");
513 pSdbCloseDatabase(
pdb);
528 ok(
ret,
"Failed to write string %u/%u\n",
n,
count);
530 pSdbCloseDatabaseWrite(
pdb);
535 static const WCHAR path1[] = {
't',
'e',
's',
't',
'.',
's',
'd',
'b',0};
536 static const WCHAR test1[] = {
't',
'e',
's',
't',
'1',0};
537 static const WCHAR test2[] = {
'T',
'e',
's',
't',
'1',0};
538 static const WCHAR test3[] = {
'T',
'E',
's',
't',
'1',0};
539 static const WCHAR test4[] = {
'T',
'E',
'S',
'T',
'1',0};
540 static const WCHAR test5[] = {
'T',
'E',
'S',
'T',
'2',0};
541 static const WCHAR lipsum[] = {
'L',
'o',
'r',
'e',
'm',
' ',
'i',
'p',
's',
'u',
'm',
' ',
'd',
'o',
'l',
'o',
'r',
' ',
's',
'i',
't',
' ',
'a',
'm',
'e',
't',
',',
' ',
'c',
'o',
'n',
's',
'e',
'c',
't',
'e',
't',
'u',
'r',
' ',
'a',
'd',
'i',
'p',
'i',
's',
'c',
'i',
'n',
'g',
' ',
'e',
'l',
'i',
't',
'.',
' ',
'N',
'u',
'l',
'l',
'a',
' ',
'a',
'n',
't',
'e',
' ',
'r',
'i',
's',
'u',
's',
',',
' ',
'm',
'a',
'l',
'e',
's',
'u',
'a',
'd',
'a',
' ',
's',
'e',
'd',
' ',
'i',
'a',
'c',
'u',
'l',
'i',
's',
' ',
'l',
'u',
'c',
't',
'u',
's',
',',
' ',
'o',
'r',
'n',
'a',
'r',
'e',
' ',
'p',
'u',
'l',
'v',
'i',
'n',
'a',
'r',
' ',
'v',
'e',
'l',
'i',
't',
'.',
' ',
'L',
'o',
'r',
'e',
'm',
' ',
'i',
'p',
's',
'u',
'm',
' ',
'd',
'o',
'l',
'o',
'r',
' ',
's',
'i',
't',
' ',
'a',
'm',
'e',
't',
',',
' ',
'c',
'o',
'n',
's',
'e',
'c',
't',
'e',
't',
'u',
'r',
' ',
'a',
'd',
'i',
'p',
'i',
's',
'c',
'i',
'n',
'g',
' ',
'e',
'l',
'i',
't',
'.',
' ',
'I',
'n',
't',
'e',
'g',
'e',
'r',
' ',
'q',
'u',
'i',
's',
' ',
'f',
'e',
'l',
'i',
's',
' ',
'u',
't',
' ',
'l',
'e',
'o',
' ',
'e',
'l',
'e',
'i',
'f',
'e',
'n',
'd',
' ',
'u',
'l',
't',
'r',
'i',
'c',
'e',
's',
' ',
'f',
'i',
'n',
'i',
'b',
'u',
's',
' ',
'e',
'u',
' ',
'd',
'o',
'l',
'o',
'r',
'.',
' ',
'I',
'n',
' ',
'b',
'i',
'b',
'e',
'n',
'd',
'u',
'm',
',',
' ',
'e',
'r',
'o',
's',
' ',
'e',
'u',
' ',
'f',
'a',
'u',
'c',
'i',
'b',
'u',
's',
' ',
'c',
'o',
'n',
's',
'e',
'q',
'u',
'a',
't',
',',
' ',
'n',
'i',
's',
'i',
' ',
'm',
'a',
'g',
'n',
'a',
' ',
'v',
'e',
'n',
'e',
'n',
'a',
't',
'i',
's',
' ',
'j',
'u',
's',
't',
'o',
',',
' ',
'a',
't',
' ',
't',
'r',
'i',
's',
't',
'i',
'q',
'u',
'e',
' ',
'm',
'e',
't',
'u',
's',
' ',
'd',
'o',
'l',
'o',
'r',
' ',
'u',
't',
' ',
'r',
'i',
's',
'u',
's',
'.',
' ',
'N',
'u',
'n',
'c',
' ',
'e',
'u',
' ',
'o',
'd',
'i',
'o',
' ',
'd',
'i',
'g',
'n',
'i',
's',
's',
'i',
'm',
',',
' ',
'o',
'r',
'n',
'a',
'r',
'e',
' ',
'a',
'n',
't',
'e',
' ',
'g',
'r',
'a',
'v',
'i',
'd',
'a',
',',
' ',
'l',
'o',
'b',
'o',
'r',
't',
'i',
's',
' ',
'e',
'r',
'o',
's',
'.',
' ',
'C',
'r',
'a',
's',
' ',
's',
'e',
'm',
' ',
'e',
'x',
',',
' ',
'c',
'o',
'n',
's',
'e',
'c',
't',
'e',
't',
'u',
'r',
' ',
'p',
'u',
'l',
'v',
'i',
'n',
'a',
'r',
' ',
't',
'i',
'n',
'c',
'i',
'd',
'u',
'n',
't',
' ',
'e',
'u',
',',
' ',
'c',
'o',
'n',
'g',
'u',
'e',
' ',
'a',
' ',
'e',
'r',
'o',
's',
'.',
' ',
'C',
'u',
'r',
'a',
'b',
'i',
't',
'u',
'r',
' ',
'e',
'r',
'o',
's',
' ',
'e',
'r',
'a',
't',
',',
' ',
'p',
'e',
'l',
'l',
'e',
'n',
't',
'e',
's',
'q',
'u',
'e',
' ',
'e',
't',
' ',
'n',
'i',
'b',
'h',
' ',
'q',
'u',
'i',
's',
',',
' ',
'i',
'n',
't',
'e',
'r',
'd',
'u',
'm',
' ',
't',
'e',
'm',
'p',
'o',
'r',
' ',
'o',
'd',
'i',
'o',
'.',
' ',
'E',
't',
'i',
'a',
'm',
' ',
's',
'a',
'p',
'i',
'e',
'n',
' ',
's',
'a',
'p',
'i',
'e',
'n',
',',
' ',
'a',
'l',
'i',
'q',
'u',
'a',
'm',
' ',
'u',
't',
' ',
'a',
'l',
'i',
'q',
'u',
'a',
'm',
' ',
'a',
't',
',',
' ',
's',
'a',
'g',
'i',
't',
't',
'i',
's',
' ',
'e',
'u',
' ',
'm',
'a',
'g',
'n',
'a',
'.',
' ',
'M',
'a',
'e',
'c',
'e',
'n',
'a',
's',
' ',
'm',
'a',
'g',
'n',
'a',
' ',
'm',
'a',
'g',
'n',
'a',
',',
' ',
's',
'u',
's',
'c',
'i',
'p',
'i',
't',
' ',
'u',
't',
' ',
'l',
'o',
'r',
'e',
'm',
' ',
'u',
't',
',',
' ',
'v',
'a',
'r',
'i',
'u',
's',
' ',
'p',
'r',
'e',
't',
'i',
'u',
'm',
' ',
'f',
'e',
'l',
'i',
's',
'.',
' ',
'I',
'n',
't',
'e',
'g',
'e',
'r',
' ',
't',
'i',
'n',
'c',
'i',
'd',
'u',
'n',
't',
',',
' ',
'm',
'e',
't',
'u',
's',
' ',
'v',
'e',
'l',
' ',
's',
'o',
'l',
'l',
'i',
'c',
'i',
't',
'u',
'd',
'i',
'n',
' ',
'f',
'i',
'n',
'i',
'b',
'u',
's',
',',
' ',
'f',
'e',
'l',
'i',
's',
' ',
'e',
'r',
'a',
't',
' ',
'm',
'o',
'l',
'e',
's',
't',
'i',
'e',
' ',
'u',
'r',
'n',
'a',
',',
' ',
'a',
' ',
'c',
'o',
'n',
'd',
'i',
'm',
'e',
'n',
't',
'u',
'm',
' ',
'a',
'u',
'g',
'u',
'e',
' ',
'a',
'r',
'c',
'u',
' ',
'v',
'i',
't',
'a',
'e',
' ',
'r',
'i',
's',
'u',
's',
'.',
' ',
'E',
't',
'i',
'a',
'm',
' ',
'i',
'd',
' ',
's',
'a',
'g',
'i',
't',
't',
'i',
's',
' ',
'q',
'u',
'a',
'm',
'.',
' ',
'M',
'o',
'r',
'b',
'i',
' ',
'a',
' ',
'u',
'l',
't',
'r',
'i',
'c',
'i',
'e',
's',
' ',
'n',
'u',
'n',
'c',
'.',
' ',
'P',
'h',
'a',
's',
'e',
'l',
'l',
'u',
's',
' ',
'e',
'r',
'o',
's',
' ',
'r',
'i',
's',
'u',
's',
',',
' ',
'c',
'u',
'r',
's',
'u',
's',
' ',
'u',
'l',
'l',
'a',
'm',
'c',
'o',
'r',
'p',
'e',
'r',
' ',
'm',
'a',
's',
's',
'a',
' ',
's',
'e',
'd',
',',
' ',
'd',
'i',
'g',
'n',
'i',
's',
's',
'i',
'm',
' ',
'c',
'o',
'n',
's',
'e',
'q',
'u',
'a',
't',
' ',
'l',
'i',
'g',
'u',
'l',
'a',
'.',
' ',
'A',
'l',
'i',
'q',
'u',
'a',
'm',
' ',
't',
'u',
'r',
'p',
'i',
's',
' ',
'a',
'r',
'c',
'u',
',',
' ',
'a',
'c',
'c',
'u',
'm',
's',
'a',
'n',
' ',
'q',
'u',
'i',
's',
' ',
's',
'a',
'p',
'i',
'e',
'n',
' ',
'v',
'i',
't',
'a',
'e',
',',
' ',
'l',
'a',
'c',
'i',
'n',
'i',
'a',
' ',
'e',
'u',
'i',
's',
'm',
'o',
'd',
' ',
'n',
'i',
's',
'l',
'.',
' ',
'M',
'a',
'u',
'r',
'i',
's',
' ',
'i',
'd',
' ',
'f',
'e',
'l',
'i',
's',
' ',
's',
'e',
'm',
'.',0};
543 static const WCHAR lipsum2[] = {
'L',
'o',
'r',
'e',
'm',
' ',
'i',
'p',
's',
'u',
'm',
' ',
'd',
'o',
'l',
'o',
'r',
' ',
's',
'i',
't',
' ',
'a',
'm',
'e',
't',
',',
' ',
'c',
'o',
'n',
's',
'e',
'c',
't',
'e',
't',
'u',
'r',
' ',
'a',
'd',
'i',
'p',
'i',
's',
'c',
'i',
'n',
'g',
' ',
'e',
'l',
'i',
't',
'.',
' ',
'N',
'u',
'l',
'l',
'a',
' ',
'a',
'n',
't',
'e',
' ',
'r',
'i',
's',
'u',
's',
',',
' ',
'm',
'a',
'l',
'e',
's',
'u',
'a',
'd',
'a',
' ',
's',
'e',
'd',
' ',
'i',
'a',
'c',
'u',
'l',
'i',
's',
' ',
'l',
'u',
'c',
't',
'u',
's',
',',
' ',
'o',
'r',
'n',
'a',
'r',
'e',
' ',
'p',
'u',
'l',
'v',
'i',
'n',
'a',
'r',
' ',
'v',
'e',
'l',
'i',
't',
'.',
' ',
'L',
'o',
'r',
'e',
'm',
' ',
'i',
'p',
's',
'u',
'm',
' ',
'd',
'o',
'l',
'o',
'r',
' ',
's',
'i',
't',
' ',
'a',
'm',
'e',
't',
',',
' ',
'c',
'o',
'n',
's',
'e',
'c',
't',
'e',
't',
'u',
'r',
' ',
'a',
'd',
'i',
'p',
'i',
's',
'c',
'i',
'n',
'g',
' ',
'e',
'l',
'i',
't',
'.',
' ',
'I',
'n',
't',
'e',
'g',
'e',
'r',
' ',
'q',
'u',
'i',
's',
' ',
'f',
'e',
'l',
'i',
's',
' ',
'u',
't',
' ',
'l',
'e',
'o',
' ',
'e',
'l',
'e',
'i',
'f',
'e',
'n',
'd',
' ',
'u',
'l',
't',
'r',
'i',
'c',
'e',
's',
' ',
'f',
'i',
'n',
'i',
'b',
'u',
's',
' ',
'e',
'u',
' ',
'd',
'o',
'l',
'o',
'r',
'.',
' ',
'I',
'n',
' ',
'b',
'i',
'b',
'e',
'n',
'd',
'u',
'm',
',',
' ',
'e',
'r',
'o',
's',
' ',
'e',
'u',
' ',
'f',
'a',
'u',
'c',
'i',
'b',
'u',
's',
' ',
'c',
'o',
'n',
's',
'e',
'q',
'u',
'a',
't',
',',
' ',
'n',
'i',
's',
'i',
' ',
'm',
'a',
'g',
'n',
'a',
' ',
'v',
'e',
'n',
'e',
'n',
'a',
't',
'i',
's',
' ',
'j',
'u',
's',
't',
'o',
',',
' ',
'a',
't',
' ',
't',
'r',
'i',
's',
't',
'i',
'q',
'u',
'e',
' ',
'm',
'e',
't',
'u',
's',
' ',
'd',
'o',
'l',
'o',
'r',
' ',
'u',
't',
' ',
'r',
'i',
's',
'u',
's',
'.',
' ',
'N',
'u',
'n',
'c',
' ',
'e',
'u',
' ',
'o',
'd',
'i',
'o',
' ',
'd',
'i',
'g',
'n',
'i',
's',
's',
'i',
'm',
',',
' ',
'o',
'r',
'n',
'a',
'r',
'e',
' ',
'a',
'n',
't',
'e',
' ',
'g',
'r',
'a',
'v',
'i',
'd',
'a',
',',
' ',
'l',
'o',
'b',
'o',
'r',
't',
'i',
's',
' ',
'e',
'r',
'o',
's',
'.',
' ',
'C',
'r',
'a',
's',
' ',
's',
'e',
'm',
' ',
'e',
'x',
',',
' ',
'c',
'o',
'n',
's',
'e',
'c',
't',
'e',
't',
'u',
'r',
' ',
'p',
'u',
'l',
'v',
'i',
'n',
'a',
'r',
' ',
't',
'i',
'n',
'c',
'i',
'd',
'u',
'n',
't',
' ',
'e',
'u',
',',
' ',
'c',
'o',
'n',
'g',
'u',
'e',
' ',
'a',
' ',
'e',
'r',
'o',
's',
'.',
' ',
'C',
'u',
'r',
'a',
'b',
'i',
't',
'u',
'r',
' ',
'e',
'r',
'o',
's',
' ',
'e',
'r',
'a',
't',
',',
' ',
'p',
'e',
'l',
'l',
'e',
'n',
't',
'e',
's',
'q',
'u',
'e',
' ',
'e',
't',
' ',
'n',
'i',
'b',
'h',
' ',
'q',
'u',
'i',
's',
',',
' ',
'i',
'n',
't',
'e',
'r',
'd',
'u',
'm',
' ',
't',
'e',
'm',
'p',
'o',
'r',
' ',
'o',
'd',
'i',
'o',
'.',
' ',
'E',
't',
'i',
'a',
'm',
' ',
's',
'a',
'p',
'i',
'e',
'n',
' ',
's',
'a',
'p',
'i',
'e',
'n',
',',
' ',
'a',
'l',
'i',
'q',
'u',
'a',
'm',
' ',
'u',
't',
' ',
'a',
'l',
'i',
'q',
'u',
'a',
'm',
' ',
'a',
't',
',',
' ',
's',
'a',
'g',
'i',
't',
't',
'i',
's',
' ',
'e',
'u',
' ',
'm',
'a',
'g',
'n',
'a',
'.',
' ',
'M',
'a',
'e',
'c',
'e',
'n',
'a',
's',
' ',
'm',
'a',
'g',
'n',
'a',
' ',
'm',
'a',
'g',
'n',
'a',
',',
' ',
's',
'u',
's',
'c',
'i',
'p',
'i',
't',
' ',
'u',
't',
' ',
'l',
'o',
'r',
'e',
'm',
' ',
'u',
't',
',',
' ',
'v',
'a',
'r',
'i',
'u',
's',
' ',
'p',
'r',
'e',
't',
'i',
'u',
'm',
' ',
'f',
'e',
'l',
'i',
's',
'.',
' ',
'I',
'n',
't',
'e',
'g',
'e',
'r',
' ',
't',
'i',
'n',
'c',
'i',
'd',
'u',
'n',
't',
',',
' ',
'm',
'e',
't',
'u',
's',
' ',
'v',
'e',
'l',
' ',
's',
'o',
'l',
'l',
'i',
'c',
'i',
't',
'u',
'd',
'i',
'n',
' ',
'f',
'i',
'n',
'i',
'b',
'u',
's',
',',
' ',
'f',
'e',
'l',
'i',
's',
' ',
'e',
'r',
'a',
't',
' ',
'm',
'o',
'l',
'e',
's',
't',
'i',
'e',
' ',
'u',
'r',
'n',
'a',
',',
' ',
'a',
' ',
'c',
'o',
'n',
'd',
'i',
'm',
'e',
'n',
't',
'u',
'm',
' ',
'a',
'u',
'g',
'u',
'e',
' ',
'a',
'r',
'c',
'u',
' ',
'v',
'i',
't',
'a',
'e',
' ',
'r',
'i',
's',
'u',
's',
'.',
' ',
'E',
't',
'i',
'a',
'm',
' ',
'i',
'd',
' ',
's',
'a',
'g',
'i',
't',
't',
'i',
's',
' ',
'q',
'u',
'a',
'm',
'.',
' ',
'M',
'o',
'r',
'b',
'i',
' ',
'a',
' ',
'u',
'l',
't',
'r',
'i',
'c',
'i',
'e',
's',
' ',
'n',
'u',
'n',
'c',
'.',
' ',
'P',
'h',
'a',
's',
'e',
'l',
'l',
'u',
's',
' ',
'e',
'r',
'o',
's',
' ',
'r',
'i',
's',
'u',
's',
',',
' ',
'c',
'u',
'r',
's',
'u',
's',
' ',
'u',
'l',
'l',
'a',
'm',
'c',
'o',
'r',
'p',
'e',
'r',
' ',
'm',
'a',
's',
's',
'a',
' ',
's',
'e',
'd',
',',
' ',
'd',
'i',
'g',
'n',
'i',
's',
's',
'i',
'm',
' ',
'c',
'o',
'n',
's',
'e',
'q',
'u',
'a',
't',
' ',
'l',
'i',
'g',
'u',
'l',
'a',
'.',
' ',
'A',
'l',
'i',
'q',
'u',
'a',
'm',
' ',
't',
'u',
'r',
'p',
'i',
's',
' ',
'a',
'r',
'c',
'u',
',',
' ',
'a',
'c',
'c',
'u',
'm',
's',
'a',
'n',
' ',
'q',
'u',
'i',
's',
' ',
's',
'a',
'p',
'i',
'e',
'n',
' ',
'v',
'i',
't',
'a',
'e',
',',
' ',
'l',
'a',
'c',
'i',
'n',
'i',
'a',
' ',
'e',
'u',
'i',
's',
'm',
'o',
'd',
' ',
'n',
'i',
's',
'l',
'.',
' ',
'M',
'a',
'u',
'r',
'i',
's',
' ',
'i',
'd',
' ',
'f',
'e',
'l',
'i',
's',
' ',
's',
'e',
'm',
'!',0};
546 static const TAGID expected_str[] = { 0xc, 0x12, 0x18, 0x1e, 0x24, 0x2a, 0x30, 0x36 };
547 static const TAGID expected_tab[] = { 6, 0x18, 0x2a, 0x3c, 0x4e, 0x60, 0x846, 0x102c };
550 for (
n = 0;
n < (
sizeof(all) /
sizeof(all[0])); ++
n)
558 ok(
pdb !=
NULL,
"Expected a valid database\n");
565 for (
j = 0;
j <=
n; ++
j)
567 ok(tagstr == expected_str[
j],
"Expected tagstr to be 0x%x, was 0x%x for %u/%u\n", expected_str[
j], tagstr,
j,
n);
572 TAG tag = pSdbGetTagFromTagID(
pdb, tagstr);
574 size = pSdbGetTagDataSize(
pdb, tagstr);
575 ok(
size == 4,
"Expected datasize to be 4, was %u for %u/%u\n",
size,
j,
n);
576 data = pSdbGetStringTagPtr(
pdb, tagstr);
581 ok(tagstr ==
TAGID_NULL,
"Expected to be at the end for %u\n",
n);
585 expected_table = 0xc + (
n+1)*6;
586 ok(
table == expected_table,
"Expected to find a stringtable at 0x%x instead of 0x%x for %u\n", expected_table,
table,
n);
590 for (
j = 0;
j <=
n; ++
j)
592 ok(tagstr == (expected_tab[
j] + expected_table),
"Expected tagstr to be 0x%x, was 0x%x for %u/%u\n", (expected_tab[
j] + expected_table), tagstr,
j,
n);
597 TAG tag = pSdbGetTagFromTagID(
pdb, tagstr);
599 size = pSdbGetTagDataSize(
pdb, tagstr);
600 expected_size = (
lstrlenW(all[
j])+1) * 2;
601 ok(
size == expected_size,
"Expected datasize to be %u, was %u for %u/%u\n", expected_size,
size,
j,
n);
602 data = pSdbGetStringTagPtr(
pdb, tagstr);
607 ok(tagstr ==
TAGID_NULL,
"Expected to be at the end for %u\n",
n);
610 pSdbCloseDatabase(
pdb);
665#define match_strw_attr (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : match_strw_attr_imp
666#define match_dw_attr (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : match_dw_attr_imp
667#define match_qw_attr (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : match_qw_attr_imp
668#define match_guid_attr (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : match_guid_attr_imp
677 ok(iter !=
TAGID_NULL,
"expected a result, got TAGID_NULL\n");
682 ok(
result,
"expected SdbReadBinaryTag not to fail.\n");
686 result = pSdbGUIDToString(&
guid, guid_wstr, 50);
687 ok(
result,
"expected SdbGUIDToString not to fail.\n");
692 ok_str(guid_str,
"{e39b0eb0-55db-450b-9bd4-d20c9484260f}");
694 ok(pSdbGetDatabaseID(
pdb, &
guid2),
"expected SdbGetDatabaseID not to fail.\n");
706 TAGID shimref, inexclude, is_include;
713 ok(shimref !=
TAGID_NULL,
"Expected a valid shim ref, got NULL\n");
720 ok(inexclude !=
TAGID_NULL,
"Expected a valid in/exclude ref, got NULL\n");
725 ok(is_include ==
TAGID_NULL,
"Expected a NULL include ref, but got one anyway.\n");
728 inexclude = pSdbFindNextTag(
pdb, shimref, inexclude);
729 ok(inexclude !=
TAGID_NULL,
"Expected a valid in/exclude ref, got NULL\n");
734 ok(is_include !=
TAGID_NULL,
"Expected a valid include ref, got NULL\n");
740 ok(matching_file !=
TAGID_NULL,
"Expected to find atleast 1 matching file.\n");
744 ok(
num < 4,
"Too many matches, expected only 4!\n");
786 ok(0,
"unknown case: %d\n",
num);
788 matching_file = pSdbFindNextTag(
pdb, exe, matching_file);
791 ok(matching_file !=
TAGID_NULL,
"Did expect a secondary match on %d\n",
num);
798 ok(matching_file ==
TAGID_NULL,
"Did not expect a secondary match on %d\n",
num);
849 apphelp = pSdbFindNextTag(
pdb, apphelp, apphelp);
850 ok(apphelp ==
TAGID_NULL,
"Did not expect a secondary match on %d\n",
num);
863 ok(layer_tagid ==
TAGID_NULL,
"expected not to find a layer tagid, got %x\n", layer_tagid);
884 L"apphelp_name_allow",
885 L"apphelp_vendor_allow",
886 { 0x4e50c93f, 0xb863, 0x4dfa, { 0xba, 0xe2, 0xd8, 0x0e, 0xf4, 0xce, 0x5c, 0x89 } },
896 L"test_disallow.exe",
897 L"apphelp_name_disallow",
898 L"apphelp_vendor_disallow",
899 { 0x156720e1, 0xef98, 0x4d04, { 0x96, 0x5a, 0xd8, 0x5d, 0xe0, 0x5e, 0x6d, 0x9f } },
912 { 0xce70ef69, 0xa21d, 0x408b, { 0x84, 0x5b, 0xf9, 0x9e, 0xac, 0x06, 0x09, 0xe7 } },
913 L"test_checkfile.txt",
925 { 0xb4ead144, 0xf640, 0x4e4b, { 0x94, 0xc4, 0x0c, 0x7f, 0xa8, 0x66, 0x23, 0xb0 } },
935 L"test_unknown_file.exe",
936 L"apphelp_name_allow",
937 L"apphelp_vendor_allow",
938 { 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
958 ok(
num < 4,
"Too many matches, expected only 4!\n");
969 ok(apphelp !=
TAGID_NULL,
"Expected to find a valid apphelp match on %d.\n",
num);
975 ok(apphelp ==
TAGID_NULL,
"Did not expect an apphelp match on %d\n",
num);
989 exe = pSdbFindNextTag(
pdb,
root, exe);
991 ok(
num == 4,
"Expected to find 4 exe tags, found: %d\n",
num);
1003 L"http://reactos.org/disallow",
1004 L"apphelp_name_disallow",
1009 L"http://reactos.org/allow",
1010 L"apphelp_name_allow",
1022 ok(
num < 2,
"Too many matches, expected only 4!\n");
1034 apphelp = pSdbFindNextTag(
pdb,
root, apphelp);
1037 ok(
num == 2,
"Expected to find 2 layer tags, found: %d\n",
num);
1045 if (!pSdbGetDatabaseInformation || !pSdbFreeDatabaseInformation)
1047 skip(
"GetDatabaseInformation or SdbFreeDatabaseInformation not found\n");
1053 pSdbFreeDatabaseInformation(
NULL);
1057 ok(0,
"SdbFreeDatabaseInformation did not handle a NULL pointer very gracefully.\n");
1063 memset(pInfo, 0xDE,
sizeof(*pInfo) * 2);
1065 fResult = pSdbGetDatabaseInformation(
pdb, pInfo);
1066 ok(fResult,
"SdbGetDatabaseInformation failed\n");
1070 ok(
IsEqualGUID(GUID_DATABASE_TEST, pInfo->
Id),
"expected guids to be equal(%s:%s)\n",
1078 ok(pInfo->
dwMajor == 3,
"Expected pInfo->dwMajor to be 3, was: %d\n", pInfo->
dwMajor);
1079 ok(pInfo->
dwMinor == 0,
"Expected pInfo->dwMinor to be 0, was: %d\n", pInfo->
dwMinor);
1081 ok(pInfo[1].dwSomething == 4 || pInfo[1].dwSomething == 0xdededede,
"Something amiss: 0x%x\n", pInfo[1].dwSomething);
1082 ok(pInfo[1].dwMajor == 0xdededede,
"Cookie2 corrupt: 0x%x\n", pInfo[1].dwMajor);
1086 ok(pInfo->
dwMajor == 2,
"Expected pInfo->dwMajor to be 2, was: %d\n", pInfo->
dwMajor);
1087 ok(pInfo->
dwMinor == 1,
"Expected pInfo->dwMinor to be 1, was: %d\n", pInfo->
dwMinor);
1089 ok(pInfo[1].dwSomething == 0xdededede,
"Cookie1 corrupt: 0x%x\n", pInfo[1].dwSomething);
1090 ok(pInfo[1].dwMajor == 0xdededede,
"Cookie2 corrupt: 0x%x\n", pInfo[1].dwMajor);
1099 static const WCHAR path[] = {
't',
'e',
's',
't',
'_',
'd',
'b',
'.',
's',
'd',
'b',0};
1103 DWORD ver_hi, ver_lo;
1108 ver_hi = ver_lo = 0x12345678;
1109 ret = pSdbGetDatabaseVersion(
path, &ver_hi, &ver_lo);
1110 ok(
ret,
"Expected SdbGetDatabaseVersion to succeed\n");
1113 ok(ver_hi == 3,
"Expected ver_hi to be 3, was: %d\n", ver_hi);
1114 ok(ver_lo == 0,
"Expected ver_lo to be 0, was: %d\n", ver_lo);
1118 ok(ver_hi == 2,
"Expected ver_hi to be 2, was: %d\n", ver_hi);
1119 ok(ver_lo == 1,
"Expected ver_lo to be 1, was: %d\n", ver_lo);
1122 ver_hi = ver_lo = 0x12345678;
1123 ret = pSdbGetDatabaseVersion(
NULL, &ver_hi, &ver_lo);
1126 ok(!
ret,
"Expected SdbGetDatabaseVersion to fail\n");
1127 ok(ver_hi == 0,
"Expected ver_hi to be 0, was: 0x%x\n", ver_hi);
1128 ok(ver_lo == 0,
"Expected ver_lo to be 0, was: 0x%x\n", ver_lo);
1132 ok(
ret,
"Expected SdbGetDatabaseVersion to succeed\n");
1133 ok(ver_hi == 0x12345678,
"Expected ver_hi to be 0x12345678, was: 0x%x\n", ver_hi);
1134 ok(ver_lo == 0x12345678,
"Expected ver_lo to be 0x12345678, was: 0x%x\n", ver_lo);
1137 ver_hi = ver_lo = 0x12345678;
1138 ret = pSdbGetDatabaseVersion(
path + 1, &ver_hi, &ver_lo);
1141 ok(!
ret,
"Expected SdbGetDatabaseVersion to fail\n");
1142 ok(ver_hi == 0,
"Expected ver_hi to be 0, was: 0x%x\n", ver_hi);
1143 ok(ver_lo == 0,
"Expected ver_lo to be 0, was: 0x%x\n", ver_lo);
1147 ok(
ret,
"Expected SdbGetDatabaseVersion to succeed\n");
1148 ok(ver_hi == 0x12345678,
"Expected ver_hi to be 0x12345678, was: 0x%x\n", ver_hi);
1149 ok(ver_lo == 0x12345678,
"Expected ver_lo to be 0x12345678, was: 0x%x\n", ver_lo);
1153 ok(
pdb !=
NULL,
"unexpected NULL handle\n");
1163 ok_hex(tagLayer, (
int)tagAlt);
1164 ok_hex(tagLayer, (
int)tagAlt2);
1165 ok_hex(tagLayer, (
int)tagAlt3);
1173 pSdbCloseDatabase(
pdb);
1183 ok(pSdbGetDatabaseID(
pdb, &
guid),
"expected SdbGetDatabaseID not to fail.\n");
1188 skip(
"Not checking DB GUID, received a null pdb\n");
1193template<
typename SDBQUERYRESULT_T>
1198 ok_(
file,
line)(
query.adwExeFlags[
n] == 0,
"Expected adwExeFlags[%d] to be 0, was: %x for %d\n",
n,
query.adwExeFlags[0],
cur);
1207template<
typename SDBQUERYRESULT_T>
1212 SDBQUERYRESULT_T
query;
1231 ok(
ret == 0,
"SdbGetMatchingExe should have failed for %d.\n",
cur);
1242 ok(
ret == 0,
"SdbGetMatchingExe should have failed for %d.\n",
cur);
1254 ok(
ret,
"SdbGetMatchingExe should not fail for %d.\n",
cur);
1258 ok(
query.dwExeCount == exe_count,
"Expected dwExeCount to be %d, was %d for %d\n", exe_count,
query.dwExeCount,
cur);
1260 ok(
query.dwCustomSDBMap == 1,
"Expected dwCustomSDBMap to be 1, was %d for %d\n",
query.dwCustomSDBMap,
cur);
1261 ok(
query.dwLayerFlags == 0,
"Expected dwLayerFlags to be 0, was 0x%x for %d\n",
query.dwLayerFlags,
cur);
1270 expect_flags = 0x101;
1273 expect_flags = 0x121;
1275 expect_flags &= ~0x20;
1279 expect_flags &= ~0x100;
1281 ok(
query.dwFlags == expect_flags,
"Expected dwFlags to be 0x%x, was 0x%x for %d\n", expect_flags,
query.dwFlags,
cur);
1285 ok(
query.atrExes[
n] == 0,
"Expected atrExes[%d] to be 0, was: %x for %d\n",
n,
query.atrExes[
n],
cur);
1292 ok(
query.atrLayers[
n] == 0,
"Expected atrLayers[%d] to be 0, was: %x for %d\n",
n,
query.atrLayers[0],
cur);
1301 if (
query.atrExes[0])
1305 ret = pSdbTagRefToTagID(hsdb,
query.atrExes[0], &
pdb, &tagid);
1306 ok(
ret,
"SdbTagRefToTagID failed for %d.\n",
cur);
1307 ok(
pdb !=
NULL &&
pdb != (
PDB)0x12345678,
"SdbTagRefToTagID failed to return a pdb for %d.\n",
cur);
1308 ok(tagid != 0 && tagid != 0x76543210,
"SdbTagRefToTagID failed to return a tagid for %d.\n",
cur);
1313 TAG tag = pSdbGetTagFromTagID(
pdb, tagid);
1319 ret = pSdbTagIDToTagRef(hsdb,
pdb, tagid, &tr);
1320 ok(
ret,
"SdbTagIDToTagRef failed for %d.\n",
cur);
1321 ok(tr ==
query.atrExes[0],
"Expected tr to be 0x%x, was 0x%x for %d.\n",
query.atrExes[0], tr,
cur);
1325 skip(
"Skipping a bunch of tests because of an invalid pointer\n");
1333 ret = pSdbTagRefToTagID(hsdb,
query.atrLayers[0], &
pdb, &tagid);
1334 ok(
ret,
"SdbTagRefToTagID failed for %d.\n",
cur);
1335 ok(
pdb !=
NULL &&
pdb != (
PDB)0x12345678,
"SdbTagRefToTagID failed to return a pdb for %d.\n",
cur);
1336 ok(tagid != 0 && tagid != 0x76543210,
"SdbTagRefToTagID failed to return a tagid for %d.\n",
cur);
1341 TAG tag = pSdbGetTagFromTagID(
pdb, tagid);
1347 ret = pSdbTagIDToTagRef(hsdb,
pdb, tagid, &tr);
1348 ok(
ret,
"SdbTagIDToTagRef failed for %d.\n",
cur);
1353 skip(
"Skipping a bunch of tests because of an invalid pointer\n");
1359 ret = pSdbTagRefToTagID(hsdb, 0, &
pdb, &tagid);
1360 ok(
pdb !=
NULL &&
pdb != (
PDB)0x12345678,
"Expected pdb to be set to a valid pdb, was: %p\n",
pdb);
1361 ok(tagid == 0,
"Expected tagid to be set to 0, was: 0x%x\n", tagid);
1372 ok(!
ret,
"SdbGetMatchingExe should not succeed for %d.\n",
cur);
1387template<
typename SDBQUERYRESULT_T>
1408 ok(hsdb !=
NULL,
"Expected a valid database handle\n");
1412 skip(
"SdbInitDatabase not implemented?\n");
1419 test_mode_generic<SDBQUERYRESULT_T>(
workdir, hsdb,
n);
1420 pSdbReleaseDatabase(hsdb);
1442 ok(dwWritten ==
Size,
"WriteFile wrote %u bytes instead of %u\n", dwWritten,
Size);
1468template<
typename SDBQUERYRESULT_T>
1473 SDBQUERYRESULT_T
query;
1474 TAGID dbtag, exetag, tagid;
1480 ret = pSdbTagRefToTagID(hsdb, 0, &
pdb, &tagid);
1481 ok(
pdb !=
NULL &&
pdb != (
PDB)0x12345678,
"Expected pdb to be set to a valid pdb, was: %p\n",
pdb);
1484 ok(dbtag !=
TAGID_NULL,
"Expected to get a valid TAG_DATABASE\n");
1486 for (exetag = pSdbFindFirstTag(
pdb, dbtag,
TAG_EXE); exetag; exetag = pSdbFindNextTag(
pdb, dbtag, exetag))
1489 Vendor = pSdbGetStringTagPtr(
pdb, tagid);
1492 Succeed = !
_wcsicmp(Vendor,
L"Succeed");
1493 if (!Succeed &&
_wcsicmp(Vendor,
L"Fail"))
1501 TestName = pSdbGetStringTagPtr(
pdb, tagid);
1509 DWORD exe_count = Succeed ? 1 : 0;
1513 skip(
"As long as we do not have indexes, we will hit a bug in W2k3\n");
1517[
Info][SdbpSearchDB ] Searching database with
no index.
1518[Err ][SdbpSearchDB ] No DATABASE
tag found.
1528 ok(
query.dwExeCount == exe_count,
"Expected dwExeCount to be %d, was %d for %s\n", exe_count,
query.dwExeCount,
wine_dbgstr_w(TestName));
1535template<
typename SDBQUERYRESULT_T>
1556 ok(hsdb !=
NULL,
"Expected a valid database handle\n");
1560 skip(
"SdbInitDatabase not implemented?\n");
1565 test_match_ex<SDBQUERYRESULT_T>(
workdir, hsdb);
1566 pSdbReleaseDatabase(hsdb);
1571 ok(0,
"Unable to extract database\n");
1603 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1609 ret = pSdbTagRefToTagID(hsdb,
size - 1, &
pdb, &db);
1610 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1612 ok(db == (
size - 1),
"Expected %u, got: %u\n",
size - 1, db);
1616 ret = pSdbTagIDToTagRef(hsdb,
pdb, db, &tr);
1617 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1618 ok(tr == (
size - 1),
"Expected %u, got: %u\n",
size - 1, tr);
1622 ret = pSdbTagRefToTagID(hsdb,
size, &
pdb, &db);
1623 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1625 ok(db ==
size,
"Expected %u, got: %u\n",
size, db);
1628 ret = pSdbTagIDToTagRef(hsdb,
pdb, db, &tr);
1629 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1630 ok(tr ==
size,
"Expected %u, got: %u\n",
size, tr);
1634 ret = pSdbTagRefToTagID(hsdb,
size + 1, &
pdb, &db);
1635 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1637 ok(db == (
size + 1),
"Expected %u, got: %u\n",
size + 1, db);
1640 ret = pSdbTagIDToTagRef(hsdb,
pdb, db, &tr);
1641 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1642 ok(tr == (
size + 1),
"Expected %u, got: %u\n", (
size + 1), tr);
1646 ret = pSdbTagRefToTagID(hsdb, 0x0fffffff, &
pdb, &db);
1647 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1649 ok(db == 0x0fffffff,
"Expected %u, got: %u\n", 0x0fffffff, db);
1652 ret = pSdbTagIDToTagRef(hsdb,
pdb, db, &tr);
1653 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1654 ok(tr == 0x0fffffff,
"Expected %u, got: %u\n", 0x0fffffff, tr);
1658 ret = pSdbTagRefToTagID(hsdb, 0x10000000, &
pdb, &db);
1659 ok(
ret ==
FALSE,
"Expected ret to be FALSE, was: %d\n",
ret);
1661 ok(db == 0,
"Expected no result, got: 0x%x\n", db);
1664 ret = pSdbTagIDToTagRef(hsdb,
pdb, 0x10000000, &tr);
1665 ok(
ret ==
FALSE,
"Expected ret to be TRUE, was: %d\n",
ret);
1666 ok(tr == 0,
"Expected %u, got: %u\n", 0, tr);
1671 ok(
ret !=
FALSE,
"Expected ret to be TRUE, was: %d\n",
ret);
1672 ok(
pdb !=
NULL,
"Expected pdb to be valid\n");
1676 skip(
"Cannot run tests without pdb\n");
1684 child = pSdbGetFirstChild(
pdb, db);
1690 ret = pSdbTagRefToTagID(hsdb,
child, &pdb_res, &tagid_res);
1691 ok(
ret,
"Expected SdbTagRefToTagID to succeed\n");
1695 ret = pSdbTagIDToTagRef(hsdb, pdb_res, tagid_res, &tr);
1696 ok(
ret,
"Expected SdbTagIDToTagRef to succeed\n");
1697 ok_hex(tr, (
int)tagid_res);
1704 skip(
"Cannot run tests without valid db tag\n");
1709 tr = pSdbGetLayerTagRef(hsdb,
L"TestNewMode");
1713 tr = pSdbGetLayerTagRef(hsdb,
L"256Color");
1716 pSdbReleaseDatabase(hsdb);
1728 DWORD dwBufferSize, dwDataType, dwRet;
1733 ok(
ret !=
FALSE,
"Expected ret to be TRUE, was: %d\n",
ret);
1734 ok(
pdb !=
NULL,
"Expected pdb to be valid\n");
1738 skip(
"Cannot run tests without pdb\n");
1743 ok(db !=
NULL,
"Expected db to be valid\n");
1746 skip(
"Cannot run tests without db\n");
1751 ok(
layer !=
NULL,
"Expected layer to be valid\n");
1754 skip(
"Cannot run tests without layer\n");
1759 dwBufferSize =
sizeof(
Buffer);
1760 dwDataType = 0x12345;
1762 dwRet = pSdbQueryDataExTagID(
pdb,
layer,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize, &tiData);
1767 ok(tiData !=
NULL && tiData != 0x111111,
"Expected tiData, got NULL\n");
1771 dwBufferSize =
sizeof(
Buffer);
1780 dwBufferSize =
sizeof(
Buffer);
1794 dwBufferSize =
sizeof(
Buffer);
1801 dwBufferSize =
sizeof(
Buffer);
1808 dwBufferSize =
sizeof(
Buffer);
1809 dwDataType = 0x12345;
1811 dwRet = pSdbQueryDataExTagID(
pdb,
layer,
L"TESTDATA2", &dwDataType,
Buffer, &dwBufferSize, &tiData);
1816 ok(tiData !=
NULL && tiData != 0x111111,
"Expected tiData, got NULL\n");
1821 dwBufferSize =
sizeof(
Buffer);
1822 dwDataType = 0x12345;
1824 dwRet = pSdbQueryDataExTagID(
pdb,
layer,
L"TESTDATA3", &dwDataType,
Buffer, &dwBufferSize, &tiData);
1830 ok(tiData !=
NULL && tiData != 0x111111,
"Expected tiData, got NULL\n");
1835 dwBufferSize =
sizeof(
Buffer);
1836 dwDataType = 0x12345;
1838 dwRet = pSdbQueryDataEx(hsdb,
layer,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize, &trData);
1843 ok(trData !=
NULL && trData != 0x111111,
"Expected trData, got NULL\n");
1847 dwBufferSize =
sizeof(
Buffer);
1848 dwDataType = 0x12345;
1849 dwRet = pSdbQueryData(hsdb,
layer,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize);
1856 ok(exe !=
NULL,
"Expected exe to be valid\n");
1859 skip(
"Cannot run tests without exe\n");
1864 dwBufferSize =
sizeof(
Buffer);
1865 dwDataType = 0x12345;
1867 dwRet = pSdbQueryDataExTagID(
pdb, exe,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize, &tiData);
1869 ok_hex(dwDataType, 0x12345);
1872 ok(tiData == 0x111111,
"Expected 0x111111, got 0x%x\n", tiData);
1876 dwBufferSize =
sizeof(
Buffer);
1877 dwDataType = 0x12345;
1879 dwRet = pSdbQueryDataEx(hsdb, exe,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize, &trData);
1881 ok_hex(dwDataType, 0x12345);
1885 ok(trData == 0,
"Expected 0, got 0x%x\n", trData);
1887 ok(trData == 0x111111,
"Expected 0x111111, got 0x%x\n", trData);
1891 dwBufferSize =
sizeof(
Buffer);
1892 dwDataType = 0x12345;
1893 dwRet = pSdbQueryData(hsdb, exe,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize);
1895 ok_hex(dwDataType, 0x12345);
1921 ok(hsdb !=
NULL,
"Expected a valid database handle\n");
1925 skip(
"SdbInitDatabase not implemented?\n");
1930 pSdbReleaseDatabase(hsdb);
1935 ok(0,
"Unable to extract database\n");
1947 static WCHAR wide_string[100] = { 0 };
1951 result = pSdbMakeIndexKeyFromString(wide_string);
1955#define expect_indexA (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : expect_indexA_imp
1960 static WCHAR tmp[] = { 0xabba, 0xbcde, 0x2020, 0x20, 0x4444, 0 };
1961 static WCHAR tmp2[] = { 0xabba, 0xbcde, 0x20, 0x4444, 0 };
1962 static WCHAR tmp3[] = { 0x20, 0xbcde, 0x4041, 0x4444, 0 };
1963 static WCHAR tmp4[] = { 0x20, 0xbcde, 0x4041, 0x4444, 0x4444, 0 };
1964 static WCHAR tmp5[] = { 0x2020, 0xbcde, 0x4041, 0x4444, 0x4444, 0 };
1965 static WCHAR tmp6 [] = { 0x20, 0xbcde, 0x4041, 0x4444, 0x4444, 0x4444, 0};
1966 static WCHAR tmp7 [] = { 0xbcde, 0x4041, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0};
1967 static WCHAR tmp8 [] = { 0xbc00, 0x4041, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0};
1972 pSdbMakeIndexKeyFromString(
NULL);
1993 expect_indexA(
"ABABABABZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ", 0x4142414241424142);
1997 result = pSdbMakeIndexKeyFromString(tmp);
2001 result = pSdbMakeIndexKeyFromString(tmp2);
2005 result = pSdbMakeIndexKeyFromString(tmp3);
2009 result = pSdbMakeIndexKeyFromString(tmp4);
2013 result = pSdbMakeIndexKeyFromString(tmp5);
2017 result = pSdbMakeIndexKeyFromString(tmp6);
2021 result = pSdbMakeIndexKeyFromString(tmp7);
2025 result = pSdbMakeIndexKeyFromString(tmp8);
2043 trace(
"SdbGetMatchingExe didnt do anything, cannot determine SDBQUERYRESULT size\n");
2061 trace(
"Unknown size: %i\n",
n);
2087 *(
void**)&pSdbGetDatabaseVersion = (
void *)
GetProcAddress(
hdll,
"SdbGetDatabaseVersion");
2089 *(
void**)&pSdbCloseDatabaseWrite = (
void *)
GetProcAddress(
hdll,
"SdbCloseDatabaseWrite");
2095 *(
void**)&pSdbWriteBinaryTagFromFile = (
void *)
GetProcAddress(
hdll,
"SdbWriteBinaryTagFromFile");
2097 *(
void**)&pSdbWriteStringRefTag = (
void *)
GetProcAddress(
hdll,
"SdbWriteStringRefTag");
2098 *(
void**)&pSdbBeginWriteListTag = (
void *)
GetProcAddress(
hdll,
"SdbBeginWriteListTag");
2102 *(
void**)&pSdbFindFirstNamedTag = (
void *)
GetProcAddress(
hdll,
"SdbFindFirstNamedTag");
2109 *(
void**)&pSdbGetBinaryTagData = (
void *)
GetProcAddress(
hdll,
"SdbGetBinaryTagData");
2120 *(
void**)&pSdbMakeIndexKeyFromString = (
void *)
GetProcAddress(
hdll,
"SdbMakeIndexKeyFromString");
2123 *(
void**)&pSdbQueryDataExTagID = (
void *)
GetProcAddress(
hdll,
"SdbQueryDataExTagID");
2125 *(
void**)&pSdbGetDatabaseInformation = (
void *)
GetProcAddress(
hdll,
"SdbGetDatabaseInformation");
2126 *(
void**)&pSdbFreeDatabaseInformation = (
void *)
GetProcAddress(
hdll,
"SdbFreeDatabaseInformation");
2135 test_MatchApplications<SDBQUERYRESULT_2k3>();
2136 test_MatchApplicationsEx<SDBQUERYRESULT_2k3>();
2139 test_MatchApplications<SDBQUERYRESULT_VISTA>();
2140 test_MatchApplicationsEx<SDBQUERYRESULT_VISTA>();
2143 skip(
"Skipping tests with SDBQUERYRESULT due to a wrong size reported\n");
2148 skip(
"test_SecondaryDB()\n");
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
DWORD get_module_version(HMODULE mod)
void silence_debug_output(void)
#define SDBQUERYRESULT_EXPECTED_SIZE_2k3
#define SDBQUERYRESULT_EXPECTED_SIZE_VISTA
#define ok_hex(expression, result)
#define ok_int(expression, result)
static void test_GetDatabaseInformationEmpty(PDB pdb)
#define TAG_UPTO_BIN_FILE_VERSION
static void check_adwExeFlags(DWORD adwExeFlags_0, SDBQUERYRESULT_T &query, const char *file, int line, size_t cur)
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
static TAGREF LPCWSTR lpszDataName
static void match_dw_attr_imp(PDB pdb, TAGID parent, TAG find, DWORD compare)
#define TAG_ORIGINAL_FILENAME
static void check_db_apphelp(PDB pdb, TAGID root)
#define TAG_LINKER_VERSION
#define TAG_UPTO_LINK_DATE
static PDB_INFORMATION information
struct _DB_INFORMATION DB_INFORMATION
static void test_GetDatabaseInformation(PDB pdb)
#define TAG_FILE_DESCRIPTION
#define TAG_BIN_FILE_VERSION
static void test_mode_generic(const WCHAR *workdir, HSDB hsdb, size_t cur)
static bool extract_resource(const WCHAR *Filename, LPCWSTR ResourceName)
#define TAG_APP_NAME_RC_ID
static void test_is_testdb(PDB pdb)
static LPCWSTR LPCWSTR LPCWSTR DWORD PSDBQUERYRESULT_VISTA result
static LPCWSTR LPCWSTR LPCWSTR DWORD flags
static void test_IndexKeyFromString(void)
static void Write(HANDLE file, LPCVOID buffer, DWORD size)
static struct @1592 test_layerdata[2]
static int validate_SDBQUERYRESULT_size()
#define HID_DATABASE_FULLPATH
static void test_MatchApplicationsEx(void)
#define TAG_UPTO_BIN_PRODUCT_VERSION
static TAGREF PDB TAGID * ptiWhich
#define TAG_LEGAL_COPYRIGHT
static void test_Sdb(void)
static TAGID TAGID TAGID LPCWSTR find_name
#define TAG_SUMMARY_MSG_RC_ID
static void test_CheckDatabaseManually(void)
static void check_db_properties(PDB pdb, TAGID root)
#define TAG_MATCHING_FILE
#define TAG_PROBLEMSEVERITY
static void check_matching_file(PDB pdb, TAGID exe, TAGID matching_file, int num)
static TAGREF LPCWSTR LPDWORD lpdwDataType
static void test_TagRef(void)
const WCHAR * apphelp_details
#define TAG_COMPILER_VERSION
const WCHAR * apphelp_title
static void test_MatchApplications(void)
#define TAG_APPHELP_DETAILS
static void test_write_ex(void)
static void check_db_layer(PDB pdb, TAGID layer)
static TAGID LPCWSTR LPDWORD LPVOID LPDWORD TAGID * ptiData
struct _DB_INFORMATION * PDB_INFORMATION
static PDB TAGID TAGREF * ptrWhich
static void match_strw_attr_imp(PDB pdb, TAGID parent, TAG find, const WCHAR *compare)
static void match_qw_attr_imp(PDB pdb, TAGID parent, TAG find, QWORD compare)
#define TAG_BIN_PRODUCT_VERSION
static void test_Data(void)
static void check_db_exes(PDB pdb, TAGID root)
static BOOL write_raw_file(const WCHAR *FileName, const void *Data, DWORD Size)
static struct @1591 test_exedata[5]
static void test_stringtable()
static GUID *static SIZE_T
#define TAG_INTERNAL_NAME
static LPCWSTR LPCWSTR module_name
#define TAG_VENDOR_NAME_RC_ID
static LPCWSTR LPCWSTR LPCWSTR env
#define TAG_APPHELP_TITLE
static void check_matching_layer(PDB pdb, TAGID layer, int num)
#define TAG_PRODUCT_VERSION
static void test_DataTags(HSDB hsdb)
static void write_db_strings(const WCHAR *name, const WCHAR *data[], size_t count)
static void expect_indexA_imp(const char *text, LONGLONG expected)
static TAGID TAGID TAGID nametag
static TAGREF LPCWSTR LPDWORD LPVOID LPDWORD TAGREF * ptrData
static void test_match_ex(const WCHAR *workdir, HSDB hsdb)
static void match_guid_attr_imp(PDB pdb, TAGID parent, TAG find, const GUID *compare)
#define TAG_STRINGTABLE_ITEM
static GUID *static PCWSTR
static TAGREF LPCWSTR LPDWORD LPVOID LPDWORD lpcbBufferSize
static void check_matching_apphelp(PDB pdb, TAGID apphelp, int num)
#define ERROR_INSUFFICIENT_BUFFER
static CHAR AppName[MAX_PATH]
static WCHAR no[MAX_STRING_RESOURCE_LEN]
static const WCHAR empty[]
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define FILE_ATTRIBUTE_NORMAL
#define WideCharToMultiByte
#define MultiByteToWideChar
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableA(IN LPCSTR lpName, IN LPCSTR lpValue)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
VOID WINAPI GetSystemTime(OUT LPSYSTEMTIME lpSystemTime)
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
IN PVCB IN PBCB OUT PDIRENT IN USHORT IN POEM_STRING Filename
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLuint GLint GLint layer
const GLuint GLenum const GLvoid * binary
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define EXCEPTION_EXECUTE_HANDLER
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
static char workdir[MAX_PATH]
static const WCHAR path1[]
static const WCHAR path2[]
NTSYSAPI BOOLEAN NTAPI RtlDosPathNameToNtPathName_U(_In_opt_z_ PCWSTR DosPathName, _Out_ PUNICODE_STRING NtPathName, _Out_opt_ PCWSTR *NtFileNamePart, _Out_opt_ PRTL_RELATIVE_NAME_U DirectoryInfo)
static BOOL IsUserAdmin(VOID)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualGUID(rguid1, rguid2)
#define _SEH2_EXCEPT(...)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
void __winetest_cdecl winetest_ok(int condition, const char *msg,...)
#define _WIN32_WINNT_WS03
#define _WIN32_WINNT_VISTA
static char tmpdir[MAX_PATH]
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
DWORD WINAPI GetLastError(void)
#define UnlockResource(handle)
#define MAKEINTRESOURCEW(i)