11 #define WIN32_NO_STATUS 31 #define HID_DATABASE_FULLPATH 2 33 #define SDB_DATABASE_MAIN_SHIM 0x80030000 36 #define TAGID_NULL 0x0 37 #define TAGID_ROOT 0x0 38 #define _TAGID_ROOT 12 41 #define TAG_TYPE_MASK 0xF000 43 #define TAG_TYPE_NULL 0x1000 44 #define TAG_TYPE_BYTE 0x2000 45 #define TAG_TYPE_WORD 0x3000 46 #define TAG_TYPE_DWORD 0x4000 47 #define TAG_TYPE_QWORD 0x5000 48 #define TAG_TYPE_STRINGREF 0x6000 49 #define TAG_TYPE_LIST 0x7000 50 #define TAG_TYPE_STRING 0x8000 51 #define TAG_TYPE_BINARY 0x9000 54 #define TAG_INCLUDE (0x1 | TAG_TYPE_NULL) 56 #define TAG_MATCH_MODE (0x1 | TAG_TYPE_WORD) 58 #define TAG_SIZE (0x1 | TAG_TYPE_DWORD) 59 #define TAG_CHECKSUM (0x3 | TAG_TYPE_DWORD) 60 #define TAG_MODULE_TYPE (0x6 | TAG_TYPE_DWORD) 61 #define TAG_VERFILEOS (0x9 | TAG_TYPE_DWORD) 62 #define TAG_VERFILETYPE (0xA | TAG_TYPE_DWORD) 63 #define TAG_PE_CHECKSUM (0xB | TAG_TYPE_DWORD) 64 #define TAG_PROBLEMSEVERITY (0x10 | TAG_TYPE_DWORD) 65 #define TAG_HTMLHELPID (0x15 | TAG_TYPE_DWORD) 66 #define TAG_FLAGS (0x17 | TAG_TYPE_DWORD) 67 #define TAG_LAYER_TAGID (0x1A | TAG_TYPE_DWORD) 68 #define TAG_LINKER_VERSION (0x1C | TAG_TYPE_DWORD) 69 #define TAG_LINK_DATE (0x1D | TAG_TYPE_DWORD) 70 #define TAG_UPTO_LINK_DATE (0x1E | TAG_TYPE_DWORD) 71 #define TAG_APP_NAME_RC_ID (0x24 | TAG_TYPE_DWORD) 72 #define TAG_VENDOR_NAME_RC_ID (0x25 | TAG_TYPE_DWORD) 73 #define TAG_SUMMARY_MSG_RC_ID (0x26 | TAG_TYPE_DWORD) 74 #define TAG_OS_PLATFORM (0x23 | TAG_TYPE_DWORD) 76 #define TAG_TIME (0x1 | TAG_TYPE_QWORD) 77 #define TAG_BIN_FILE_VERSION (0x2 | TAG_TYPE_QWORD) 78 #define TAG_BIN_PRODUCT_VERSION (0x3 | TAG_TYPE_QWORD) 79 #define TAG_UPTO_BIN_PRODUCT_VERSION (0x6 | TAG_TYPE_QWORD) 80 #define TAG_UPTO_BIN_FILE_VERSION (0xD | TAG_TYPE_QWORD) 81 #define TAG_FLAG_LUA (0x10 | TAG_TYPE_QWORD) 83 #define TAG_DATABASE (0x1 | TAG_TYPE_LIST) 84 #define TAG_INEXCLUD (0x3 | TAG_TYPE_LIST) 85 #define TAG_EXE (0x7 | TAG_TYPE_LIST) 86 #define TAG_MATCHING_FILE (0x8 | TAG_TYPE_LIST) 87 #define TAG_SHIM_REF (0x9| TAG_TYPE_LIST) 88 #define TAG_LAYER (0xB | TAG_TYPE_LIST) 89 #define TAG_APPHELP (0xD | TAG_TYPE_LIST) 90 #define TAG_LINK (0xE | TAG_TYPE_LIST) 91 #define TAG_DATA (0xF | TAG_TYPE_LIST) 92 #define TAG_STRINGTABLE (0x801 | TAG_TYPE_LIST) 94 #define TAG_STRINGTABLE_ITEM (0x801 | TAG_TYPE_STRING) 96 #define TAG_NAME (0x1 | TAG_TYPE_STRINGREF) 97 #define TAG_MODULE (0x3 | TAG_TYPE_STRINGREF) 98 #define TAG_VENDOR (0x5 | TAG_TYPE_STRINGREF) 99 #define TAG_APP_NAME (0x6 | TAG_TYPE_STRINGREF) 100 #define TAG_COMMAND_LINE (0x8 | TAG_TYPE_STRINGREF) 101 #define TAG_COMPANY_NAME (0x9 | TAG_TYPE_STRINGREF) 102 #define TAG_WILDCARD_NAME (0xB | TAG_TYPE_STRINGREF) 103 #define TAG_PRODUCT_NAME (0x10 | TAG_TYPE_STRINGREF) 104 #define TAG_PRODUCT_VERSION (0x11 | TAG_TYPE_STRINGREF) 105 #define TAG_FILE_DESCRIPTION (0x12 | TAG_TYPE_STRINGREF) 106 #define TAG_FILE_VERSION (0x13 | TAG_TYPE_STRINGREF) 107 #define TAG_ORIGINAL_FILENAME (0x14 | TAG_TYPE_STRINGREF) 108 #define TAG_INTERNAL_NAME (0x15 | TAG_TYPE_STRINGREF) 109 #define TAG_LEGAL_COPYRIGHT (0x16 | TAG_TYPE_STRINGREF) 110 #define TAG_APPHELP_DETAILS (0x18 | TAG_TYPE_STRINGREF) 111 #define TAG_LINK_URL (0x19 | TAG_TYPE_STRINGREF) 112 #define TAG_APPHELP_TITLE (0x1B | TAG_TYPE_STRINGREF) 114 #define TAG_COMPILER_VERSION (0x22 | TAG_TYPE_STRINGREF) 116 #define TAG_GENERAL (0x2 | TAG_TYPE_NULL) 118 #define TAG_EXE_ID (0x4 | TAG_TYPE_BINARY) 119 #define TAG_DATA_BITS (0x5 | TAG_TYPE_BINARY) 120 #define TAG_DATABASE_ID (0x7 | TAG_TYPE_BINARY) 179 DEFINE_GUID(GUID_DATABASE_TEST, 0xe39b0eb0, 0x55db, 0x450b, 0x9b, 0xd4, 0xd2, 0x0c, 0x94, 0x84, 0x26, 0x0f);
180 DEFINE_GUID(GUID_MAIN_DATABASE, 0x11111111, 0x1111, 0x1111, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11);
194 if (!pSdbGetDatabaseInformation || !pSdbFreeDatabaseInformation)
196 skip(
"GetDatabaseInformation or SdbFreeDatabaseInformation not found\n");
201 memset(pInfo, 0xDE,
sizeof(*pInfo) * 2);
203 fResult = pSdbGetDatabaseInformation(
pdb, pInfo);
204 ok(fResult,
"SdbGetDatabaseInformation failed\n");
214 ok(pInfo->
dwMajor == 3,
"Expected pInfo->dwMajor to be 3, was: %d\n", pInfo->
dwMajor);
215 ok(pInfo->
dwMinor == 0,
"Expected pInfo->dwMinor to be 0, was: %d\n", pInfo->
dwMinor);
217 ok(pInfo[1].dwSomething == 0 || pInfo[1].dwSomething == 0xdededede,
"Something amiss: 0x%x\n", pInfo[1].dwSomething);
218 ok(pInfo[1].dwMajor == 0xdededede,
"Cookie2 corrupt: 0x%x\n", pInfo[1].dwMajor);
222 ok(pInfo->
dwMajor == 2,
"Expected pInfo->dwMajor to be 2, was: %d\n", pInfo->
dwMajor);
224 ok(pInfo->
dwMinor == 1,
"Expected pInfo->dwMinor to be 1, was: %d\n", pInfo->
dwMinor);
227 "Expected pInfo->dwMinor to be between 190915 and 191300, was: %d\n", pInfo->
dwMinor);
229 ok(pInfo[1].dwSomething == 0xdededede,
"Cookie1 corrupt: 0x%x\n", pInfo[1].dwSomething);
230 ok(pInfo[1].dwMajor == 0xdededede,
"Cookie2 corrupt: 0x%x\n", pInfo[1].dwMajor);
243 static const WCHAR tag_size_string[] =
L"SIZE";
244 static const WCHAR tag_flag_lua_string[] =
L"FLAG_LUA";
245 static const WCHAR invalid_tag[] =
L"InvalidTag";
258 TAGID tagid, ptagid, stringref = 6;
263 ok(
pdb !=
NULL,
"failed to create database\n");
266 ret = pSdbWriteDWORDTag(
pdb,
tags[0], 0xDEADBEEF);
267 ok(
ret,
"failed to write DWORD tag\n");
268 ret = pSdbWriteQWORDTag(
pdb,
tags[1], 0xDEADBEEFBABE);
269 ok(
ret,
"failed to write QWORD tag\n");
270 ret = pSdbWriteStringRefTag(
pdb,
tags[2], stringref);
271 ok(
ret,
"failed to write stringref tag\n");
272 tagid = pSdbBeginWriteListTag(
pdb,
tags[3]);
275 ok(
ret,
"failed to write string tag\n");
277 ok(
ret,
"failed to write NULL tag\n");
279 ok(
ret,
"failed to write WORD tag\n");
280 ret = pSdbEndWriteListTag(
pdb, tagid);
281 ok(
ret,
"failed to update list size\n");
283 pSdbCloseDatabaseWrite(
pdb);
288 ok(
pdb !=
NULL,
"unexpected NULL handle\n");
295 tag = pSdbGetTagFromTagID(
pdb, tagid);
298 string = pSdbTagToString(
tag);
299 ok(
lstrcmpW(
string, tag_size_string) == 0,
"unexpected string %s, expected %s\n",
302 dword = pSdbReadDWORDTag(
pdb, tagid, 0);
303 ok(dword == 0xDEADBEEF,
"unexpected value %u, expected 0xDEADBEEF\n", dword);
309 tag = pSdbGetTagFromTagID(
pdb, tagid);
312 string = pSdbTagToString(
tag);
315 ok(
lstrcmpW(
string, tag_flag_lua_string) == 0,
"unexpected string %s, expected %s\n",
320 ok(
lstrcmpW(
string, invalid_tag) == 0,
"unexpected string %s, expected %s\n",
324 qword = pSdbReadQWORDTag(
pdb, tagid, 0);
325 ok(qword == 0xDEADBEEFBABE,
"unexpected value 0x%I64x, expected 0xDEADBEEFBABE\n", qword);
328 string = pSdbGetStringTagPtr(
pdb, tagid);
329 ok(
string && (
lstrcmpW(
string,
temp) == 0),
"unexpected string %s, expected %s\n",
333 tagid = pSdbGetFirstChild(
pdb, ptagid);
335 string = pSdbGetStringTagPtr(
pdb, tagid);
336 ok(
string && (
lstrcmpW(
string,
temp) == 0),
"unexpected string %s, expected %s\n",
339 ok(pSdbReadStringTag(
pdb, tagid,
buffer, 6),
"failed to write string to buffer\n");
341 ok(!pSdbReadStringTag(
pdb, tagid,
buffer, 3),
"string was written to buffer, but failure was expected");
342 ok(pSdbGetTagDataSize(
pdb, tagid) == 5 *
sizeof(
WCHAR),
"string has unexpected size\n");
344 tagid = pSdbGetNextChild(
pdb, ptagid, tagid);
345 tag = pSdbGetTagFromTagID(
pdb, tagid);
347 ok(pSdbGetTagDataSize(
pdb, tagid) == 0,
"null tag with size > 0\n");
349 tagid = pSdbGetNextChild(
pdb, ptagid, tagid);
350 word = pSdbReadWORDTag(
pdb, tagid, 0);
351 ok(
word == 0xACE,
"unexpected value 0x%x, expected 0x%x\n",
word, 0xACE);
355 pSdbCloseDatabase(
pdb);
365 ok(
pdb !=
NULL,
"unexpected NULL handle\n");
370 ok(
ret,
"failed to write tag from binary file\n");
371 pSdbCloseDatabaseWrite(
pdb);
379 ok(
pdb !=
NULL,
"unexpected NULL handle\n");
386 ok(
ret,
"failed to read binary tag\n");
388 pSdbCloseDatabase(
pdb);
401 WCHAR path1[] = {
't',
'e',
's',
't',
'.',
's',
'd',
'b',0};
413 ok(
pdb !=
NULL,
"Expected a valid database\n");
417 ok(tagdb == 12,
"Expected tag to be 12, was %u\n", tagdb);
420 ok(
ret,
"Expected SdbWriteStringTag to succeed\n");
421 ret = pSdbEndWriteListTag(
pdb, tagdb);
422 ok(
ret,
"Expected SdbEndWriteListTag to succeed\n");
425 ok(tagdb == 30,
"Expected tag to be 24, 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");
432 pSdbCloseDatabaseWrite(
pdb);
436 ok(
pdb !=
NULL,
"Expected a valid database\n");
441 ok(tagdb == 12,
"Expected tag to be 12, was %u\n", tagdb);
442 size = pSdbGetTagDataSize(
pdb, tagdb);
443 ok(
size == 12,
"Expected size to be 12, was %u\n",
size);
446 ok(tagstr == 18,
"Expected string tag to be 18, was %u\n", tagstr);
447 tag = pSdbGetTagFromTagID(
pdb, tagstr);
449 size = pSdbGetTagDataSize(
pdb, tagstr);
450 ok(
size == 4,
"Expected size to be 4, was 0x%x\n",
size);
452 tagstr = pSdbFindNextTag(
pdb, tagdb, tagstr);
453 ok(tagstr == 24,
"Expected string tag to be 24, was %u\n", tagstr);
454 tag = pSdbGetTagFromTagID(
pdb, tagstr);
456 size = pSdbGetTagDataSize(
pdb, tagstr);
457 ok(
size == 4,
"Expected size to be 4, was 0x%x\n",
size);
460 ok(tagdb == 30,
"Expected tag to be 30, was %u\n", tagdb);
461 size = pSdbGetTagDataSize(
pdb, tagdb);
462 ok(
size == 12,
"Expected size to be 12, was %u\n",
size);
465 ok(tagstr == 36,
"Expected string tag to be 36, was %u\n", tagstr);
466 tag = pSdbGetTagFromTagID(
pdb, tagstr);
468 size = pSdbGetTagDataSize(
pdb, tagstr);
469 ok(
size == 4,
"Expected size to be 4, was %u\n",
size);
471 tagstr = pSdbFindNextTag(
pdb, tagdb, tagstr);
472 ok(tagstr == 42,
"Expected string tag to be 42, was %u\n", tagstr);
473 tag = pSdbGetTagFromTagID(
pdb, tagstr);
475 size = pSdbGetTagDataSize(
pdb, tagstr);
476 ok(
size == 4,
"Expected size to be 4, was 0x%x\n",
size);
479 ok(tagdb == 48,
"Expected tag to be 48, was %u\n", tagdb);
480 size = pSdbGetTagDataSize(
pdb, tagdb);
481 ok(
size == 32,
"Expected size to be 32, was %u\n",
size);
483 tagstr = pSdbGetFirstChild(
pdb, tagdb);
484 ok(tagstr == 54,
"Expected string tag to be 54, was %u\n", tagstr);
485 tag = pSdbGetTagFromTagID(
pdb, tagstr);
487 size = pSdbGetTagDataSize(
pdb, tagstr);
488 ok(
size == 10,
"Expected size to be 10, was %u\n",
size);
489 ptr = pSdbGetStringTagPtr(
pdb, tagstr);
490 ok(
ptr !=
NULL,
"Expected a valid pointer\n");
494 tagstr = pSdbGetNextChild(
pdb, tagdb, tagstr);
495 ok(tagstr == 70,
"Expected string tag to be 70, was %u\n", tagstr);
496 tag = pSdbGetTagFromTagID(
pdb, tagstr);
498 size = pSdbGetTagDataSize(
pdb, tagstr);
499 ok(
size == 10,
"Expected size to be 10, was %u\n",
size);
500 ptr = pSdbGetStringTagPtr(
pdb, tagstr);
501 ok(
ptr !=
NULL,
"Expected a valid pointer\n");
505 pSdbCloseDatabase(
pdb);
520 ok(
ret,
"Failed to write string %u/%u\n",
n,
count);
522 pSdbCloseDatabaseWrite(
pdb);
527 static const WCHAR path1[] = {
't',
'e',
's',
't',
'.',
's',
'd',
'b',0};
528 static const WCHAR test1[] = {
't',
'e',
's',
't',
'1',0};
529 static const WCHAR test2[] = {
'T',
'e',
's',
't',
'1',0};
530 static const WCHAR test3[] = {
'T',
'E',
's',
't',
'1',0};
531 static const WCHAR test4[] = {
'T',
'E',
'S',
'T',
'1',0};
532 static const WCHAR test5[] = {
'T',
'E',
'S',
'T',
'2',0};
533 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};
535 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};
538 static const TAGID expected_str[] = { 0xc, 0x12, 0x18, 0x1e, 0x24, 0x2a, 0x30, 0x36 };
539 static const TAGID expected_tab[] = { 6, 0x18, 0x2a, 0x3c, 0x4e, 0x60, 0x846, 0x102c };
542 for (
n = 0;
n < (
sizeof(all) /
sizeof(all[0])); ++
n)
550 ok(
pdb !=
NULL,
"Expected a valid database\n");
557 for (
j = 0;
j <=
n; ++
j)
559 ok(tagstr == expected_str[
j],
"Expected tagstr to be 0x%x, was 0x%x for %u/%u\n", expected_str[
j], tagstr,
j,
n);
564 TAG tag = pSdbGetTagFromTagID(
pdb, tagstr);
566 size = pSdbGetTagDataSize(
pdb, tagstr);
567 ok(
size == 4,
"Expected datasize to be 4, was %u for %u/%u\n",
size,
j,
n);
568 data = pSdbGetStringTagPtr(
pdb, tagstr);
573 ok(tagstr ==
TAGID_NULL,
"Expected to be at the end for %u\n",
n);
577 expected_table = 0xc + (
n+1)*6;
578 ok(
table == expected_table,
"Expected to find a stringtable at 0x%x instead of 0x%x for %u\n", expected_table,
table,
n);
582 for (
j = 0;
j <=
n; ++
j)
584 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);
589 TAG tag = pSdbGetTagFromTagID(
pdb, tagstr);
591 size = pSdbGetTagDataSize(
pdb, tagstr);
592 expected_size = (
lstrlenW(all[
j])+1) * 2;
593 ok(
size == expected_size,
"Expected datasize to be %u, was %u for %u/%u\n", expected_size,
size,
j,
n);
594 data = pSdbGetStringTagPtr(
pdb, tagstr);
599 ok(tagstr ==
TAGID_NULL,
"Expected to be at the end for %u\n",
n);
602 pSdbCloseDatabase(
pdb);
657 #define match_strw_attr (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : match_strw_attr_imp 658 #define match_dw_attr (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : match_dw_attr_imp 659 #define match_qw_attr (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : match_qw_attr_imp 660 #define match_guid_attr (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : match_guid_attr_imp 669 ok(iter !=
TAGID_NULL,
"expected a result, got TAGID_NULL\n");
674 ok(
result,
"expected SdbReadBinaryTag not to fail.\n");
678 result = pSdbGUIDToString(&
guid, guid_wstr, 50);
679 ok(
result,
"expected SdbGUIDToString not to fail.\n");
684 ok_str(guid_str,
"{e39b0eb0-55db-450b-9bd4-d20c9484260f}");
686 ok(pSdbGetDatabaseID(
pdb, &
guid2),
"expected SdbGetDatabaseID not to fail.\n");
698 TAGID shimref, inexclude, is_include;
705 ok(shimref !=
TAGID_NULL,
"Expected a valid shim ref, got NULL\n");
712 ok(inexclude !=
TAGID_NULL,
"Expected a valid in/exclude ref, got NULL\n");
717 ok(is_include ==
TAGID_NULL,
"Expected a NULL include ref, but got one anyway.\n");
720 inexclude = pSdbFindNextTag(
pdb, shimref, inexclude);
721 ok(inexclude !=
TAGID_NULL,
"Expected a valid in/exclude ref, got NULL\n");
726 ok(is_include !=
TAGID_NULL,
"Expected a valid include ref, got NULL\n");
732 ok(matching_file !=
TAGID_NULL,
"Expected to find atleast 1 matching file.\n");
736 ok(
num < 4,
"Too many matches, expected only 4!\n");
778 ok(0,
"unknown case: %d\n",
num);
780 matching_file = pSdbFindNextTag(
pdb, exe, matching_file);
783 ok(matching_file !=
TAGID_NULL,
"Did expect a secondary match on %d\n",
num);
790 ok(matching_file ==
TAGID_NULL,
"Did not expect a secondary match on %d\n",
num);
841 apphelp = pSdbFindNextTag(
pdb, apphelp, apphelp);
842 ok(apphelp ==
TAGID_NULL,
"Did not expect a secondary match on %d\n",
num);
855 ok(layer_tagid ==
TAGID_NULL,
"expected not to find a layer tagid, got %x\n", layer_tagid);
876 L"apphelp_name_allow",
877 L"apphelp_vendor_allow",
878 { 0x4e50c93f, 0xb863, 0x4dfa, { 0xba, 0xe2, 0xd8, 0x0e, 0xf4, 0xce, 0x5c, 0x89 } },
888 L"test_disallow.exe",
889 L"apphelp_name_disallow",
890 L"apphelp_vendor_disallow",
891 { 0x156720e1, 0xef98, 0x4d04, { 0x96, 0x5a, 0xd8, 0x5d, 0xe0, 0x5e, 0x6d, 0x9f } },
904 { 0xce70ef69, 0xa21d, 0x408b, { 0x84, 0x5b, 0xf9, 0x9e, 0xac, 0x06, 0x09, 0xe7 } },
905 L"test_checkfile.txt",
917 { 0xb4ead144, 0xf640, 0x4e4b, { 0x94, 0xc4, 0x0c, 0x7f, 0xa8, 0x66, 0x23, 0xb0 } },
927 L"test_unknown_file.exe",
928 L"apphelp_name_allow",
929 L"apphelp_vendor_allow",
930 { 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
950 ok(
num < 4,
"Too many matches, expected only 4!\n");
961 ok(apphelp !=
TAGID_NULL,
"Expected to find a valid apphelp match on %d.\n",
num);
967 ok(apphelp ==
TAGID_NULL,
"Did not expect an apphelp match on %d\n",
num);
981 exe = pSdbFindNextTag(
pdb,
root, exe);
983 ok(
num == 4,
"Expected to find 4 exe tags, found: %d\n",
num);
995 L"http://reactos.org/disallow",
996 L"apphelp_name_disallow",
1001 L"http://reactos.org/allow",
1002 L"apphelp_name_allow",
1014 ok(
num < 2,
"Too many matches, expected only 4!\n");
1026 apphelp = pSdbFindNextTag(
pdb,
root, apphelp);
1029 ok(
num == 2,
"Expected to find 2 layer tags, found: %d\n",
num);
1037 if (!pSdbGetDatabaseInformation || !pSdbFreeDatabaseInformation)
1039 skip(
"GetDatabaseInformation or SdbFreeDatabaseInformation not found\n");
1045 pSdbFreeDatabaseInformation(
NULL);
1049 ok(0,
"SdbFreeDatabaseInformation did not handle a NULL pointer very gracefully.\n");
1055 memset(pInfo, 0xDE,
sizeof(*pInfo) * 2);
1057 fResult = pSdbGetDatabaseInformation(
pdb, pInfo);
1058 ok(fResult,
"SdbGetDatabaseInformation failed\n");
1062 ok(
IsEqualGUID(GUID_DATABASE_TEST, pInfo->
Id),
"expected guids to be equal(%s:%s)\n",
1070 ok(pInfo->
dwMajor == 3,
"Expected pInfo->dwMajor to be 3, was: %d\n", pInfo->
dwMajor);
1071 ok(pInfo->
dwMinor == 0,
"Expected pInfo->dwMinor to be 0, was: %d\n", pInfo->
dwMinor);
1073 ok(pInfo[1].dwSomething == 4 || pInfo[1].dwSomething == 0xdededede,
"Something amiss: 0x%x\n", pInfo[1].dwSomething);
1074 ok(pInfo[1].dwMajor == 0xdededede,
"Cookie2 corrupt: 0x%x\n", pInfo[1].dwMajor);
1078 ok(pInfo->
dwMajor == 2,
"Expected pInfo->dwMajor to be 2, was: %d\n", pInfo->
dwMajor);
1079 ok(pInfo->
dwMinor == 1,
"Expected pInfo->dwMinor to be 1, was: %d\n", pInfo->
dwMinor);
1081 ok(pInfo[1].dwSomething == 0xdededede,
"Cookie1 corrupt: 0x%x\n", pInfo[1].dwSomething);
1082 ok(pInfo[1].dwMajor == 0xdededede,
"Cookie2 corrupt: 0x%x\n", pInfo[1].dwMajor);
1091 static const WCHAR path[] = {
't',
'e',
's',
't',
'_',
'd',
'b',
'.',
's',
'd',
'b',0};
1095 DWORD ver_hi, ver_lo;
1100 ver_hi = ver_lo = 0x12345678;
1101 ret = pSdbGetDatabaseVersion(
path, &ver_hi, &ver_lo);
1102 ok(
ret,
"Expected SdbGetDatabaseVersion to succeed\n");
1105 ok(ver_hi == 3,
"Expected ver_hi to be 3, was: %d\n", ver_hi);
1106 ok(ver_lo == 0,
"Expected ver_lo to be 0, was: %d\n", ver_lo);
1110 ok(ver_hi == 2,
"Expected ver_hi to be 2, was: %d\n", ver_hi);
1111 ok(ver_lo == 1,
"Expected ver_lo to be 1, was: %d\n", ver_lo);
1114 ver_hi = ver_lo = 0x12345678;
1115 ret = pSdbGetDatabaseVersion(
NULL, &ver_hi, &ver_lo);
1118 ok(!
ret,
"Expected SdbGetDatabaseVersion to fail\n");
1119 ok(ver_hi == 0,
"Expected ver_hi to be 0, was: 0x%x\n", ver_hi);
1120 ok(ver_lo == 0,
"Expected ver_lo to be 0, was: 0x%x\n", ver_lo);
1124 ok(
ret,
"Expected SdbGetDatabaseVersion to succeed\n");
1125 ok(ver_hi == 0x12345678,
"Expected ver_hi to be 0x12345678, was: 0x%x\n", ver_hi);
1126 ok(ver_lo == 0x12345678,
"Expected ver_lo to be 0x12345678, was: 0x%x\n", ver_lo);
1129 ver_hi = ver_lo = 0x12345678;
1130 ret = pSdbGetDatabaseVersion(
path + 1, &ver_hi, &ver_lo);
1133 ok(!
ret,
"Expected SdbGetDatabaseVersion to fail\n");
1134 ok(ver_hi == 0,
"Expected ver_hi to be 0, was: 0x%x\n", ver_hi);
1135 ok(ver_lo == 0,
"Expected ver_lo to be 0, was: 0x%x\n", ver_lo);
1139 ok(
ret,
"Expected SdbGetDatabaseVersion to succeed\n");
1140 ok(ver_hi == 0x12345678,
"Expected ver_hi to be 0x12345678, was: 0x%x\n", ver_hi);
1141 ok(ver_lo == 0x12345678,
"Expected ver_lo to be 0x12345678, was: 0x%x\n", ver_lo);
1145 ok(
pdb !=
NULL,
"unexpected NULL handle\n");
1155 ok_hex(tagLayer, (
int)tagAlt);
1156 ok_hex(tagLayer, (
int)tagAlt2);
1157 ok_hex(tagLayer, (
int)tagAlt3);
1165 pSdbCloseDatabase(
pdb);
1175 ok(pSdbGetDatabaseID(
pdb, &
guid),
"expected SdbGetDatabaseID not to fail.\n");
1180 skip(
"Not checking DB GUID, received a null pdb\n");
1188 PSID AdministratorsGroup;
1194 &AdministratorsGroup);
1206 template<
typename SDBQUERYRESULT_T>
1211 ok_(
file,
line)(
query.adwExeFlags[
n] == 0,
"Expected adwExeFlags[%d] to be 0, was: %x for %d\n",
n,
query.adwExeFlags[0],
cur);
1220 template<
typename SDBQUERYRESULT_T>
1225 SDBQUERYRESULT_T
query;
1244 ok(
ret == 0,
"SdbGetMatchingExe should have failed for %d.\n",
cur);
1255 ok(
ret == 0,
"SdbGetMatchingExe should have failed for %d.\n",
cur);
1267 ok(
ret,
"SdbGetMatchingExe should not fail for %d.\n",
cur);
1271 ok(
query.dwExeCount == exe_count,
"Expected dwExeCount to be %d, was %d for %d\n", exe_count,
query.dwExeCount,
cur);
1273 ok(
query.dwCustomSDBMap == 1,
"Expected dwCustomSDBMap to be 1, was %d for %d\n",
query.dwCustomSDBMap,
cur);
1274 ok(
query.dwLayerFlags == 0,
"Expected dwLayerFlags to be 0, was 0x%x for %d\n",
query.dwLayerFlags,
cur);
1283 expect_flags = 0x101;
1286 expect_flags = 0x121;
1288 expect_flags &= ~0x20;
1292 expect_flags &= ~0x100;
1294 ok(
query.dwFlags == expect_flags,
"Expected dwFlags to be 0x%x, was 0x%x for %d\n", expect_flags,
query.dwFlags,
cur);
1298 ok(
query.atrExes[
n] == 0,
"Expected atrExes[%d] to be 0, was: %x for %d\n",
n,
query.atrExes[
n],
cur);
1305 ok(
query.atrLayers[
n] == 0,
"Expected atrLayers[%d] to be 0, was: %x for %d\n",
n,
query.atrLayers[0],
cur);
1314 if (
query.atrExes[0])
1318 ret = pSdbTagRefToTagID(hsdb,
query.atrExes[0], &
pdb, &tagid);
1319 ok(
ret,
"SdbTagRefToTagID failed for %d.\n",
cur);
1320 ok(
pdb !=
NULL &&
pdb != (
PDB)0x12345678,
"SdbTagRefToTagID failed to return a pdb for %d.\n",
cur);
1321 ok(tagid != 0 && tagid != 0x76543210,
"SdbTagRefToTagID failed to return a tagid for %d.\n",
cur);
1326 TAG tag = pSdbGetTagFromTagID(
pdb, tagid);
1332 ret = pSdbTagIDToTagRef(hsdb,
pdb, tagid, &tr);
1333 ok(
ret,
"SdbTagIDToTagRef failed for %d.\n",
cur);
1334 ok(tr ==
query.atrExes[0],
"Expected tr to be 0x%x, was 0x%x for %d.\n",
query.atrExes[0], tr,
cur);
1338 skip(
"Skipping a bunch of tests because of an invalid pointer\n");
1346 ret = pSdbTagRefToTagID(hsdb,
query.atrLayers[0], &
pdb, &tagid);
1347 ok(
ret,
"SdbTagRefToTagID failed for %d.\n",
cur);
1348 ok(
pdb !=
NULL &&
pdb != (
PDB)0x12345678,
"SdbTagRefToTagID failed to return a pdb for %d.\n",
cur);
1349 ok(tagid != 0 && tagid != 0x76543210,
"SdbTagRefToTagID failed to return a tagid for %d.\n",
cur);
1354 TAG tag = pSdbGetTagFromTagID(
pdb, tagid);
1360 ret = pSdbTagIDToTagRef(hsdb,
pdb, tagid, &tr);
1361 ok(
ret,
"SdbTagIDToTagRef failed for %d.\n",
cur);
1366 skip(
"Skipping a bunch of tests because of an invalid pointer\n");
1372 ret = pSdbTagRefToTagID(hsdb, 0, &
pdb, &tagid);
1373 ok(
pdb !=
NULL &&
pdb != (
PDB)0x12345678,
"Expected pdb to be set to a valid pdb, was: %p\n",
pdb);
1374 ok(tagid == 0,
"Expected tagid to be set to 0, was: 0x%x\n", tagid);
1385 ok(!
ret,
"SdbGetMatchingExe should not succeed for %d.\n",
cur);
1400 template<
typename SDBQUERYRESULT_T>
1421 ok(hsdb !=
NULL,
"Expected a valid database handle\n");
1425 skip(
"SdbInitDatabase not implemented?\n");
1432 test_mode_generic<SDBQUERYRESULT_T>(
workdir, hsdb,
n);
1433 pSdbReleaseDatabase(hsdb);
1455 ok(dwWritten ==
Size,
"WriteFile wrote %u bytes instead of %u\n", dwWritten,
Size);
1481 template<
typename SDBQUERYRESULT_T>
1486 SDBQUERYRESULT_T
query;
1487 TAGID dbtag, exetag, tagid;
1493 ret = pSdbTagRefToTagID(hsdb, 0, &
pdb, &tagid);
1494 ok(
pdb !=
NULL &&
pdb != (
PDB)0x12345678,
"Expected pdb to be set to a valid pdb, was: %p\n",
pdb);
1497 ok(dbtag !=
TAGID_NULL,
"Expected to get a valid TAG_DATABASE\n");
1499 for (exetag = pSdbFindFirstTag(
pdb, dbtag,
TAG_EXE); exetag; exetag = pSdbFindNextTag(
pdb, dbtag, exetag))
1502 Vendor = pSdbGetStringTagPtr(
pdb, tagid);
1505 Succeed = !
wcsicmp(Vendor,
L"Succeed");
1506 if (!Succeed &&
wcsicmp(Vendor,
L"Fail"))
1514 TestName = pSdbGetStringTagPtr(
pdb, tagid);
1522 DWORD exe_count = Succeed ? 1 : 0;
1526 skip(
"As long as we do not have indexes, we will hit a bug in W2k3\n");
1530 [
Info][SdbpSearchDB ] Searching database with
no index.
1531 [Err ][SdbpSearchDB ] No DATABASE
tag found.
1541 ok(
query.dwExeCount == exe_count,
"Expected dwExeCount to be %d, was %d for %s\n", exe_count,
query.dwExeCount,
wine_dbgstr_w(TestName));
1548 template<
typename SDBQUERYRESULT_T>
1569 ok(hsdb !=
NULL,
"Expected a valid database handle\n");
1573 skip(
"SdbInitDatabase not implemented?\n");
1578 test_match_ex<SDBQUERYRESULT_T>(
workdir, hsdb);
1579 pSdbReleaseDatabase(hsdb);
1584 ok(0,
"Unable to extract database\n");
1618 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1624 ret = pSdbTagRefToTagID(hsdb,
size - 1, &
pdb, &db);
1625 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1627 ok(db == (
size - 1),
"Expected %u, got: %u\n",
size - 1, db);
1631 ret = pSdbTagIDToTagRef(hsdb,
pdb, db, &tr);
1632 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1633 ok(tr == (
size - 1),
"Expected %u, got: %u\n",
size - 1, tr);
1637 ret = pSdbTagRefToTagID(hsdb,
size, &
pdb, &db);
1638 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1640 ok(db ==
size,
"Expected %u, got: %u\n",
size, db);
1643 ret = pSdbTagIDToTagRef(hsdb,
pdb, db, &tr);
1644 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1645 ok(tr ==
size,
"Expected %u, got: %u\n",
size, tr);
1649 ret = pSdbTagRefToTagID(hsdb,
size + 1, &
pdb, &db);
1650 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1652 ok(db == (
size + 1),
"Expected %u, got: %u\n",
size + 1, db);
1655 ret = pSdbTagIDToTagRef(hsdb,
pdb, db, &tr);
1656 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1657 ok(tr == (
size + 1),
"Expected %u, got: %u\n", (
size + 1), tr);
1661 ret = pSdbTagRefToTagID(hsdb, 0x0fffffff, &
pdb, &db);
1662 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1664 ok(db == 0x0fffffff,
"Expected %u, got: %u\n", 0x0fffffff, db);
1667 ret = pSdbTagIDToTagRef(hsdb,
pdb, db, &tr);
1668 ok(
ret ==
TRUE,
"Expected ret to be TRUE, was: %d\n",
ret);
1669 ok(tr == 0x0fffffff,
"Expected %u, got: %u\n", 0x0fffffff, tr);
1673 ret = pSdbTagRefToTagID(hsdb, 0x10000000, &
pdb, &db);
1674 ok(
ret ==
FALSE,
"Expected ret to be FALSE, was: %d\n",
ret);
1676 ok(db == 0,
"Expected no result, got: 0x%x\n", db);
1679 ret = pSdbTagIDToTagRef(hsdb,
pdb, 0x10000000, &tr);
1680 ok(
ret ==
FALSE,
"Expected ret to be TRUE, was: %d\n",
ret);
1681 ok(tr == 0,
"Expected %u, got: %u\n", 0, tr);
1686 ok(
ret !=
FALSE,
"Expected ret to be TRUE, was: %d\n",
ret);
1687 ok(
pdb !=
NULL,
"Expected pdb to be valid\n");
1691 skip(
"Cannot run tests without pdb\n");
1699 child = pSdbGetFirstChild(
pdb, db);
1705 ret = pSdbTagRefToTagID(hsdb,
child, &pdb_res, &tagid_res);
1706 ok(
ret,
"Expected SdbTagRefToTagID to succeed\n");
1710 ret = pSdbTagIDToTagRef(hsdb, pdb_res, tagid_res, &tr);
1711 ok(
ret,
"Expected SdbTagIDToTagRef to succeed\n");
1712 ok_hex(tr, (
int)tagid_res);
1719 skip(
"Cannot run tests without valid db tag\n");
1724 tr = pSdbGetLayerTagRef(hsdb,
L"TestNewMode");
1728 tr = pSdbGetLayerTagRef(hsdb,
L"256Color");
1731 pSdbReleaseDatabase(hsdb);
1743 DWORD dwBufferSize, dwDataType, dwRet;
1748 ok(
ret !=
FALSE,
"Expected ret to be TRUE, was: %d\n",
ret);
1749 ok(
pdb !=
NULL,
"Expected pdb to be valid\n");
1753 skip(
"Cannot run tests without pdb\n");
1758 ok(db !=
NULL,
"Expected db to be valid\n");
1761 skip(
"Cannot run tests without db\n");
1766 ok(
layer !=
NULL,
"Expected layer to be valid\n");
1769 skip(
"Cannot run tests without layer\n");
1774 dwBufferSize =
sizeof(
Buffer);
1775 dwDataType = 0x12345;
1777 dwRet = pSdbQueryDataExTagID(
pdb,
layer,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize, &tiData);
1782 ok(tiData !=
NULL && tiData != 0x111111,
"Expected tiData, got NULL\n");
1786 dwBufferSize =
sizeof(
Buffer);
1795 dwBufferSize =
sizeof(
Buffer);
1809 dwBufferSize =
sizeof(
Buffer);
1816 dwBufferSize =
sizeof(
Buffer);
1823 dwBufferSize =
sizeof(
Buffer);
1824 dwDataType = 0x12345;
1826 dwRet = pSdbQueryDataExTagID(
pdb,
layer,
L"TESTDATA2", &dwDataType,
Buffer, &dwBufferSize, &tiData);
1831 ok(tiData !=
NULL && tiData != 0x111111,
"Expected tiData, got NULL\n");
1836 dwBufferSize =
sizeof(
Buffer);
1837 dwDataType = 0x12345;
1839 dwRet = pSdbQueryDataExTagID(
pdb,
layer,
L"TESTDATA3", &dwDataType,
Buffer, &dwBufferSize, &tiData);
1845 ok(tiData !=
NULL && tiData != 0x111111,
"Expected tiData, got NULL\n");
1850 dwBufferSize =
sizeof(
Buffer);
1851 dwDataType = 0x12345;
1853 dwRet = pSdbQueryDataEx(hsdb,
layer,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize, &trData);
1858 ok(trData !=
NULL && trData != 0x111111,
"Expected trData, got NULL\n");
1862 dwBufferSize =
sizeof(
Buffer);
1863 dwDataType = 0x12345;
1864 dwRet = pSdbQueryData(hsdb,
layer,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize);
1871 ok(exe !=
NULL,
"Expected exe to be valid\n");
1874 skip(
"Cannot run tests without exe\n");
1879 dwBufferSize =
sizeof(
Buffer);
1880 dwDataType = 0x12345;
1882 dwRet = pSdbQueryDataExTagID(
pdb, exe,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize, &tiData);
1884 ok_hex(dwDataType, 0x12345);
1887 ok(tiData == 0x111111,
"Expected 0x111111, got 0x%x\n", tiData);
1891 dwBufferSize =
sizeof(
Buffer);
1892 dwDataType = 0x12345;
1894 dwRet = pSdbQueryDataEx(hsdb, exe,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize, &trData);
1896 ok_hex(dwDataType, 0x12345);
1900 ok(trData == 0,
"Expected 0, got 0x%x\n", trData);
1902 ok(trData == 0x111111,
"Expected 0x111111, got 0x%x\n", trData);
1906 dwBufferSize =
sizeof(
Buffer);
1907 dwDataType = 0x12345;
1908 dwRet = pSdbQueryData(hsdb, exe,
L"TESTDATA1", &dwDataType,
Buffer, &dwBufferSize);
1910 ok_hex(dwDataType, 0x12345);
1936 ok(hsdb !=
NULL,
"Expected a valid database handle\n");
1940 skip(
"SdbInitDatabase not implemented?\n");
1945 pSdbReleaseDatabase(hsdb);
1950 ok(0,
"Unable to extract database\n");
1962 static WCHAR wide_string[100] = { 0 };
1966 result = pSdbMakeIndexKeyFromString(wide_string);
1970 #define expect_indexA (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : expect_indexA_imp 1975 static WCHAR tmp[] = { 0xabba, 0xbcde, 0x2020, 0x20, 0x4444, 0 };
1976 static WCHAR tmp2[] = { 0xabba, 0xbcde, 0x20, 0x4444, 0 };
1977 static WCHAR tmp3[] = { 0x20, 0xbcde, 0x4041, 0x4444, 0 };
1978 static WCHAR tmp4[] = { 0x20, 0xbcde, 0x4041, 0x4444, 0x4444, 0 };
1979 static WCHAR tmp5[] = { 0x2020, 0xbcde, 0x4041, 0x4444, 0x4444, 0 };
1980 static WCHAR tmp6 [] = { 0x20, 0xbcde, 0x4041, 0x4444, 0x4444, 0x4444, 0};
1981 static WCHAR tmp7 [] = { 0xbcde, 0x4041, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0};
1982 static WCHAR tmp8 [] = { 0xbc00, 0x4041, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0};
1987 pSdbMakeIndexKeyFromString(
NULL);
2008 expect_indexA(
"ABABABABZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ", 0x4142414241424142);
2012 result = pSdbMakeIndexKeyFromString(tmp);
2016 result = pSdbMakeIndexKeyFromString(tmp2);
2020 result = pSdbMakeIndexKeyFromString(tmp3);
2024 result = pSdbMakeIndexKeyFromString(tmp4);
2028 result = pSdbMakeIndexKeyFromString(tmp5);
2032 result = pSdbMakeIndexKeyFromString(tmp6);
2036 result = pSdbMakeIndexKeyFromString(tmp7);
2040 result = pSdbMakeIndexKeyFromString(tmp8);
2058 trace(
"SdbGetMatchingExe didnt do anything, cannot determine SDBQUERYRESULT size\n");
2076 trace(
"Unknown size: %i\n",
n);
2102 *(
void**)&pSdbGetDatabaseVersion = (
void *)
GetProcAddress(
hdll,
"SdbGetDatabaseVersion");
2104 *(
void**)&pSdbCloseDatabaseWrite = (
void *)
GetProcAddress(
hdll,
"SdbCloseDatabaseWrite");
2110 *(
void**)&pSdbWriteBinaryTagFromFile = (
void *)
GetProcAddress(
hdll,
"SdbWriteBinaryTagFromFile");
2112 *(
void**)&pSdbWriteStringRefTag = (
void *)
GetProcAddress(
hdll,
"SdbWriteStringRefTag");
2113 *(
void**)&pSdbBeginWriteListTag = (
void *)
GetProcAddress(
hdll,
"SdbBeginWriteListTag");
2117 *(
void**)&pSdbFindFirstNamedTag = (
void *)
GetProcAddress(
hdll,
"SdbFindFirstNamedTag");
2124 *(
void**)&pSdbGetBinaryTagData = (
void *)
GetProcAddress(
hdll,
"SdbGetBinaryTagData");
2135 *(
void**)&pSdbMakeIndexKeyFromString = (
void *)
GetProcAddress(
hdll,
"SdbMakeIndexKeyFromString");
2138 *(
void**)&pSdbQueryDataExTagID = (
void *)
GetProcAddress(
hdll,
"SdbQueryDataExTagID");
2140 *(
void**)&pSdbGetDatabaseInformation = (
void *)
GetProcAddress(
hdll,
"SdbGetDatabaseInformation");
2141 *(
void**)&pSdbFreeDatabaseInformation = (
void *)
GetProcAddress(
hdll,
"SdbFreeDatabaseInformation");
2150 test_MatchApplications<SDBQUERYRESULT_2k3>();
2151 test_MatchApplicationsEx<SDBQUERYRESULT_2k3>();
2154 test_MatchApplications<SDBQUERYRESULT_VISTA>();
2155 test_MatchApplicationsEx<SDBQUERYRESULT_VISTA>();
2158 skip(
"Skipping tests with SDBQUERYRESULT due to a wrong size reported\n");
2163 skip(
"test_SecondaryDB()\n");
struct _DB_INFORMATION * PDB_INFORMATION
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
static void test_IndexKeyFromString(void)
#define TAG_BIN_FILE_VERSION
#define TAG_INTERNAL_NAME
static const WCHAR path2[]
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
struct _DB_INFORMATION DB_INFORMATION
#define TAG_UPTO_BIN_PRODUCT_VERSION
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define WideCharToMultiByte
#define SDBQUERYRESULT_EXPECTED_SIZE_VISTA
#define _WIN32_WINNT_WS03
static LPCWSTR LPCWSTR module_name
IN BOOLEAN OUT PSTR Buffer
static void expect_indexA_imp(const char *text, LONGLONG expected)
char * wine_dbgstr_w(const wchar_t *wstr)
static void check_matching_apphelp(PDB pdb, TAGID apphelp, int num)
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
GLuint GLuint GLsizei count
static bool extract_resource(const WCHAR *Filename, LPCWSTR ResourceName)
const WCHAR * apphelp_details
static void check_db_exes(PDB pdb, TAGID root)
static void check_db_properties(PDB pdb, TAGID root)
static TAGREF(WINAPI *pSdbGetLayerTagRef)(HSDB hsdb
static CHAR AppName[MAX_PATH]
const char * wine_dbgstr_guid(const GUID *guid)
#define INVALID_HANDLE_VALUE
IN PVOID IN PVOID IN USHORT IN USHORT Size
static LONGLONG(WINAPI *pSdbMakeIndexKeyFromString)(LPCWSTR)
DWORD WINAPI GetLastError(VOID)
LPVOID WINAPI LockResource(HGLOBAL handle)
GLenum GLsizei GLenum GLenum const GLvoid * table
DWORD get_module_version(HMODULE mod)
#define TAG_BIN_PRODUCT_VERSION
DEFINE_GUID(GUID_DATABASE_TEST, 0xe39b0eb0, 0x55db, 0x450b, 0x9b, 0xd4, 0xd2, 0x0c, 0x94, 0x84, 0x26, 0x0f)
BOOL WINAPI CheckTokenMembership(IN HANDLE ExistingTokenHandle, IN PSID SidToCheck, OUT PBOOL IsMember)
static void match_strw_attr_imp(PDB pdb, TAGID parent, TAG find, const WCHAR *compare)
static void test_TagRef(void)
static void check_adwExeFlags(DWORD adwExeFlags_0, SDBQUERYRESULT_T &query, const char *file, int line, size_t cur)
static void check_matching_layer(PDB pdb, TAGID layer, int num)
#define ok_hex(expression, result)
#define TAG_MATCHING_FILE
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
#define TAG_UPTO_LINK_DATE
#define HID_DATABASE_FULLPATH
IN PVCB IN PBCB OUT PDIRENT IN USHORT IN POEM_STRING Filename
static void write_db_strings(const WCHAR *name, const WCHAR *data[], size_t count)
#define TAG_LINKER_VERSION
#define TAG_ORIGINAL_FILENAME
#define UnlockResource(h)
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
static struct @1581 test_exedata[5]
const WCHAR * apphelp_title
static TAGID TAGID TAGID nametag
static BOOL IsUserAdmin()
#define _WIN32_WINNT_VISTA
static TAGREF PDB TAGID * ptiWhich
static void check_matching_file(PDB pdb, TAGID exe, TAGID matching_file, int num)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
static PDB TAGID TAGREF * ptrWhich
PVOID WINAPI FreeSid(PSID pSid)
static GUID *static PCWSTR
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
static void test_is_testdb(PDB pdb)
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
#define TAG_APPHELP_DETAILS
static void check_db_layer(PDB pdb, TAGID layer)
#define EXCEPTION_EXECUTE_HANDLER
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
static void Write(HANDLE file, LPCVOID buffer, DWORD size)
#define ok_int(expression, result)
#define TAG_PROBLEMSEVERITY
_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
static LPCWSTR LPCWSTR LPCWSTR DWORD flags
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
static BOOL(WINAPI *pSdbGetDatabaseVersion)(LPCWSTR
static void test_GetDatabaseInformationEmpty(PDB pdb)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
static TAGREF LPCWSTR LPDWORD LPVOID LPDWORD TAGREF * ptrData
#define SECURITY_NT_AUTHORITY
static DWORD g_WinVersion
static void test_MatchApplications(void)
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
static const WCHAR path1[]
GLenum GLuint GLint GLint layer
#define TAG_FILE_DESCRIPTION
static WCHAR no[MAX_STRING_RESOURCE_LEN]
static char tmpdir[MAX_PATH]
static HSDB(WINAPI *pSdbInitDatabase)(DWORD
#define SECURITY_BUILTIN_DOMAIN_RID
static TAGID TAGID TAGID LPCWSTR find_name
void __winetest_cdecl winetest_ok(int condition, const char *msg,...)
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableA(IN LPCSTR lpName, IN LPCSTR lpValue)
static char workdir[MAX_PATH]
static TAGREF LPCWSTR lpszDataName
#define TAG_APP_NAME_RC_ID
static TAGREF LPCWSTR LPDWORD LPVOID LPDWORD lpcbBufferSize
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
static void match_guid_attr_imp(PDB pdb, TAGID parent, TAG find, const GUID *compare)
const GLuint GLenum const GLvoid * binary
#define TAG_VENDOR_NAME_RC_ID
#define SDBQUERYRESULT_EXPECTED_SIZE_2k3
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static void match_dw_attr_imp(PDB pdb, TAGID parent, TAG find, DWORD compare)
static BOOL write_raw_file(const WCHAR *FileName, const void *Data, DWORD Size)
static PVOID(WINAPI *pSdbGetBinaryTagData)(PDB
static void check_db_apphelp(PDB pdb, TAGID root)
static void test_write_ex(void)
#define FILE_ATTRIBUTE_NORMAL
void silence_debug_output(void)
static struct @1582 test_layerdata[2]
#define TAG_STRINGTABLE_ITEM
static void test_Sdb(void)
static void test_Data(void)
static void test_DataTags(HSDB hsdb)
#define TAG_SUMMARY_MSG_RC_ID
static int validate_SDBQUERYRESULT_size()
static VOID(WINAPI *pSdbFreeDatabaseInformation)(PDB_INFORMATION information)
static void test_GetDatabaseInformation(PDB pdb)
#define TAG_APPHELP_TITLE
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static void test_match_ex(const WCHAR *workdir, HSDB hsdb)
static TAGREF LPCWSTR LPDWORD lpdwDataType
static GUID *static SIZE_T
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
#define TAG_UPTO_BIN_FILE_VERSION
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static LPCWSTR LPCWSTR LPCWSTR env
#define MultiByteToWideChar
#define TAG_COMPILER_VERSION
static void(WINAPI *pSdbCloseDatabase)(PDB)
static PDB(WINAPI *pSdbOpenDatabase)(LPCWSTR
static PDB_INFORMATION information
static LPCWSTR LPCWSTR LPCWSTR DWORD PSDBQUERYRESULT_VISTA result
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
static TAGID LPCWSTR LPDWORD LPVOID LPDWORD TAGID * ptiData
#define GetProcAddress(x, y)
static void test_MatchApplicationsEx(void)
static void test_mode_generic(const WCHAR *workdir, HSDB hsdb, size_t cur)
#define _SEH2_EXCEPT(...)
#define MAKEINTRESOURCEW(i)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
static void test_stringtable()
#define DOMAIN_ALIAS_RID_ADMINS
#define TAG_PRODUCT_VERSION
#define TAG_LEGAL_COPYRIGHT
static void match_qw_attr_imp(PDB pdb, TAGID parent, TAG find, QWORD compare)
static void test_CheckDatabaseManually(void)
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)
SID_IDENTIFIER_AUTHORITY NtAuthority
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)
#define ERROR_INSUFFICIENT_BUFFER