11#define WIN32_NO_STATUS
34#define TAG_TYPE_MASK 0xF000
36#define TAG_TYPE_NULL 0x1000
37#define TAG_TYPE_BYTE 0x2000
38#define TAG_TYPE_WORD 0x3000
39#define TAG_TYPE_DWORD 0x4000
40#define TAG_TYPE_QWORD 0x5000
41#define TAG_TYPE_STRINGREF 0x6000
42#define TAG_TYPE_LIST 0x7000
43#define TAG_TYPE_STRING 0x8000
44#define TAG_TYPE_BINARY 0x9000
46#define TAG_SIZE (0x1 | TAG_TYPE_DWORD)
47#define TAG_CHECKSUM (0x3 | TAG_TYPE_DWORD)
48#define TAG_MODULE_TYPE (0x6 | TAG_TYPE_DWORD)
49#define TAG_VERDATEHI (0x7 | TAG_TYPE_DWORD)
50#define TAG_VERDATELO (0x8 | TAG_TYPE_DWORD)
51#define TAG_VERFILEOS (0x9 | TAG_TYPE_DWORD)
52#define TAG_VERFILETYPE (0xA | TAG_TYPE_DWORD)
53#define TAG_PE_CHECKSUM (0xB | TAG_TYPE_DWORD)
54#define TAG_VER_LANGUAGE (0x12 | TAG_TYPE_DWORD)
55#define TAG_LINKER_VERSION (0x1C | TAG_TYPE_DWORD)
56#define TAG_LINK_DATE (0x1D | TAG_TYPE_DWORD)
57#define TAG_UPTO_LINK_DATE (0x1E | TAG_TYPE_DWORD)
58#define TAG_EXE_WRAPPER (0x31 | TAG_TYPE_DWORD)
59#define TAG_BIN_FILE_VERSION (0x2 | TAG_TYPE_QWORD)
60#define TAG_BIN_PRODUCT_VERSION (0x3 | TAG_TYPE_QWORD)
61#define TAG_UPTO_BIN_PRODUCT_VERSION (0x6 | TAG_TYPE_QWORD)
62#define TAG_UPTO_BIN_FILE_VERSION (0xD | TAG_TYPE_QWORD)
63#define TAG_NAME (0x1 | TAG_TYPE_STRINGREF)
64#define TAG_COMPANY_NAME (0x9 | TAG_TYPE_STRINGREF)
65#define TAG_PRODUCT_NAME (0x10 | TAG_TYPE_STRINGREF)
66#define TAG_PRODUCT_VERSION (0x11 | TAG_TYPE_STRINGREF)
67#define TAG_FILE_DESCRIPTION (0x12 | TAG_TYPE_STRINGREF)
68#define TAG_FILE_VERSION (0x13 | TAG_TYPE_STRINGREF)
69#define TAG_ORIGINAL_FILENAME (0x14 | TAG_TYPE_STRINGREF)
70#define TAG_INTERNAL_NAME (0x15 | TAG_TYPE_STRINGREF)
71#define TAG_LEGAL_COPYRIGHT (0x16 | TAG_TYPE_STRINGREF)
72#define TAG_16BIT_DESCRIPTION (0x17 | TAG_TYPE_STRINGREF)
73#define TAG_16BIT_MODULE_NAME (0x20 | TAG_TYPE_STRINGREF)
74#define TAG_EXPORT_NAME (0x24 | TAG_TYPE_STRINGREF)
77#define ATTRIBUTE_AVAILABLE 0x1
78#define ATTRIBUTE_FAILED 0x2
102DEFINE_GUID(
GUID_DATABASE_MSI,0xd8ff6d16,0x6a3a,0x468a,0x8b,0x44,0x01,0x71,0x4d,0xdc,0x49,0xea);
103DEFINE_GUID(
GUID_DATABASE_SHIM,0x11111111,0x1111,0x1111,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11);
104DEFINE_GUID(
GUID_DATABASE_DRIVERS,0xf9ab2228,0x3312,0x4a73,0xb6,0xf9,0x93,0x6d,0x70,0xe1,0x12,0xef);
106DEFINE_GUID(
GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
108DEFINE_GUID(test_Microsoft_Browser_Architecture, 0xa5e46e3a, 0x8849, 0x11d1, 0x9d, 0x8c, 0x00, 0xc0, 0x4f, 0xc9, 0x9d, 0x61);
109DEFINE_GUID(test_UserAssist, 0xdd313e04, 0xfeff, 0x11d1, 0x8e, 0xcd, 0x00, 0x00, 0xf8, 0x7a, 0x47, 0x0c);
110DEFINE_GUID(CLSID_InternetSecurityManager, 0x7b8a2d94, 0x0ac9, 0x11d1, 0x89, 0x6c, 0x00, 0xc0, 0x4f, 0xB6, 0xbf, 0xc4);
115 &test_Microsoft_Browser_Architecture,
119 &CLSID_InternetSecurityManager,
130 if (!pApphelpCheckShellObject)
132 win_skip(
"ApphelpCheckShellObject not available\n");
141 ok(
res && (
flags == 0),
"%s 0: got %d and 0x%x%08x with 0x%x (expected TRUE and 0)\n",
147 ok(
res && (
flags == 0),
"%s 1: got %d and 0x%x%08x with 0x%x (expected TRUE and 0)\n",
169 static const TAG invalid_values[] = {
173 0x900, 0xFFFF, 0xDEAD, 0xBEEF
175 static const WCHAR invalid[] = {
'I',
'n',
'v',
'a',
'l',
'i',
'd',
'T',
'a',
'g',0};
179 for (
i = 0;
i < 9; ++
i)
181 ret = pSdbTagToString(invalid_values[
i]);
202 for (;
n < upperlimit; ++
n)
221 "InvalidTag",
"INCLUDE",
"GENERAL",
"MATCH_LOGIC_NOT",
"APPLY_ALL_SHIMS",
"USE_SERVICE_PACK_FILES",
NULL
227 "InvalidTag",
"INCLUDE",
"GENERAL",
"MATCH_LOGIC_NOT",
"APPLY_ALL_SHIMS",
"USE_SERVICE_PACK_FILES",
"MITIGATION_OS",
"BLOCK_UPGRADE",
228 "INCLUDEEXCLUDEDLL",
NULL
234 "InvalidTag",
"INCLUDE",
"GENERAL",
"MATCH_LOGIC_NOT",
"APPLY_ALL_SHIMS",
"USE_SERVICE_PACK_FILES",
"MITIGATION_OS",
"BLOCK_UPGRADE",
235 "INCLUDEEXCLUDEDLL",
"RAC_EVENT_OFF",
"TELEMETRY_OFF",
"SHIM_ENGINE_OFF",
"LAYER_PROPAGATION_OFF",
"REINSTALL_UPGRADE",
NULL
249 "InvalidTag",
"MATCH_MODE",
NULL
255 "InvalidTag",
"MATCH_MODE",
"QUIRK_COMPONENT_CODE_ID",
"QUIRK_CODE_ID",
NULL
261 "InvalidTag",
"TAG",
"INDEX_TAG",
"INDEX_KEY",
NULL
268 "InvalidTag",
"SIZE",
"OFFSET",
"CHECKSUM",
"SHIM_TAGID",
"PATCH_TAGID",
"MODULE_TYPE",
"VERFILEDATEHI",
269 "VERFILEDATELO",
"VERFILEOS",
"VERFILETYPE",
"PE_CHECKSUM",
"PREVOSMAJORVERSION",
"PREVOSMINORVERSION",
"PREVOSPLATFORMID",
"PREVOSBUILDNO",
270 "PROBLEM_SEVERITY",
"APPHELP_LANGID",
"VER_LANGUAGE",
"InvalidTag",
"ENGINE",
"HTMLHELPID",
"INDEXFLAGS",
"FLAGS",
271 "VALUETYPE",
"DATA_DWORD",
"LAYER_TAGID",
"MSI_TRANSFORM_TAGID",
"LINKER_VERSION",
"LINK_DATE",
"UPTO_LINK_DATE",
"OS_SERVICE_PACK",
272 "FLAG_TAGID",
"RUNTIME_PLATFORM",
"OS_SKU",
NULL
278 "InvalidTag",
"SIZE",
"OFFSET",
"CHECKSUM",
"SHIM_TAGID",
"PATCH_TAGID",
"MODULE_TYPE",
"VERFILEDATEHI",
279 "VERFILEDATELO",
"VERFILEOS",
"VERFILETYPE",
"PE_CHECKSUM",
"PREVOSMAJORVERSION",
"PREVOSMINORVERSION",
"PREVOSPLATFORMID",
"PREVOSBUILDNO",
280 "PROBLEM_SEVERITY",
"APPHELP_LANGID",
"VER_LANGUAGE",
"InvalidTag",
"ENGINE",
"HTMLHELPID",
"INDEXFLAGS",
"FLAGS",
281 "VALUETYPE",
"DATA_DWORD",
"LAYER_TAGID",
"MSI_TRANSFORM_TAGID",
"LINKER_VERSION",
"LINK_DATE",
"UPTO_LINK_DATE",
"OS_SERVICE_PACK",
282 "FLAG_TAGID",
"RUNTIME_PLATFORM",
"OS_SKU",
"OS_PLATFORM",
NULL
288 "InvalidTag",
"SIZE",
"OFFSET",
"CHECKSUM",
"SHIM_TAGID",
"PATCH_TAGID",
"MODULE_TYPE",
"VERDATEHI",
289 "VERDATELO",
"VERFILEOS",
"VERFILETYPE",
"PE_CHECKSUM",
"PREVOSMAJORVER",
"PREVOSMINORVER",
"PREVOSPLATFORMID",
"PREVOSBUILDNO",
290 "PROBLEMSEVERITY",
"LANGID",
"VER_LANGUAGE",
"InvalidTag",
"ENGINE",
"HTMLHELPID",
"INDEX_FLAGS",
"FLAGS",
291 "DATA_VALUETYPE",
"DATA_DWORD",
"LAYER_TAGID",
"MSI_TRANSFORM_TAGID",
"LINKER_VERSION",
"LINK_DATE",
"UPTO_LINK_DATE",
"OS_SERVICE_PACK",
292 "FLAG_TAGID",
"RUNTIME_PLATFORM",
"OS_SKU",
"OS_PLATFORM",
"APP_NAME_RC_ID",
"VENDOR_NAME_RC_ID",
"SUMMARY_MSG_RC_ID",
"VISTA_SKU",
299 "InvalidTag",
"SIZE",
"OFFSET",
"CHECKSUM",
"SHIM_TAGID",
"PATCH_TAGID",
"MODULE_TYPE",
"VERDATEHI",
300 "VERDATELO",
"VERFILEOS",
"VERFILETYPE",
"PE_CHECKSUM",
"PREVOSMAJORVER",
"PREVOSMINORVER",
"PREVOSPLATFORMID",
"PREVOSBUILDNO",
301 "PROBLEMSEVERITY",
"LANGID",
"VER_LANGUAGE",
"InvalidTag",
"ENGINE",
"HTMLHELPID",
"INDEX_FLAGS",
"FLAGS",
302 "DATA_VALUETYPE",
"DATA_DWORD",
"LAYER_TAGID",
"MSI_TRANSFORM_TAGID",
"LINKER_VERSION",
"LINK_DATE",
"UPTO_LINK_DATE",
"OS_SERVICE_PACK",
303 "FLAG_TAGID",
"RUNTIME_PLATFORM",
"OS_SKU",
"OS_PLATFORM",
"APP_NAME_RC_ID",
"VENDOR_NAME_RC_ID",
"SUMMARY_MSG_RC_ID",
"VISTA_SKU",
304 "DESCRIPTION_RC_ID",
"PARAMETER1_RC_ID",
"InvalidTag",
"InvalidTag",
"InvalidTag",
"InvalidTag",
"InvalidTag",
"InvalidTag",
305 "CONTEXT_TAGID",
"EXE_WRAPPER",
"URL_ID",
NULL
311 "InvalidTag",
"TAGID",
NULL
318 "InvalidTag",
"TIME",
"BIN_FILE_VERSION",
"BIN_PRODUCT_VERSION",
"MODTIME",
"FLAG_MASK_KERNEL",
"UPTO_BIN_PRODUCT_VERSION",
"DATA_QWORD",
319 "FLAG_MASK_USER",
"FLAGS_NTVDM1",
"FLAGS_NTVDM2",
"FLAGS_NTVDM3",
"FLAG_MASK_SHELL",
"UPTO_BIN_FILE_VERSION",
NULL
325 "InvalidTag",
"TIME",
"BIN_FILE_VERSION",
"BIN_PRODUCT_VERSION",
"MODTIME",
"FLAG_MASK_KERNEL",
"UPTO_BIN_PRODUCT_VERSION",
"DATA_QWORD",
326 "FLAG_MASK_USER",
"FLAGS_NTVDM1",
"FLAGS_NTVDM2",
"FLAGS_NTVDM3",
"FLAG_MASK_SHELL",
"UPTO_BIN_FILE_VERSION",
"FLAG_MASK_FUSION",
"FLAGS_PROCESSPARAM",
333 "InvalidTag",
"TIME",
"BIN_FILE_VERSION",
"BIN_PRODUCT_VERSION",
"MODTIME",
"FLAG_MASK_KERNEL",
"UPTO_BIN_PRODUCT_VERSION",
"DATA_QWORD",
334 "FLAG_MASK_USER",
"FLAGS_NTVDM1",
"FLAGS_NTVDM2",
"FLAGS_NTVDM3",
"FLAG_MASK_SHELL",
"UPTO_BIN_FILE_VERSION",
"FLAG_MASK_FUSION",
"FLAG_PROCESSPARAM",
335 "FLAG_LUA",
"FLAG_INSTALL",
NULL
342 "InvalidTag",
"NAME",
"DESCRIPTION",
"MODULE",
"API",
"VENDOR",
"APP_NAME",
"InvalidTag",
343 "COMMAND_LINE",
"COMPANY_NAME",
"DLLFILE",
"WILDCARD_NAME",
"InvalidTag",
"InvalidTag",
"InvalidTag",
"InvalidTag",
344 "PRODUCT_NAME",
"PRODUCT_VERSION",
"FILE_DESCRIPTION",
"FILE_VERSION",
"ORIGINAL_FILENAME",
"INTERNAL_NAME",
"LEGAL_COPYRIGHT",
"S16BIT_DESCRIPTION",
345 "PROBLEM_DETAILS",
"LINK_URL",
"LINK_TEXT",
"APPHELP_TITLE",
"APPHELP_CONTACT",
"SXS_MANIFEST",
"DATA_STRING",
"MSI_TRANSFORM_FILE",
346 "S16BIT_MODULE_NAME",
"LAYER_DISPLAYNAME",
"COMPILER_VERSION",
"ACTION_TYPE",
NULL
352 "InvalidTag",
"NAME",
"DESCRIPTION",
"MODULE",
"API",
"VENDOR",
"APP_NAME",
"InvalidTag",
353 "COMMAND_LINE",
"COMPANY_NAME",
"DLLFILE",
"WILDCARD_NAME",
"InvalidTag",
"InvalidTag",
"InvalidTag",
"InvalidTag",
354 "PRODUCT_NAME",
"PRODUCT_VERSION",
"FILE_DESCRIPTION",
"FILE_VERSION",
"ORIGINAL_FILENAME",
"INTERNAL_NAME",
"LEGAL_COPYRIGHT",
"16BIT_DESCRIPTION",
355 "APPHELP_DETAILS",
"LINK_URL",
"LINK_TEXT",
"APPHELP_TITLE",
"APPHELP_CONTACT",
"SXS_MANIFEST",
"DATA_STRING",
"MSI_TRANSFORM_FILE",
356 "16BIT_MODULE_NAME",
"LAYER_DISPLAYNAME",
"COMPILER_VERSION",
"ACTION_TYPE",
"EXPORT_NAME",
NULL
362 "InvalidTag",
"NAME",
"DESCRIPTION",
"MODULE",
"API",
"VENDOR",
"APP_NAME",
"InvalidTag",
363 "COMMAND_LINE",
"COMPANY_NAME",
"DLLFILE",
"WILDCARD_NAME",
"InvalidTag",
"InvalidTag",
"InvalidTag",
"InvalidTag",
364 "PRODUCT_NAME",
"PRODUCT_VERSION",
"FILE_DESCRIPTION",
"FILE_VERSION",
"ORIGINAL_FILENAME",
"INTERNAL_NAME",
"LEGAL_COPYRIGHT",
"16BIT_DESCRIPTION",
365 "APPHELP_DETAILS",
"LINK_URL",
"LINK_TEXT",
"APPHELP_TITLE",
"APPHELP_CONTACT",
"SXS_MANIFEST",
"DATA_STRING",
"MSI_TRANSFORM_FILE",
366 "16BIT_MODULE_NAME",
"LAYER_DISPLAYNAME",
"COMPILER_VERSION",
"ACTION_TYPE",
"EXPORT_NAME",
"URL",
NULL
373 "InvalidTag",
"DATABASE",
"LIBRARY",
"INEXCLUDE",
"SHIM",
"PATCH",
"APP",
"EXE",
374 "MATCHING_FILE",
"SHIM_REF",
"PATCH_REF",
"LAYER",
"FILE",
"APPHELP",
"LINK",
"DATA",
375 "MSI TRANSFORM",
"MSI TRANSFORM REF",
"MSI PACKAGE",
"FLAG",
"MSI CUSTOM ACTION",
"FLAG_REF",
"ACTION",
NULL
381 "InvalidTag",
"DATABASE",
"LIBRARY",
"INEXCLUDE",
"SHIM",
"PATCH",
"APP",
"EXE",
382 "MATCHING_FILE",
"SHIM_REF",
"PATCH_REF",
"LAYER",
"FILE",
"APPHELP",
"LINK",
"DATA",
383 "MSI_TRANSFORM",
"MSI_TRANSFORM_REF",
"MSI_PACKAGE",
"FLAG",
"MSI_CUSTOM_ACTION",
"FLAG_REF",
"ACTION",
"LOOKUP",
390 "InvalidTag",
"DATABASE",
"LIBRARY",
"INEXCLUDE",
"SHIM",
"PATCH",
"APP",
"EXE",
391 "MATCHING_FILE",
"SHIM_REF",
"PATCH_REF",
"LAYER",
"FILE",
"APPHELP",
"LINK",
"DATA",
392 "MSI_TRANSFORM",
"MSI_TRANSFORM_REF",
"MSI_PACKAGE",
"FLAG",
"MSI_CUSTOM_ACTION",
"FLAG_REF",
"ACTION",
"LOOKUP",
393 "CONTEXT",
"CONTEXT_REF",
"InvalidTag",
"InvalidTag",
"InvalidTag",
"InvalidTag",
"InvalidTag",
"InvalidTag",
400 "InvalidTag",
"STRINGTABLE",
"INDEXES",
"INDEX",
NULL
413 "InvalidTag",
"STRTAB_ITEM",
NULL
419 "InvalidTag",
"STRINGTABLE_ITEM",
NULL
427 "InvalidTag",
"InvalidTag",
"PATCH_BITS",
"FILE_BITS",
"EXE_ID(GUID)",
"DATA_BITS",
"MSI_PACKAGE_ID(GUID)",
"DATABASE_ID(GUID)",
434 "InvalidTag",
"InvalidTag",
"PATCH_BITS",
"FILE_BITS",
"EXE_ID",
"DATA_BITS",
"MSI_PACKAGE_ID",
"DATABASE_ID",
441 "InvalidTag",
"InvalidTag",
"PATCH_BITS",
"FILE_BITS",
"EXE_ID",
"DATA_BITS",
"MSI_PACKAGE_ID",
"DATABASE_ID",
442 "CONTEXT_PLATFORM_ID",
"CONTEXT_BRANCH_ID",
"InvalidTag",
"InvalidTag",
"InvalidTag",
"InvalidTag",
"InvalidTag",
"InvalidTag",
443 "FIX_ID",
"APP_ID",
NULL
449 "InvalidTag",
"INDEX_BITS",
NULL
453 { 0, 0, 0, 0, 0, {
NULL } }
473 ok(pSdbIsNullGUID(&
GUID_NULL),
"expected GUID_NULL to be recognized as NULL GUID\n");
474 ok(pSdbIsNullGUID(
NULL),
"expected NULL to be recognized as NULL GUID\n");
475 ok(pSdbIsNullGUID(&test_UserAssist) == 0,
"expected a set GUID not to be recognized as NULL GUID\n");
478 ok(pSdbGetStandardDatabaseGUID(0, &
guid) == 0,
"Expected SdbGetStandardDatabaseGUID to fail\n");
481 ok(pSdbGetStandardDatabaseGUID(0x80020000,
NULL),
"Expected SdbGetStandardDatabaseGUID to succeed\n");
484 ok(pSdbGetStandardDatabaseGUID(0x80020000, &
guid),
"Expected SdbGetStandardDatabaseGUID to succeed\n");
488 ok(pSdbGetStandardDatabaseGUID(0x80030000, &
guid),
"Expected SdbGetStandardDatabaseGUID to succeed\n");
492 ok(pSdbGetStandardDatabaseGUID(0x80040000, &
guid),
"Expected SdbGetStandardDatabaseGUID to succeed\n");
574 for (
n = 0;
n < allTags[
n]; ++
n)
576 if (allTags[
n] ==
tag)
593 winetest_ok(
p->qwattr == 0,
"expected entry #%d to be 0, was 0x%I64x\n",
num,
p->qwattr);
605 winetest_ok(
p->flags == 0,
"expected entry #%d to be 0, was %d\n",
num,
p->flags);
606 winetest_ok(
p->qwattr == 0,
"expected entry #%d to be 0, was 0x%I64x\n",
num,
p->qwattr);
651#define expect_tag_skip (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : expect_tag_skip_imp
652#define expect_tag_empty (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : expect_tag_empty_imp
653#define expect_tag_dword (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : expect_tag_dword_imp
654#define expect_tag_qword (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : expect_tag_qword_imp
655#define expect_tag_str (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : expect_tag_str_imp
656#define expect_tag_skip_range(ptr, from, to) \
658 int n = (from), n_end = (to); \
659 winetest_set_location(__FILE__, __LINE__); \
660 for ( ; n < n_end; ++n) \
661 expect_tag_skip_imp((ptr), n); \
663#define test_crc (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : test_crc_imp
664#define test_crc2 (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : test_crc2_imp
671 if (!pSdbFreeFileAttributes)
679 if (pSdbGetFileAttributes(
filename, &pattrinfo, &
num))
685 if (pattrinfo[16].dwattr != 3 && pattrinfo[16].dwattr != 2)
686 printf(
"TAG_MODULE_TYPE(%S): %d\n",
filename, pattrinfo[16].dwattr);
687 if (pattrinfo[16].dwattr == 2)
689 printf(
"TAG_MODULE_TYPE(%S): %d, %d\n",
filename, pattrinfo[16].dwattr, pattrinfo[0].dwattr);
697 if (pattrinfo[27].dwattr != 0)
698 printf(
"TAG_EXE_WRAPPER(%S): %d\n",
filename, pattrinfo[27].dwattr);
701 pSdbFreeFileAttributes(pattrinfo);
707 static const WCHAR path[] = {
't',
'e',
's',
't',
'x',
'x',
'.',
'e',
'x',
'e',0};
708 static char crc_test[] = {4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 2, 2, 2, 2};
715 ret = pSdbGetFileAttributes(
path, &pattrinfo, &
num);
725 pSdbFreeFileAttributes(pattrinfo);
730 static const WCHAR path[] = {
't',
'e',
's',
't',
'x',
'x',
'.',
'e',
'x',
'e',0};
742 ret = pSdbGetFileAttributes(
path, &pattrinfo, &
num);
753 pSdbFreeFileAttributes(pattrinfo);
760 static const WCHAR path[] = {
't',
'e',
's',
't',
'x',
'x',
'.',
'e',
'x',
'e',0};
761 static const WCHAR PRODUCT_VERSION[] = {
'1',
'.',
'0',
'.',
'0',
'.',
'1',0};
762 static const WCHAR FILE_DESCRIPTION[] = {
'F',
'i',
'l',
'e',
'D',
'e',
's',
'c',
'r',
'i',
'p',
't',
'i',
'o',
'n',0};
763 static const WCHAR COMPANY_NAME[] = {
'C',
'o',
'm',
'p',
'a',
'n',
'y',
'N',
'a',
'm',
'e',0};
764 static const WCHAR PRODUCT_NAME[] = {
'P',
'r',
'o',
'd',
'u',
'c',
't',
'N',
'a',
'm',
'e',0};
765 static const WCHAR FILE_VERSION[] = {
'1',
'.',
'0',
'.',
'0',
'.',
'0',0};
766 static const WCHAR ORIGINAL_FILENAME[] = {
'O',
'r',
'i',
'g',
'i',
'n',
'a',
'l',
'F',
'i',
'l',
'e',
'n',
'a',
'm',
'e',0};
767 static const WCHAR INTERNAL_NAME[] = {
'I',
'n',
't',
'e',
'r',
'n',
'a',
'l',
'N',
'a',
'm',
'e',0};
768 static const WCHAR LEGAL_COPYRIGHT[] = {
'L',
'e',
'g',
'a',
'l',
'C',
'o',
'p',
'y',
'r',
'i',
'g',
'h',
't',0};
769 static const WCHAR EXPORT_NAME[] = {
'T',
'e',
'S',
't',
'2',
'.',
'e',
'x',
'e',0};
770 static const WCHAR OS2_DESCRIPTION[] = {
'M',
'O',
'D',
' ',
'D',
'E',
'S',
'C',
'R',
'I',
'P',
'T',
'I',
'O',
'N',
' ',
'H',
'E',
'R',
'E',0};
771 static const WCHAR OS2_EXPORT_NAME[] = {
'T',
'E',
'S',
'T',
'M',
'O',
'D',
'.',
'h',
'X',
'x',0};
772 static const WCHAR OS2_DESCRIPTION_broken[] = {
'Z',0};
773 static const WCHAR OS2_EXPORT_NAME_broken[] = {
'E',0};
781 ret = pSdbGetFileAttributes(
path, &pattrinfo, &
num);
782 ok(
ret ==
FALSE,
"expected SdbGetFileAttributes to fail.\n");
783 ok(pattrinfo == (
PATTRINFO)0xdead,
"expected the pointer not to change.\n");
784 ok(
num == 333,
"expected the number of items not to change.\n");
786 pSdbFreeFileAttributes(pattrinfo);
791 ret = pSdbGetFileAttributes(
path, &pattrinfo, &
num);
792 ok(
ret !=
FALSE,
"expected SdbGetFileAttributes to succeed.\n");
793 ok(pattrinfo != (
PATTRINFO)0xdead,
"expected a valid pointer.\n");
811 ok(0,
"Unknown attrinfo size: %u\n",
num);
849 pSdbFreeFileAttributes(pattrinfo);
855 ret = pSdbGetFileAttributes(
path, &pattrinfo, &
num);
856 ok(
ret !=
FALSE,
"expected SdbGetFileAttributes to succeed.\n");
857 ok(pattrinfo != (
PATTRINFO)0xdead,
"expected a valid pointer.\n");
876 pSdbFreeFileAttributes(pattrinfo);
881 ret = pSdbGetFileAttributes(
path, &pattrinfo, &
num);
882 ok(
ret !=
FALSE,
"expected SdbGetFileAttributes to succeed.\n");
883 ok(pattrinfo != (
PATTRINFO)0xdead,
"expected a valid pointer.\n");
897 pSdbFreeFileAttributes(pattrinfo);
902 ret = pSdbGetFileAttributes(
path, &pattrinfo, &
num);
903 ok(
ret !=
FALSE,
"expected SdbGetFileAttributes to succeed.\n");
904 ok(pattrinfo != (
PATTRINFO)0xdead,
"expected a valid pointer.\n");
915 pSdbFreeFileAttributes(pattrinfo);
920 ret = pSdbGetFileAttributes(
path, &pattrinfo, &
num);
921 ok(
ret !=
FALSE,
"expected SdbGetFileAttributes to succeed.\n");
922 ok(pattrinfo != (
PATTRINFO)0xdead,
"expected a valid pointer.\n");
940 pSdbFreeFileAttributes(pattrinfo);
945 ret = pSdbGetFileAttributes(
path, &pattrinfo, &
num);
946 ok(
ret !=
FALSE,
"expected SdbGetFileAttributes to succeed.\n");
947 ok(pattrinfo != (
PATTRINFO)0xdead,
"expected a valid pointer.\n");
965 pSdbFreeFileAttributes(pattrinfo);
1029 trace(
"SdbGetAppPatchDir did not handle a NULL pointer very gracefully.\n");
1061 ok(
Buffer[
n] == 0xbbbb,
"Expected SdbGetAppPatchDir to leave WCHAR at %d untouched, was: %d\n",
1076#define RESOLVE(fnc) do { p##fnc = (void *) GetProcAddress(hdll, #fnc); ok(!!p##fnc, #fnc " not found.\n"); } while (0)
1092 if (pSdbGetAppPatchDir)
_STLP_MOVE_TO_STD_NAMESPACE void fill(_ForwardIter __first, _ForwardIter __last, const _Tp &__val)
BOOL WINAPI SdbFreeFileAttributes(PATTRINFO attr_info)
LPCWSTR WINAPI SdbTagToString(TAG tag)
BOOL WINAPI SdbGUIDToString(CONST GUID *Guid, PWSTR GuidString, SIZE_T Length)
HRESULT WINAPI SdbGetAppPatchDir(HSDB db, LPWSTR path, DWORD size)
BOOL WINAPI SdbIsNullGUID(CONST GUID *Guid)
BOOL WINAPI SdbGetFileAttributes(LPCWSTR path, PATTRINFO *attr_info_ret, LPDWORD attr_count)
DWORD get_module_version(HMODULE mod)
void silence_debug_output(void)
void test_create_file_imp(const WCHAR *name, const char *contents, size_t len)
#define ok_hex(expression, result)
#define ERROR_INSUFFICIENT_BUFFER
BOOL WINAPI ApphelpCheckShellObject(REFCLSID ObjectCLSID, BOOL bShimIfNecessary, ULONGLONG *pullFlags)
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define WideCharToMultiByte
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf
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 i
#define EXCEPTION_EXECUTE_HANDLER
#define TAG_UPTO_BIN_FILE_VERSION
static const CLSID * objects[]
static void expect_tag_str_imp(PATTRINFO pattr, TAG tag, const WCHAR *value)
static DWORD g_AttrInfoSize
#define TAG_ORIGINAL_FILENAME
#define TAG_LINKER_VERSION
#define TAG_16BIT_DESCRIPTION
#define TAG_UPTO_LINK_DATE
static void expect_tag_qword_imp(PATTRINFO pattr, TAG tag, QWORD value)
#define TAG_TYPE_STRINGREF
#define TAG_FILE_DESCRIPTION
#define TAG_BIN_FILE_VERSION
static PATTRINFO * ppAttrInfo
static PWSTR SIZE_T Length
static PATTRINFO LPDWORD pdwAttrCount
static void test_crc2_imp(DWORD len, int fill, DWORD expected)
struct tagATTRINFO ATTRINFO
struct tagATTRINFO * PATTRINFO
#define TAG_UPTO_BIN_PRODUCT_VERSION
#define ATTRIBUTE_AVAILABLE
void test_tag(TAG base, const char *names[], size_t upperlimit, int line)
#define TAG_LEGAL_COPYRIGHT
static int strcmp_wa(LPCWSTR strw, const char *stra)
static void expect_tag_empty_imp(PATTRINFO pattr, TAG tag)
void test_onefile(WCHAR *filename)
static void test_SdbGetAppPatchDir(void)
static void expect_tag_dword_imp(PATTRINFO pattr, TAG tag, DWORD value)
static void test_GuidFunctions(void)
static void test_SdbTagToStringAllTags(void)
static DWORD find_tag(TAG tag)
static void test_crc_imp(size_t len, DWORD expected)
#define TAG_16BIT_MODULE_NAME
static void test_ApplicationAttributes(void)
#define TAG_BIN_PRODUCT_VERSION
static void expect_tag_skip_imp(PATTRINFO pattr, TAG tag)
#define TAG_INTERNAL_NAME
static void test_ApphelpCheckShellObject(void)
#define TAG_PRODUCT_VERSION
static void test_SdbTagToString(void)
static const char * strw(LPCWSTR x)
#define expect_hr(expected, got)
static const WCHAR invalid[]
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualGUID(rguid1, rguid2)
#define _SEH2_EXCEPT(...)
BOOL WINAPI SdbGetStandardDatabaseGUID(DWORD Flags, GUID *Guid)
static const GUID GUID_DATABASE_DRIVERS
static const GUID GUID_DATABASE_MSI
static const GUID GUID_DATABASE_SHIM
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
void __winetest_cdecl winetest_ok(int condition, const char *msg,...)
DWORD WINAPI GetLastError(void)
#define HRESULT_FROM_WIN32(x)
_Must_inspect_result_ _In_ ULONG Flags