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");
1196 PSID AdministratorsGroup;
1202 &AdministratorsGroup);
1214template<
typename SDBQUERYRESULT_T>
1219 ok_(
file,
line)(
query.adwExeFlags[
n] == 0,
"Expected adwExeFlags[%d] to be 0, was: %x for %d\n",
n,
query.adwExeFlags[0],
cur);
1228template<
typename SDBQUERYRESULT_T>
1233 SDBQUERYRESULT_T
query;
1252 ok(
ret == 0,
"SdbGetMatchingExe should have failed for %d.\n",
cur);
1263 ok(
ret == 0,
"SdbGetMatchingExe should have failed for %d.\n",
cur);
1275 ok(
ret,
"SdbGetMatchingExe should not fail for %d.\n",
cur);
1279 ok(
query.dwExeCount == exe_count,
"Expected dwExeCount to be %d, was %d for %d\n", exe_count,
query.dwExeCount,
cur);
1281 ok(
query.dwCustomSDBMap == 1,
"Expected dwCustomSDBMap to be 1, was %d for %d\n",
query.dwCustomSDBMap,
cur);
1282 ok(
query.dwLayerFlags == 0,
"Expected dwLayerFlags to be 0, was 0x%x for %d\n",
query.dwLayerFlags,
cur);
1291 expect_flags = 0x101;
1294 expect_flags = 0x121;
1296 expect_flags &= ~0x20;
1300 expect_flags &= ~0x100;
1302 ok(
query.dwFlags == expect_flags,
"Expected dwFlags to be 0x%x, was 0x%x for %d\n", expect_flags,
query.dwFlags,
cur);
1306 ok(
query.atrExes[
n] == 0,
"Expected atrExes[%d] to be 0, was: %x for %d\n",
n,
query.atrExes[
n],
cur);
1313 ok(
query.atrLayers[
n] == 0,
"Expected atrLayers[%d] to be 0, was: %x for %d\n",
n,
query.atrLayers[0],
cur);
1322 if (
query.atrExes[0])
1326 ret = pSdbTagRefToTagID(hsdb,
query.atrExes[0], &
pdb, &tagid);
1327 ok(
ret,
"SdbTagRefToTagID failed for %d.\n",
cur);
1328 ok(
pdb !=
NULL &&
pdb != (
PDB)0x12345678,
"SdbTagRefToTagID failed to return a pdb for %d.\n",
cur);
1329 ok(tagid != 0 && tagid != 0x76543210,
"SdbTagRefToTagID failed to return a tagid for %d.\n",
cur);
1334 TAG tag = pSdbGetTagFromTagID(
pdb, tagid);
1340 ret = pSdbTagIDToTagRef(hsdb,
pdb, tagid, &tr);
1341 ok(
ret,
"SdbTagIDToTagRef failed for %d.\n",
cur);
1342 ok(tr ==
query.atrExes[0],
"Expected tr to be 0x%x, was 0x%x for %d.\n",
query.atrExes[0], tr,
cur);
1346 skip(
"Skipping a bunch of tests because of an invalid pointer\n");
1354 ret = pSdbTagRefToTagID(hsdb,
query.atrLayers[0], &
pdb, &tagid);
1355 ok(
ret,
"SdbTagRefToTagID failed for %d.\n",
cur);
1356 ok(
pdb !=
NULL &&
pdb != (
PDB)0x12345678,
"SdbTagRefToTagID failed to return a pdb for %d.\n",
cur);
1357 ok(tagid != 0 && tagid != 0x76543210,
"SdbTagRefToTagID failed to return a tagid for %d.\n",
cur);
1362 TAG tag = pSdbGetTagFromTagID(
pdb, tagid);
1368 ret = pSdbTagIDToTagRef(hsdb,
pdb, tagid, &tr);
1369 ok(
ret,
"SdbTagIDToTagRef failed for %d.\n",
cur);
1374 skip(
"Skipping a bunch of tests because of an invalid pointer\n");
1380 ret = pSdbTagRefToTagID(hsdb, 0, &
pdb, &tagid);
1381 ok(
pdb !=
NULL &&
pdb != (
PDB)0x12345678,
"Expected pdb to be set to a valid pdb, was: %p\n",
pdb);
1382 ok(tagid == 0,
"Expected tagid to be set to 0, was: 0x%x\n", tagid);
1393 ok(!
ret,
"SdbGetMatchingExe should not succeed for %d.\n",
cur);
1408template<
typename SDBQUERYRESULT_T>
1429 ok(hsdb !=
NULL,
"Expected a valid database handle\n");
1433 skip(
"SdbInitDatabase not implemented?\n");
1440 test_mode_generic<SDBQUERYRESULT_T>(
workdir, hsdb,
n);
1441 pSdbReleaseDatabase(hsdb);
1463 ok(dwWritten ==
Size,
"WriteFile wrote %u bytes instead of %u\n", dwWritten,
Size);
1489template<
typename SDBQUERYRESULT_T>
1494 SDBQUERYRESULT_T
query;
1495 TAGID dbtag, exetag, tagid;
1501 ret = pSdbTagRefToTagID(hsdb, 0, &
pdb, &tagid);
1502 ok(
pdb !=
NULL &&
pdb != (
PDB)0x12345678,
"Expected pdb to be set to a valid pdb, was: %p\n",
pdb);
1505 ok(dbtag !=
TAGID_NULL,
"Expected to get a valid TAG_DATABASE\n");
1507 for (exetag = pSdbFindFirstTag(
pdb, dbtag,
TAG_EXE); exetag; exetag = pSdbFindNextTag(
pdb, dbtag, exetag))
1510 Vendor = pSdbGetStringTagPtr(
pdb, tagid);
1513 Succeed = !
wcsicmp(Vendor,
L"Succeed");
1514 if (!Succeed &&
wcsicmp(Vendor,
L"Fail"))
1522 TestName = pSdbGetStringTagPtr(
pdb, tagid);
1530 DWORD exe_count = Succeed ? 1 : 0;
1534 skip(
"As long as we do not have indexes, we will hit a bug in W2k3\n");
1538[
Info][SdbpSearchDB ] Searching database with
no index.
1539[Err ][SdbpSearchDB ] No DATABASE
tag found.
1549 ok(
query.dwExeCount == exe_count,
"Expected dwExeCount to be %d, was %d for %s\n", exe_count,
query.dwExeCount,
wine_dbgstr_w(TestName));
1556template<
typename SDBQUERYRESULT_T>
1577 ok(hsdb !=
NULL,
"Expected a valid database handle\n");
1581 skip(
"SdbInitDatabase not implemented?\n");
1586 test_match_ex<SDBQUERYRESULT_T>(
workdir, hsdb);
1587 pSdbReleaseDatabase(hsdb);
1592 ok(0,
"Unable to extract database\n");
1626 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1632 ret = pSdbTagRefToTagID(hsdb,
size - 1, &
pdb, &db);
1633 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1635 ok(db == (
size - 1),
"Expected %u, got: %u\n",
size - 1, db);
1639 ret = pSdbTagIDToTagRef(hsdb,
pdb, db, &tr);
1640 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1641 ok(tr == (
size - 1),
"Expected %u, got: %u\n",
size - 1, tr);
1645 ret = pSdbTagRefToTagID(hsdb,
size, &
pdb, &db);
1646 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1648 ok(db ==
size,
"Expected %u, got: %u\n",
size, db);
1651 ret = pSdbTagIDToTagRef(hsdb,
pdb, db, &tr);
1652 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1653 ok(tr ==
size,
"Expected %u, got: %u\n",
size, tr);
1657 ret = pSdbTagRefToTagID(hsdb,
size + 1, &
pdb, &db);
1658 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1660 ok(db == (
size + 1),
"Expected %u, got: %u\n",
size + 1, db);
1663 ret = pSdbTagIDToTagRef(hsdb,
pdb, db, &tr);
1664 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1665 ok(tr == (
size + 1),
"Expected %u, got: %u\n", (
size + 1), tr);
1669 ret = pSdbTagRefToTagID(hsdb, 0x0fffffff, &
pdb, &db);
1670 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1672 ok(db == 0x0fffffff,
"Expected %u, got: %u\n", 0x0fffffff, db);
1675 ret = pSdbTagIDToTagRef(hsdb,
pdb, db, &tr);
1676 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1677 ok(tr == 0x0fffffff,
"Expected %u, got: %u\n", 0x0fffffff, tr);
1681 ret = pSdbTagRefToTagID(hsdb, 0x10000000, &
pdb, &db);
1682 ok(
ret ==
FALSE,
"Expected ret to be FALSE, was: %d\n",
ret);
1684 ok(db == 0,
"Expected no result, got: 0x%x\n", db);
1687 ret = pSdbTagIDToTagRef(hsdb,
pdb, 0x10000000, &tr);
1688 ok(
ret ==
FALSE,
"Expected ret to be TRUE, was: %d\n",
ret);
1689 ok(tr == 0,
"Expected %u, got: %u\n", 0, tr);
1694 ok(
ret !=
FALSE,
"Expected ret to be TRUE, was: %d\n",
ret);
1695 ok(
pdb !=
NULL,
"Expected pdb to be valid\n");
1699 skip(
"Cannot run tests without pdb\n");
1707 child = pSdbGetFirstChild(
pdb, db);
1713 ret = pSdbTagRefToTagID(hsdb,
child, &pdb_res, &tagid_res);
1714 ok(
ret,
"Expected SdbTagRefToTagID to succeed\n");
1718 ret = pSdbTagIDToTagRef(hsdb, pdb_res, tagid_res, &tr);
1719 ok(
ret,
"Expected SdbTagIDToTagRef to succeed\n");
1720 ok_hex(tr, (
int)tagid_res);
1727 skip(
"Cannot run tests without valid db tag\n");
1732 tr = pSdbGetLayerTagRef(hsdb,
L"TestNewMode");
1736 tr = pSdbGetLayerTagRef(hsdb,
L"256Color");
1739 pSdbReleaseDatabase(hsdb);
1751 DWORD dwBufferSize, dwDataType, dwRet;
1756 ok(
ret !=
FALSE,
"Expected ret to be TRUE, was: %d\n",
ret);
1757 ok(
pdb !=
NULL,
"Expected pdb to be valid\n");
1761 skip(
"Cannot run tests without pdb\n");
1766 ok(db !=
NULL,
"Expected db to be valid\n");
1769 skip(
"Cannot run tests without db\n");
1774 ok(
layer !=
NULL,
"Expected layer to be valid\n");
1777 skip(
"Cannot run tests without layer\n");
1782 dwBufferSize =
sizeof(
Buffer);
1783 dwDataType = 0x12345;
1785 dwRet = pSdbQueryDataExTagID(
pdb,
layer,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize, &tiData);
1790 ok(tiData !=
NULL && tiData != 0x111111,
"Expected tiData, got NULL\n");
1794 dwBufferSize =
sizeof(
Buffer);
1803 dwBufferSize =
sizeof(
Buffer);
1817 dwBufferSize =
sizeof(
Buffer);
1824 dwBufferSize =
sizeof(
Buffer);
1831 dwBufferSize =
sizeof(
Buffer);
1832 dwDataType = 0x12345;
1834 dwRet = pSdbQueryDataExTagID(
pdb,
layer,
L"TESTDATA2", &dwDataType,
Buffer, &dwBufferSize, &tiData);
1839 ok(tiData !=
NULL && tiData != 0x111111,
"Expected tiData, got NULL\n");
1844 dwBufferSize =
sizeof(
Buffer);
1845 dwDataType = 0x12345;
1847 dwRet = pSdbQueryDataExTagID(
pdb,
layer,
L"TESTDATA3", &dwDataType,
Buffer, &dwBufferSize, &tiData);
1853 ok(tiData !=
NULL && tiData != 0x111111,
"Expected tiData, got NULL\n");
1858 dwBufferSize =
sizeof(
Buffer);
1859 dwDataType = 0x12345;
1861 dwRet = pSdbQueryDataEx(hsdb,
layer,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize, &trData);
1866 ok(trData !=
NULL && trData != 0x111111,
"Expected trData, got NULL\n");
1870 dwBufferSize =
sizeof(
Buffer);
1871 dwDataType = 0x12345;
1872 dwRet = pSdbQueryData(hsdb,
layer,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize);
1879 ok(exe !=
NULL,
"Expected exe to be valid\n");
1882 skip(
"Cannot run tests without exe\n");
1887 dwBufferSize =
sizeof(
Buffer);
1888 dwDataType = 0x12345;
1890 dwRet = pSdbQueryDataExTagID(
pdb, exe,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize, &tiData);
1892 ok_hex(dwDataType, 0x12345);
1895 ok(tiData == 0x111111,
"Expected 0x111111, got 0x%x\n", tiData);
1899 dwBufferSize =
sizeof(
Buffer);
1900 dwDataType = 0x12345;
1902 dwRet = pSdbQueryDataEx(hsdb, exe,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize, &trData);
1904 ok_hex(dwDataType, 0x12345);
1908 ok(trData == 0,
"Expected 0, got 0x%x\n", trData);
1910 ok(trData == 0x111111,
"Expected 0x111111, got 0x%x\n", trData);
1914 dwBufferSize =
sizeof(
Buffer);
1915 dwDataType = 0x12345;
1916 dwRet = pSdbQueryData(hsdb, exe,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize);
1918 ok_hex(dwDataType, 0x12345);
1944 ok(hsdb !=
NULL,
"Expected a valid database handle\n");
1948 skip(
"SdbInitDatabase not implemented?\n");
1953 pSdbReleaseDatabase(hsdb);
1958 ok(0,
"Unable to extract database\n");
1970 static WCHAR wide_string[100] = { 0 };
1974 result = pSdbMakeIndexKeyFromString(wide_string);
1978#define expect_indexA (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : expect_indexA_imp
1983 static WCHAR tmp[] = { 0xabba, 0xbcde, 0x2020, 0x20, 0x4444, 0 };
1984 static WCHAR tmp2[] = { 0xabba, 0xbcde, 0x20, 0x4444, 0 };
1985 static WCHAR tmp3[] = { 0x20, 0xbcde, 0x4041, 0x4444, 0 };
1986 static WCHAR tmp4[] = { 0x20, 0xbcde, 0x4041, 0x4444, 0x4444, 0 };
1987 static WCHAR tmp5[] = { 0x2020, 0xbcde, 0x4041, 0x4444, 0x4444, 0 };
1988 static WCHAR tmp6 [] = { 0x20, 0xbcde, 0x4041, 0x4444, 0x4444, 0x4444, 0};
1989 static WCHAR tmp7 [] = { 0xbcde, 0x4041, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0};
1990 static WCHAR tmp8 [] = { 0xbc00, 0x4041, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0};
1995 pSdbMakeIndexKeyFromString(
NULL);
2016 expect_indexA(
"ABABABABZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ", 0x4142414241424142);
2020 result = pSdbMakeIndexKeyFromString(tmp);
2024 result = pSdbMakeIndexKeyFromString(tmp2);
2028 result = pSdbMakeIndexKeyFromString(tmp3);
2032 result = pSdbMakeIndexKeyFromString(tmp4);
2036 result = pSdbMakeIndexKeyFromString(tmp5);
2040 result = pSdbMakeIndexKeyFromString(tmp6);
2044 result = pSdbMakeIndexKeyFromString(tmp7);
2048 result = pSdbMakeIndexKeyFromString(tmp8);
2066 trace(
"SdbGetMatchingExe didnt do anything, cannot determine SDBQUERYRESULT size\n");
2084 trace(
"Unknown size: %i\n",
n);
2110 *(
void**)&pSdbGetDatabaseVersion = (
void *)
GetProcAddress(
hdll,
"SdbGetDatabaseVersion");
2112 *(
void**)&pSdbCloseDatabaseWrite = (
void *)
GetProcAddress(
hdll,
"SdbCloseDatabaseWrite");
2118 *(
void**)&pSdbWriteBinaryTagFromFile = (
void *)
GetProcAddress(
hdll,
"SdbWriteBinaryTagFromFile");
2120 *(
void**)&pSdbWriteStringRefTag = (
void *)
GetProcAddress(
hdll,
"SdbWriteStringRefTag");
2121 *(
void**)&pSdbBeginWriteListTag = (
void *)
GetProcAddress(
hdll,
"SdbBeginWriteListTag");
2125 *(
void**)&pSdbFindFirstNamedTag = (
void *)
GetProcAddress(
hdll,
"SdbFindFirstNamedTag");
2132 *(
void**)&pSdbGetBinaryTagData = (
void *)
GetProcAddress(
hdll,
"SdbGetBinaryTagData");
2143 *(
void**)&pSdbMakeIndexKeyFromString = (
void *)
GetProcAddress(
hdll,
"SdbMakeIndexKeyFromString");
2146 *(
void**)&pSdbQueryDataExTagID = (
void *)
GetProcAddress(
hdll,
"SdbQueryDataExTagID");
2148 *(
void**)&pSdbGetDatabaseInformation = (
void *)
GetProcAddress(
hdll,
"SdbGetDatabaseInformation");
2149 *(
void**)&pSdbFreeDatabaseInformation = (
void *)
GetProcAddress(
hdll,
"SdbFreeDatabaseInformation");
2158 test_MatchApplications<SDBQUERYRESULT_2k3>();
2159 test_MatchApplicationsEx<SDBQUERYRESULT_2k3>();
2162 test_MatchApplications<SDBQUERYRESULT_VISTA>();
2163 test_MatchApplicationsEx<SDBQUERYRESULT_VISTA>();
2166 skip(
"Skipping tests with SDBQUERYRESULT due to a wrong size reported\n");
2171 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
static DWORD g_WinVersion
#define ok_hex(expression, result)
#define ok_int(expression, result)
static SID_IDENTIFIER_AUTHORITY NtAuthority
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 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 struct @1560 test_layerdata[2]
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
static BOOL IsUserAdmin()
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 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)
static struct @1559 test_exedata[5]
#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]
BOOL WINAPI CheckTokenMembership(IN HANDLE ExistingTokenHandle, IN PSID SidToCheck, OUT PBOOL IsMember)
BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid)
PVOID WINAPI FreeSid(PSID pSid)
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)
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
#define EXCEPTION_EXECUTE_HANDLER
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
int WINAPI lstrcmpW(LPCWSTR 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)
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 wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
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)
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
#define SECURITY_BUILTIN_DOMAIN_RID
#define SECURITY_NT_AUTHORITY
#define DOMAIN_ALIAS_RID_ADMINS