45DEFINE_GUID(
GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
47static const char *
msifile =
"winetest-automation.msi";
59static const CHAR component_dat[] =
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
60 "s72\tS38\ts72\ti2\tS255\tS72\n"
61 "Component\tComponent\n"
62 "Five\t{8CC92E9D-14B2-4CA4-B2AA-B11D02078087}\tNEWDIR\t2\t\tfive.txt\n"
63 "Four\t{FD37B4EA-7209-45C0-8917-535F35A2F080}\tCABOUTDIR\t2\t\tfour.txt\n"
64 "One\t{783B242E-E185-4A56-AF86-C09815EC053C}\tMSITESTDIR\t2\t\tone.txt\n"
65 "Three\t{010B6ADD-B27D-4EDD-9B3D-34C4F7D61684}\tCHANGEDDIR\t2\t\tthree.txt\n"
66 "Two\t{BF03D1A6-20DA-4A65-82F3-6CAC995915CE}\tFIRSTDIR\t2\t\ttwo.txt\n"
67 "dangler\t{6091DF25-EF96-45F1-B8E9-A9B1420C7A3C}\tTARGETDIR\t4\t\tregdata\n"
68 "component\t\tMSITESTDIR\t0\t1\tfile\n";
72 "Directory\tDirectory\n"
73 "CABOUTDIR\tMSITESTDIR\tcabout\n"
74 "CHANGEDDIR\tMSITESTDIR\tchanged:second\n"
75 "FIRSTDIR\tMSITESTDIR\tfirst\n"
76 "MSITESTDIR\tProgramFilesFolder\tmsitest\n"
77 "NEWDIR\tCABOUTDIR\tnew\n"
78 "ProgramFilesFolder\tTARGETDIR\t.\n"
79 "TARGETDIR\t\tSourceDir\n";
81static const CHAR feature_dat[] =
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
82 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
84 "Five\t\tFive\tThe Five Feature\t5\t3\tNEWDIR\t0\n"
85 "Four\t\tFour\tThe Four Feature\t4\t3\tCABOUTDIR\t0\n"
86 "One\t\tOne\tThe One Feature\t1\t3\tMSITESTDIR\t0\n"
87 "Three\tOne\tThree\tThe Three Feature\t3\t3\tCHANGEDDIR\t0\n"
88 "Two\tOne\tTwo\tThe Two Feature\t2\t3\tFIRSTDIR\t0\n"
89 "feature\t\t\t\t2\t1\tTARGETDIR\t0\n";
93 "FeatureComponents\tFeature_\tComponent_\n"
99 "feature\tcomponent\n";
101static const CHAR file_dat[] =
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
102 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
104 "five.txt\tFive\tfive.txt\t1000\t\t\t0\t5\n"
105 "four.txt\tFour\tfour.txt\t1000\t\t\t0\t4\n"
106 "one.txt\tOne\tone.txt\t1000\t\t\t0\t1\n"
107 "three.txt\tThree\tthree.txt\t1000\t\t\t0\t3\n"
108 "two.txt\tTwo\ttwo.txt\t1000\t\t\t0\t2\n"
109 "file\tcomponent\tfilename\t100\t\t\t8192\t1\n";
113 "InstallExecuteSequence\tAction\n"
114 "AllocateRegistrySpace\tNOT Installed\t1550\n"
115 "CostFinalize\t\t1000\n"
116 "CostInitialize\t\t800\n"
118 "InstallFiles\t\t4000\n"
119 "RegisterProduct\t\t6100\n"
120 "PublishProduct\t\t6400\n"
121 "InstallFinalize\t\t6600\n"
122 "InstallInitialize\t\t1500\n"
123 "InstallValidate\t\t1400\n"
124 "LaunchConditions\t\t100\n"
125 "WriteRegistryValues\tSourceDir And SOURCEDIR\t5000\n";
127static const CHAR media_dat[] =
"DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
128 "i2\ti4\tL64\tS255\tS32\tS72\n"
130 "1\t5\t\t\tDISK1\t\n";
134 "Property\tProperty\n"
135 "DefaultUIFont\tDlgFont8\n"
138 "InstallMode\tTypical\n"
139 "Manufacturer\tWine\n"
140 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
141 "ProductCode\t{837450fa-a39b-4bc8-b321-08b393f784b3}\n"
143 "ProductLanguage\t1033\n"
144 "ProductName\tMSITEST\n"
145 "ProductVersion\t1.1.1\n"
146 "PROMPTROLLBACKCOST\tP\n"
148 "UpgradeCode\t{CE067E8D-2E1A-4367-B734-4EB2BDAD6565}\n"
149 "MSIFASTINSTALL\t1\n";
152 "s72\ti2\tl255\tL255\tL0\ts72\n"
153 "Registry\tRegistry\n"
154 "Apples\t1\tSOFTWARE\\Wine\\msitest\tName\timaname\tOne\n"
155 "Oranges\t1\tSOFTWARE\\Wine\\msitest\tnumber\t#314\tTwo\n"
156 "regdata\t1\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n"
157 "OrderTest\t1\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent\n";
166#define ADD_TABLE(x) {#x".idt", x##_dat, sizeof(x##_dat)}
190#define ADD_INFO_I2(property, iValue) {property, VT_I2, iValue, NULL, NULL}
191#define ADD_INFO_I4(property, iValue) {property, VT_I4, iValue, NULL, NULL}
192#define ADD_INFO_LPSTR(property, szValue) {property, VT_LPSTR, 0, NULL, szValue}
193#define ADD_INFO_FILETIME(property, pftValue) {property, VT_FILETIME, 0, pftValue, NULL}
210#define GET_PROC(dll, func) \
211 p ## func = (void *)GetProcAddress(dll, #func); \
213 trace("GetProcAddress(%s) failed\n", #func);
232 trace(
"Could not check if the current user is an administrator\n");
259 if (pRegDeleteKeyExA)
260 return pRegDeleteKeyExA(
key, subkey,
access, 0 );
288 for (
j = 0;
j < num_info;
j++)
320 for (
j = 0;
j < num_tables;
j++)
410 create_file(
"msitest\\cabout\\new\\five.txt", 100);
451#define ok_w2(format, szString1, szString2) \
454 WideCharToMultiByte(CP_ACP, 0, szString1, -1, string1, MAX_PATH, NULL, NULL); \
455 WideCharToMultiByte(CP_ACP, 0, szString2, -1, string2, MAX_PATH, NULL, NULL); \
456 if (lstrcmpA(string1, string2) != 0) \
457 ok(0, format, string1, string2); \
460#define ok_w2n(format, szString1, szString2, len) \
462 if (memcmp(szString1, szString2, len * sizeof(WCHAR)) != 0) \
464 WideCharToMultiByte(CP_ACP, 0, szString1, -1, string1, MAX_PATH, NULL, NULL); \
465 WideCharToMultiByte(CP_ACP, 0, szString2, -1, string2, MAX_PATH, NULL, NULL); \
466 ok(0, format, string1, string2); \
469#define ok_aw(format, aString, wString) \
471 WideCharToMultiByte(CP_ACP, 0, wString, -1, string1, MAX_PATH, NULL, NULL); \
472 if (lstrcmpA(string1, aString) != 0) \
473 ok(0, format, string1, aString); \
475#define ok_awplus(format, extra, aString, wString) \
477 WideCharToMultiByte(CP_ACP, 0, wString, -1, string1, MAX_PATH, NULL, NULL); \
478 if (lstrcmpA(string1, aString) != 0) \
479 ok(0, format, extra, string1, aString); \
482#define ok_exception(hr, szDescription) \
483 if (hr == DISP_E_EXCEPTION) \
486 ok(excepinfo.wCode == 1000, "Exception info was %d, expected 1000\n", excepinfo.wCode); \
488 ok(excepinfo.bstrSource != NULL, "Exception source was NULL\n"); \
489 if (excepinfo.bstrSource) \
490 ok_w2("Exception source was \"%s\" but expected to be \"%s\"\n", excepinfo.bstrSource, L"Msi API Error"); \
492 ok(excepinfo.bstrDescription != NULL, "Exception description was NULL\n"); \
493 if (excepinfo.bstrDescription) \
494 ok_w2("Exception description was \"%s\" but expected to be \"%s\"\n", excepinfo.bstrDescription, szDescription); \
496 SysFreeString(excepinfo.bstrSource); \
497 SysFreeString(excepinfo.bstrDescription); \
498 SysFreeString(excepinfo.bstrHelpFile); \
513 r = IDispatch_GetIDsOfNames( disp, &
IID_NULL, &
str, 1, 0, &
id );
529 { 1,
"CreateRecord" },
530 { 2,
"OpenPackage" },
531 { 3,
"OpenProduct" },
532 { 4,
"OpenDatabase" },
533 { 5,
"SummaryInformation" },
536 { 8,
"InstallProduct" },
538 { 10,
"LastErrorRecord" },
539 { 11,
"RegistryValue" },
540 { 12,
"Environment" },
541 { 13,
"FileAttributes" },
543 { 16,
"FileVersion" },
544 { 17,
"ProductState" },
545 { 18,
"ProductInfo" },
546 { 19,
"ConfigureProduct",
TRUE },
547 { 20,
"ReinstallProduct",
TRUE },
548 { 21,
"CollectUserInfo",
TRUE },
549 { 22,
"ApplyPatch",
TRUE },
550 { 23,
"FeatureParent",
TRUE },
551 { 24,
"FeatureState",
TRUE },
552 { 25,
"UseFeature",
TRUE },
553 { 26,
"FeatureUsageCount",
TRUE },
554 { 27,
"FeatureUsageDate",
TRUE },
555 { 28,
"ConfigureFeature",
TRUE },
556 { 29,
"ReinstallFeature",
TRUE },
557 { 30,
"ProvideComponent",
TRUE },
558 { 31,
"ComponentPath",
TRUE },
559 { 32,
"ProvideQualifiedComponent",
TRUE },
560 { 33,
"QualifierDescription",
TRUE },
561 { 34,
"ComponentQualifiers",
TRUE },
563 { 36,
"Features",
TRUE },
564 { 37,
"Components",
TRUE },
565 { 38,
"ComponentClients",
TRUE },
566 { 39,
"Patches",
TRUE },
567 { 40,
"RelatedProducts" },
568 { 41,
"PatchInfo",
TRUE },
569 { 42,
"PatchTransforms",
TRUE },
570 { 43,
"AddSource",
TRUE },
571 { 44,
"ClearSourceList",
TRUE },
572 { 45,
"ForceSourceListResolution",
TRUE },
573 { 46,
"ShortcutTarget",
TRUE },
574 { 47,
"FileHash",
TRUE },
575 { 48,
"FileSignatureInfo",
TRUE },
588 ok(dispid ==
ptr->did,
"%s: expected %ld, got %ld\n",
ptr->name,
ptr->did, dispid);
593 ok(dispid == 49 || dispid == -1,
"Expected 49 or -1, got %ld\n", dispid);
595 ok(dispid == 51 || dispid == -1,
"Expected 51 or -1, got %ld\n", dispid);
597 ok(dispid == 52 || dispid == -1,
"Expected 52 or -1, got %ld\n", dispid);
599 ok(dispid == 55 || dispid == -1,
"Expected 55 or -1, got %ld\n", dispid);
601 ok(dispid == 57 || dispid == -1,
"Expected 57 or -1, got %ld\n", dispid);
603 ok(dispid == 59 || dispid == -1,
"Expected 59 or -1, got %ld\n", dispid);
605 ok(dispid == 60 || dispid == -1,
"Expected 60 or -1, got %ld\n", dispid);
607 ok(dispid == 61 || dispid == -1,
"Expected 61 or -1, got %ld\n", dispid);
609 ok(dispid == 62 || dispid == -1,
"Expected 62 or -1, got %ld\n", dispid);
611 ok(dispid == 63 || dispid == -1,
"Expected 63 or -1, got %ld\n", dispid);
613 ok(dispid == 65 || dispid == -1,
"Expected 65 or -1, got %ld\n", dispid);
625 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
639 ok(
hr ==
S_OK,
"IDispatch::GetIDsOfNames returned %#lx\n",
hr);
655 dispparams.rgvarg = vararg;
656 dispparams.cArgs = 1;
662 dispparams.cArgs = 2;
671 dispparams.cArgs = 1;
683 dispparams.cArgs = 2;
696 dispparams.cArgs = 3;
708 dispparams.cArgs = 2;
726 dispparams.cArgs = 1;
740 dispparams.cArgs = 1;
747 skip(
"OpenPackage failed, insufficient rights?\n");
751 ok(
hr ==
S_OK,
"IDispatch::Invoke returned %#lx\n",
hr);
758 dispparams.cArgs = 2;
764 ok(
hr ==
S_OK,
"IDispatch::Invoke returned %#lx\n",
hr);
771 dispparams.cArgs = 3;
778 ok(
hr ==
S_OK,
"IDispatch::Invoke returned %#lx\n",
hr);
783 dispparams.cArgs = 2;
798 dispparams.cArgs = 2;
806 ok(
hr ==
S_OK,
"IDispatch::Invoke returned %#lx\n",
hr);
824 ok(
hr ==
S_OK,
"IDispatch::GetIDsOfNames returned %#lx\n",
hr);
826 dispparams.rgvarg =
NULL;
827 dispparams.cArgs = 0;
831 dispparams.rgvarg =
NULL;
832 dispparams.cArgs = 0;
857 ok(
hr ==
S_OK,
"IDispatch::GetIDsOfNames returned %#lx\n",
hr);
866 ok(
V_VT(pVarResult) == vtResult,
"Variant result type is %d, expected %d\n",
V_VT(pVarResult), vtResult);
870 ok(
hr ==
S_OK,
"VariantChangeTypeEx returned %#lx\n",
hr);
874 for (
i=0;
i<pDispParams->cArgs;
i++)
925 *pBool =
V_BOOL(&varresult);
954 V_I4(&vararg) = iValue;
993 V_I4(&vararg[0]) = openmode;
1028 *pInstallState =
V_I4(&varresult);
1056 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1083 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1096 DISPID dispid = DISPID_PROPERTYPUT;
1097 DISPPARAMS dispparams = {&vararg, &dispid,
sizeof(vararg)/
sizeof(
VARIANTARG), 1};
1118 V_I4(&vararg[0]) = UpdateCount;
1128 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1157 DISPID dispid = DISPID_PROPERTYPUT;
1158 DISPPARAMS dispparams = {vararg, &dispid,
ARRAY_SIZE(vararg), 1};
1173 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1177 *pLangId =
V_I4(&varresult);
1191 V_I4(&vararg[0]) = iFlag;
1203 DISPID dispid = DISPID_PROPERTYPUT;
1204 DISPPARAMS dispparams = {vararg, &dispid,
ARRAY_SIZE(vararg), 1};
1208 V_I4(&vararg[1]) = iFlag;
1219 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1239 *iReturn =
V_I4(&varresult);
1256 *iReturn =
V_I4(&varresult);
1272 V_I4(vararg+1) = kind;
1276 ok(
V_VT(&varresult) ==
VT_I4,
"V_VT(varresult) = %d\n",
V_VT(&varresult));
1290 V_I4(&vararg[0]) = iInstallLevel;
1307 *pState =
V_I4(&varresult);
1324 *pState =
V_I4(&varresult);
1333 DISPID dispid = DISPID_PROPERTYPUT;
1334 DISPPARAMS dispparams = {vararg, &dispid,
ARRAY_SIZE(vararg), 1};
1341 V_I4(&vararg[0]) = iState;
1371 V_I4(&vararg[0]) = iUpdateCount;
1394 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1413 IDispatch_AddRef(pRecord);
1421 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1428 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1430 *pFieldCount =
V_I4(&varresult);
1444 V_I4(&vararg[0]) = iField;
1456 DISPID dispid = DISPID_PROPERTYPUT;
1457 DISPPARAMS dispparams = {vararg, &dispid,
ARRAY_SIZE(vararg), 1};
1461 V_I4(&vararg[1]) = iField;
1478 V_I4(&vararg[0]) = iField;
1490 DISPID dispid = DISPID_PROPERTYPUT;
1491 DISPPARAMS dispparams = {vararg, &dispid,
ARRAY_SIZE(vararg), 1};
1495 V_I4(&vararg[1]) = iField;
1498 V_I4(&vararg[0]) = iValue;
1506 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1521 V_I4(&vararg[0]) = iIndex;
1532 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1534 *pCount =
V_I4(&varresult);
1554 DISPID dispid = DISPID_PROPERTYPUT;
1555 DISPPARAMS dispparams = {vararg, &dispid,
ARRAY_SIZE(vararg), 1};
1569 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1573 *pCount =
V_I4(&varresult);
1580#define TEST_SUMMARYINFO_PROPERTIES_MODIFIED 4
1591 ok(
hr ==
S_OK,
"SummaryInfo_PropertyCount failed, hresult %#lx\n",
hr);
1592 ok(
j == num_info,
"SummaryInfo_PropertyCount returned %d, expected %d\n",
j, num_info);
1595 for (
j = 0;
j < num_info;
j++)
1605 ok(
hr ==
S_OK,
"SummaryInfo_Property (pid %d) failed, hresult %#lx\n",
entry->property,
hr);
1606 if (
V_VT(&varresult) !=
vt)
1607 skip(
"Skipping property tests due to type mismatch\n");
1609 ok(
V_I4(&varresult) ==
entry->iValue,
"SummaryInfo_Property (pid %d) I4 result expected to be %d, but was %ld\n",
1619 ok(
d ==
V_DATE(&varresult),
"SummaryInfo_Property (pid %d) DATE result expected to be %lf, but was %lf\n",
entry->property,
d,
V_DATE(&varresult));
1623 ok_awplus(
"SummaryInfo_Property (pid %d) BSTR result expected to be %s, but was %s\n",
entry->property,
entry->szValue,
V_BSTR(&varresult));
1626 skip(
"SummaryInfo_Property (pid %d) unhandled result type %d\n",
entry->property,
vt);
1644 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1647 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1651 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1654 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1657 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1660 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1671 ok(
hr ==
S_OK,
"SummaryInfo_PropertyPut failed, hresult %#lx\n",
hr);
1674 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1675 ok(
V_I2(&
var) ==
V_I2(&varresult),
"SummaryInfo_PropertyGet expected %d, but returned %d\n",
V_I2(&
var),
V_I2(&varresult));
1683 ok(
hr ==
S_OK,
"SummaryInfo_PropertyPut failed, hresult %#lx\n",
hr);
1686 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1687 ok_w2(
"SummaryInfo_PropertyGet expected %s, but returned %s\n",
V_BSTR(&
var),
V_BSTR(&varresult));
1696 ok(
hr ==
S_OK,
"SummaryInfo_PropertyPut failed, hresult %#lx\n",
hr);
1699 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1708 ok(
hr ==
S_OK,
"SummaryInfo_PropertyPut failed, hresult %#lx\n",
hr);
1711 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1712 ok(
V_I4(&
var) ==
V_I4(&varresult),
"SummaryInfo_PropertyGet expected %ld, but returned %ld\n",
V_I4(&
var),
V_I4(&varresult));
1718 ok(
hr ==
S_OK,
"SummaryInfo_PropertyCount failed, hresult %#lx\n",
hr);
1719 ok(
j == num_info+4,
"SummaryInfo_PropertyCount returned %d, expected %d\n",
j, num_info);
1728 hr =
Database_OpenView(pDatabase,
L"SELECT `Feature` FROM `Feature` WHERE `Feature_Parent`='One'", &pView);
1729 ok(
hr ==
S_OK,
"Database_OpenView failed, hresult %#lx\n",
hr);
1737 ok(
hr ==
S_OK,
"View_Execute failed, hresult %#lx\n",
hr);
1741 ok(
hr ==
S_OK,
"View_Fetch failed, hresult %#lx\n",
hr);
1742 ok(pRecord !=
NULL,
"View_Fetch should not have returned NULL record\n");
1746 memset(szString, 0,
sizeof(szString));
1748 ok(
hr ==
S_OK,
"Record_StringDataGet failed, hresult %#lx\n",
hr);
1749 ok_w2(
"Record_StringDataGet result was %s but expected %s\n", szString,
L"Three");
1753 ok(
hr ==
S_OK,
"Record_StringDataPut failed, hresult %#lx\n",
hr);
1756 memset(szString, 0,
sizeof(szString));
1758 ok(
hr ==
S_OK,
"Record_StringDataGet failed, hresult %#lx\n",
hr);
1759 ok_w2(
"Record_StringDataGet result was %s but expected %s\n", szString,
L"Two");
1780 ok(
hr ==
S_OK,
"View_Modify failed, hresult %#lx\n",
hr);
1783 memset(szString, 0,
sizeof(szString));
1785 ok(
hr ==
S_OK,
"Record_StringDataGet failed, hresult %#lx\n",
hr);
1786 todo_wine ok_w2(
"Record_StringDataGet result was %s but expected %s\n", szString,
L"Three");
1788 IDispatch_Release(pRecord);
1793 ok(
hr ==
S_OK,
"View_Fetch failed, hresult %#lx\n",
hr);
1794 ok(pRecord !=
NULL,
"View_Fetch should not have returned NULL record\n");
1798 memset(szString, 0,
sizeof(szString));
1800 ok(
hr ==
S_OK,
"Record_StringDataGet failed, hresult %#lx\n",
hr);
1801 ok_w2(
"Record_StringDataGet result was %s but expected %s\n", szString,
L"Two");
1803 IDispatch_Release(pRecord);
1808 ok(
hr ==
S_OK,
"View_Fetch failed, hresult %#lx\n",
hr);
1809 ok(pRecord ==
NULL,
"View_Fetch should have returned NULL record\n");
1811 IDispatch_Release(pRecord);
1815 ok(
hr ==
S_OK,
"View_Close failed, hresult %#lx\n",
hr);
1817 IDispatch_Release(pView);
1822 ok(
hr ==
S_OK,
"Database_SummaryInformation failed, hresult %#lx\n",
hr);
1823 ok(pSummaryInfo !=
NULL,
"Database_SummaryInformation should not have returned NULL record\n");
1827 IDispatch_Release(pSummaryInfo);
1839 ULONG refs_before, refs_after;
1844 ok(
hr ==
S_OK,
"Session_Installer failed, hresult %#lx\n",
hr);
1845 ok(pInst !=
NULL,
"Session_Installer returned NULL IDispatch pointer\n");
1846 ok(pInst ==
pInstaller,
"Session_Installer does not match Installer instance from CoCreateInstance\n");
1847 refs_before = IDispatch_AddRef(pInst);
1850 ok(
hr ==
S_OK,
"Session_Installer failed, hresult %#lx\n",
hr);
1851 ok(pInst !=
NULL,
"Session_Installer returned NULL IDispatch pointer\n");
1852 ok(pInst ==
pInstaller,
"Session_Installer does not match Installer instance from CoCreateInstance\n");
1853 refs_after = IDispatch_Release(pInst);
1854 ok(refs_before == refs_after,
"got %lu and %lu\n", refs_before, refs_after);
1859 ok(
hr ==
S_OK,
"Session_PropertyGet failed, hresult %#lx\n",
hr);
1864 ok(0,
"Property \"ProductName\" expected to be \"MSITEST\" but was \"%s\"\n",
string);
1869 ok(
hr ==
S_OK,
"Session_PropertyPut failed, hresult %#lx\n",
hr);
1872 ok(
hr ==
S_OK,
"Session_PropertyGet failed, hresult %#lx\n",
hr);
1877 ok(0,
"Property \"ProductName\" expected to be \"ProductName\" but was \"%s\"\n",
string);
1887 ok(
hr ==
S_OK,
"Session_PropertyPut failed, hresult %#lx\n",
hr);
1891 ok(
hr ==
S_OK,
"Session_LanguageGet failed, hresult %#lx\n",
hr);
1896 ok(
hr ==
S_OK,
"Session_ModeGet failed, hresult %#lx\n",
hr);
1897 ok(!
bool,
"Reboot at end session mode is %d\n",
bool);
1900 ok(
hr ==
S_OK,
"Session_ModeGet failed, hresult %#lx\n",
hr);
1901 ok(!
bool,
"Maintenance mode is %d\n",
bool);
1905 ok(
hr ==
S_OK,
"Session_ModePut failed, hresult %#lx\n",
hr);
1907 ok(
hr ==
S_OK,
"Session_ModeGet failed, hresult %#lx\n",
hr);
1908 ok(
bool,
"Reboot at end session mode is %d, expected 1\n",
bool);
1910 ok(
hr ==
S_OK,
"Session_ModePut failed, hresult %#lx\n",
hr);
1913 ok(
hr ==
S_OK,
"Session_ModePut failed, hresult %#lx\n",
hr);
1917 ok(
hr ==
S_OK,
"Session_ModeGet failed, hresult %#lx\n",
hr);
1918 ok(
bool,
"Reboot now mode is %d, expected 1\n",
bool);
1921 ok(
hr ==
S_OK,
"Session_ModePut failed, hresult %#lx\n",
hr);
1930 ok(
hr ==
S_OK,
"Session_Database failed, hresult %#lx\n",
hr);
1934 IDispatch_Release(pDatabase);
1939 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1943 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1947 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1952 ok(
hr ==
S_OK,
"Session_DoAction failed, hresult %#lx\n",
hr);
1953 ok(myint ==
IDOK,
"DoAction(CostInitialize) returned %d, %d expected\n", myint,
IDOK);
1957 ok(
hr ==
S_OK,
"Session_SetInstallLevel failed, hresult %#lx\n",
hr);
1961 ok(
hr ==
S_OK,
"Session_FeatureCurrentState failed, hresult %#lx\n",
hr);
1966 ok(
hr ==
S_OK,
"Installer_CreateRecord failed: %#lx\n",
hr);
1968 ok(
hr ==
S_OK,
"Session_Message failed: %#lx\n",
hr);
1969 ok(myint == 0,
"Session_Message returned %x\n", myint);
1973 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1977 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1982 ok(
hr ==
S_OK,
"Session_FeatureRequestStatePut failed, hresult %#lx\n",
hr);
1984 ok(
hr ==
S_OK,
"Session_FeatureRequestStateGet failed, hresult %#lx\n",
hr);
1989 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1993 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
2020 static const DWORD qw[2] = { 0x12345678, 0x87654321 };
2024 HKEY hkey, hkey_sub;
2035 win_skip(
"Needed W-functions are not implemented\n");
2043 ok(
hr ==
S_OK,
"Installer_RegistryValueE failed, hresult %#lx\n",
hr);
2044 ok(!bRet,
"Registry key expected to not exist, but Installer_RegistryValue claims it does\n");
2046 memset(szString, 0,
sizeof(szString));
2050 memset(szString, 0,
sizeof(szString));
2058 "RegSetValueExW failed\n");
2060 "RegSetValueExW failed\n");
2062 "RegSetValueExW failed\n");
2064 ok(bRet,
"SetEnvironmentVariableA failed %lu\n",
GetLastError());
2066 "RegSetValueExW failed\n");
2068 "RegSetValueExW failed\n");
2070 "RegSetValueExW failed\n");
2072 "RegSetValueExW failed\n");
2075 "RegSetValueExW failed\n");
2082 ok(
hr ==
S_OK,
"Installer_RegistryValueE failed, hresult %#lx\n",
hr);
2083 ok(bRet,
"Registry key expected to exist, but Installer_RegistryValue claims it does not\n");
2085 memset(szString, 0,
sizeof(szString));
2087 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2088 ok_w2(
"Default registry value \"%s\" does not match expected \"%s\"\n", szString,
L"One");
2091 memset(szString, 0,
sizeof(szString));
2096 memset(szString, 0,
sizeof(szString));
2098 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2099 ok_w2(
"Registry value \"%s\" does not match expected \"%s\"\n", szString,
L"One");
2105 ok(
hr ==
S_OK,
"Installer_RegistryValue failed, hresult %#lx\n",
hr);
2106 ok(
V_I4(&varresult) == 305419896,
"Registry value %ld does not match expected value\n",
V_I4(&varresult));
2109 memset(szString, 0,
sizeof(szString));
2111 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2112 ok_w2(
"Registry value \"%s\" does not match expected \"%s\"\n", szString,
L"(REG_BINARY)");
2114 memset(szString, 0,
sizeof(szString));
2116 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2117 ok_w2(
"Registry value \"%s\" does not match expected \"%s\"\n", szString,
L"Four");
2120 memset(szString, 0,
sizeof(szString));
2122 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2123 ok_w2n(
"Registry value \"%s\" does not match expected \"%s\"\n",
2124 szString,
L"Five\nHi",
lstrlenW(
L"Five\nHi"));
2126 memset(szString, 0,
sizeof(szString));
2128 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2130 "Registry value does not match\n");
2136 ok(
hr ==
S_OK,
"Installer_RegistryValue failed, hresult %#lx\n",
hr);
2139 memset(szString, 0,
sizeof(szString));
2141 ok(
hr ==
S_OK,
"Installer_RegistryValueI failed, hresult %#lx\n",
hr);
2142 ok_w2(
"Registry name \"%s\" does not match expected \"%s\"\n", szString,
L"");
2145 memset(szString, 0,
sizeof(szString));
2147 ok(
hr ==
S_OK,
"Installer_RegistryValueI failed, hresult %#lx\n",
hr);
2149 todo_wine ok_w2(
"Registry name \"%s\" does not match expected \"%s\"\n", szString,
L"Two");
2152 memset(szString, 0,
sizeof(szString));
2154 ok(
hr ==
S_OK,
"Installer_RegistryValueI failed, hresult %#lx\n",
hr);
2157 memset(szString, 0,
sizeof(szString));
2159 ok(
hr ==
S_OK,
"Installer_RegistryValueI failed, hresult %#lx\n",
hr);
2160 ok_w2(
"Registry name \"%s\" does not match expected \"%s\"\n", szString,
L"Eight");
2163 memset(szString, 0,
sizeof(szString));
2165 ok(
hr ==
S_OK,
"Installer_RegistryValueI failed, hresult %#lx\n",
hr);
2186 ok(
hr ==
S_OK,
"Installer_Products failed, hresult %#lx\n",
hr);
2191 ok(
hr ==
S_OK,
"StringList_NewEnum failed, hresult %#lx\n",
hr);
2194 hr = IUnknown_QueryInterface(
pUnk, &IID_IEnumVARIANT, (
void **)&pEnum);
2195 ok (
hr ==
S_OK,
"IUnknown::QueryInterface returned %#lx\n",
hr);
2198 skip(
"IEnumVARIANT tests\n");
2202 ok(
hr ==
S_OK,
"StringList_Count failed, hresult %#lx\n",
hr);
2207 memset(szString, 0,
sizeof(szString));
2209 ok(
hr ==
S_OK,
"StringList_Item failed (idx %d, count %d), hresult %#lx\n",
idx, iCount,
hr);
2215 ok(
hr ==
S_OK,
"Installer_ProductState failed, hresult %#lx\n",
hr);
2221 if (!bProductFound && !
lstrcmpW(szString,
L"{837450fa-a39b-4bc8-b321-08b393f784b3}"))
2222 bProductFound =
TRUE;
2227 hr = IEnumVARIANT_Next(pEnum, 1, &
var, &celt);
2228 ok(
hr ==
S_OK,
"IEnumVARIANT_Next failed (idx %d, count %d), hresult %#lx\n",
idx, iCount,
hr);
2229 ok(celt == 1,
"%lu items were retrieved, expected 1\n", celt);
2231 ok_w2(
"%s returned by StringList_Item does not match %s returned by IEnumVARIANT_Next\n", szString,
V_BSTR(&
var));
2237 if (bProductInstalled)
2239 ok(bProductInstalled == bProductFound,
"Product expected to %s installed but product code was %s\n",
2240 bProductInstalled ?
"be" :
"not be",
2241 bProductFound ?
"found" :
"not found");
2251 IEnumVARIANT_Clone(pEnum,
NULL);
2255 hr = IEnumVARIANT_Clone(pEnum, &pEnum2);
2256 ok(
hr ==
S_OK,
"IEnumVARIANT_Clone failed, hresult %#lx\n",
hr);
2264 hr = IEnumVARIANT_Next(pEnum2, 1, &
var, &celt);
2265 ok(
hr ==
S_OK,
"IEnumVARIANT_Next failed, hresult %#lx\n",
hr);
2266 ok(celt == 1,
"%lu items were retrieved, expected 0\n", celt);
2271 skip(
"IEnumVARIANT::Next of clone will not return success with 0 products\n");
2273 IEnumVARIANT_Release(pEnum2);
2277 hr = IEnumVARIANT_Skip(pEnum, 1);
2278 ok(
hr ==
S_FALSE,
"IEnumVARIANT_Skip failed, hresult %#lx\n",
hr);
2281 hr = IEnumVARIANT_Next(pEnum, 1,
NULL, &celt);
2282 ok(
hr ==
S_FALSE,
"IEnumVARIANT_Next failed, hresult %#lx\n",
hr);
2283 ok(celt == 0,
"%lu items were retrieved, expected 0\n", celt);
2286 hr = IEnumVARIANT_Next(pEnum, 1, &
var, &celt);
2287 ok(
hr ==
S_FALSE,
"IEnumVARIANT_Next failed, hresult %#lx\n",
hr);
2288 ok(celt == 0,
"%lu items were retrieved, expected 0\n", celt);
2292 hr = IEnumVARIANT_Reset(pEnum);
2293 ok(
hr ==
S_OK,
"IEnumVARIANT_Reset failed, hresult %#lx\n",
hr);
2298 hr = IEnumVARIANT_Skip(pEnum, iCount-1);
2299 ok(
hr ==
S_OK,
"IEnumVARIANT_Skip failed, hresult %#lx\n",
hr);
2303 hr = IEnumVARIANT_Next(pEnum, 1, &
var,
NULL);
2304 ok(
hr ==
S_OK,
"IEnumVARIANT_Next failed (idx %d, count %d), hresult %#lx\n",
idx, iCount,
hr);
2306 ok_w2(
"%s returned by StringList_Item does not match %s returned by IEnumVARIANT_Next\n", szString,
V_BSTR(&
var));
2310 skip(
"IEnumVARIANT::Skip impossible for 0 products\n");
2314 memset(szString, 0,
sizeof(szString));
2316 ok(
hr ==
DISP_E_BADINDEX,
"StringList_Item for an invalid index did not return DISP_E_BADINDEX, hresult %#lx\n",
hr);
2318 if (pEnum) IEnumVARIANT_Release(pEnum);
2320 IDispatch_Release(pStringList);
2335 ret =
RegQueryInfoKeyA(hkey,
NULL,
NULL,
NULL,
NULL, &
dwSize,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
2362 ret =
RegQueryInfoKeyA(hkey,
NULL,
NULL,
NULL,
NULL, &
dwSize,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
2369 if (!
strcmp(
string, findkey))
2399 skip(
"Installer_InstallProduct (insufficient privileges)\n");
2410 ok(
hr ==
S_OK,
"Expected UILevel property put invoke to return S_OK, got %#lx\n",
hr);
2416 skip(
"InstallProduct failed, insufficient rights?\n");
2420 ok(
hr ==
S_OK,
"Installer_InstallProduct failed, hresult %#lx\n",
hr);
2424 ok(
hr ==
S_OK,
"Installer_ProductState failed, hresult %#lx\n",
hr);
2430 memset(szString, 0,
sizeof(szString));
2436 memset(szString, 0,
sizeof(szString));
2442 memset(szString, 0,
sizeof(szString));
2444 ok(
hr ==
S_OK,
"Installer_ProductInfo failed, hresult %#lx\n",
hr);
2445 todo_wine ok_w2(
"Installer_ProductInfo returned %s but expected %s\n", szString,
L"winetest-automation.msi");
2448 memset(szString, 0,
sizeof(szString));
2450 ok(
hr ==
S_OK,
"Installer_ProductInfo failed, hresult %#lx\n",
hr);
2451 todo_wine ok_w2(
"Installer_ProductInfo returned %s but expected %s\n", szString,
L"MSITEST");
2458 ok(
hr ==
S_OK,
"Installer_RelatedProducts failed, hresult %#lx\n",
hr);
2463 ok(
hr ==
S_OK,
"StringList_Count failed, hresult %#lx\n",
hr);
2464 ok(iCount == 1,
"Expected one related product but found %d\n", iCount);
2467 memset(szString, 0,
sizeof(szString));
2469 ok(
hr ==
S_OK,
"StringList_Item failed (idx 0, count %d), hresult %#lx\n", iCount,
hr);
2470 ok_w2(
"StringList_Item returned %s but expected %s\n", szString,
L"{837450fa-a39b-4bc8-b321-08b393f784b3}");
2472 IDispatch_Release(pStringList);
2476 ok(
hr ==
S_OK,
"Installer_ProductInfo failed, hresult %#lx\n",
hr);
2480 ok(
delete_pf(
"msitest\\cabout\\new\\five.txt",
TRUE),
"File not installed\n");
2482 ok(
delete_pf(
"msitest\\cabout\\four.txt",
TRUE),
"File not installed\n");
2484 ok(
delete_pf(
"msitest\\changed\\three.txt",
TRUE),
"File not installed\n");
2486 ok(
delete_pf(
"msitest\\first\\two.txt",
TRUE),
"File not installed\n");
2510 ok(
num == 314,
"Expected 314, got %lu\n",
num);
2525 "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{837450fa-a39b-4bc8-b321-08b393f784b3}",
2530 "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\UpgradeCodes\\D8E760ECA1E276347B43E42BDBDA5656",
access);
2534 "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData",
"af054738b93a8cb43b12803b397f483b",
access, &hkey);
2542 "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\Products\\af054738b93a8cb43b12803b397f483b",
access);
2552 res =
RegDeleteKeyA(hkey,
"UpgradeCodes\\D8E760ECA1E276347B43E42BDBDA5656");
2579 ok(
hr ==
S_OK,
"Installer_CreateRecord failed, hresult %#lx\n",
hr);
2580 ok(pRecord !=
NULL,
"Installer_CreateRecord should not have returned NULL record\n");
2585 ok(
hr ==
S_OK,
"Record_FiledCountGet failed, hresult %#lx\n",
hr);
2586 ok(iValue == 1,
"Record_FieldCountGet result was %d but expected 1\n", iValue);
2590 ok(
hr ==
S_OK,
"Record_IntegerDataGet failed, hresult %#lx\n",
hr);
2595 ok(
hr ==
S_OK,
"Record_IntegerDataGet failed, hresult %#lx\n",
hr);
2600 ok(
hr ==
S_OK,
"Record_IntegerDataPut failed, hresult %#lx\n",
hr);
2609 ok(
hr ==
S_OK,
"Record_IntegerDataGet failed, hresult %#lx\n",
hr);
2610 ok(iValue == 100,
"Record_IntegerDataGet result was %d but expected 100\n", iValue);
2612 IDispatch_Release(pRecord);
2621 skip(
"OpenPackage failed, insufficient rights?\n");
2625 ok(
hr ==
S_OK,
"Installer_OpenPackage failed, hresult %#lx\n",
hr);
2629 IDispatch_Release(pSession);
2634 ok(
hr ==
S_OK,
"Installer_OpenDatabase failed, hresult %#lx\n",
hr);
2638 IDispatch_Release(pDatabase);
2643 ok(
hr ==
S_OK,
"Installer_SummaryInformation failed, hresult %#lx\n",
hr);
2647 IDispatch_Release(pSumInfo);
2658 ok(
hr ==
S_OK,
"Installer_ProductState failed, hresult %#lx\n",
hr);
2680 ok(
hr ==
S_OK,
"Installer_RelatedProducts failed, hresult %#lx\n",
hr);
2685 ok(
hr ==
S_OK,
"StringList_Count failed, hresult %#lx\n",
hr);
2686 ok(!iCount,
"Expected no related products but found %d\n", iCount);
2688 IDispatch_Release(pStringList);
2694 ok(
hr ==
S_OK,
"Installer_VersionGet failed, hresult %#lx\n",
hr);
2710 if (pIsWow64Process)
2728 ok (
hr ==
S_OK,
"OleInitialize returned %#lx\n",
hr);
2730 ok (
hr ==
S_OK,
"CLSIDFromProgID returned %#lx\n",
hr);
2732 ok(
hr ==
S_OK,
"CoCreateInstance returned %#lx\n",
hr);
2737 ok (
hr ==
S_OK,
"IUnknown::QueryInterface returned %#lx\n",
hr);
2744 IUnknown_Release(
pUnk);
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
static const WCHAR nameW[]
static SID_IDENTIFIER_AUTHORITY NtAuthority
#define RegCloseKey(hKey)
#define ERROR_NOT_ENOUGH_MEMORY
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LONG WINAPI RegDeleteKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ REGSAM samDesired, _In_ DWORD Reserved)
LONG WINAPI RegQueryInfoKeyA(HKEY hKey, LPSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegEnumKeyA(HKEY hKey, DWORD dwIndex, LPSTR lpName, DWORD cbName)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
BOOL WINAPI CheckTokenMembership(IN HANDLE ExistingTokenHandle, IN PSID SidToCheck, OUT PBOOL IsMember)
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
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)
#define ERROR_CALL_NOT_IMPLEMENTED
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define GetCurrentProcess()
#define ERROR_NO_MORE_ITEMS
#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 RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI SetEndOfFile(HANDLE hFile)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
UINT WINAPI MsiDatabaseImportA(MSIHANDLE handle, const char *szFolder, const char *szFilename)
UINT WINAPI MsiOpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIHANDLE *phDB)
UINT WINAPI MsiCloseHandle(MSIHANDLE handle)
UINT WINAPI MsiSummaryInfoSetPropertyA(MSIHANDLE handle, UINT uiProperty, UINT uiDataType, INT iValue, FILETIME *pftValue, const char *szValue)
UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase, const char *szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle)
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
UINT WINAPI MsiSummaryInfoPersist(MSIHANDLE handle)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH CLSIDFromProgID(LPCOLESTR progid, LPCLSID clsid)
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLint GLboolean GLint GLenum access
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
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 token
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
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define ERROR_FILE_NOT_FOUND
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define create_file(name, size)
static HINSTANCE hkernel32
static HRESULT SummaryInfo_PropertyGet(IDispatch *pSummaryInfo, int pid, VARIANT *pVarResult, VARTYPE vtExpect)
static CHAR CURR_DIR[MAX_PATH]
static const CHAR registry_dat[]
static const CHAR property_dat[]
static HRESULT View_Execute(IDispatch *pView, IDispatch *pRecord)
static void test_Installer_Products(BOOL bProductInstalled)
static CHAR string2[MAX_PATH]
static HRESULT View_Fetch(IDispatch *pView, IDispatch **ppRecord)
static HRESULT Installer_CreateRecord(int count, IDispatch **pRecord)
static HRESULT Session_DoAction(IDispatch *pSession, LPCWSTR szAction, int *iReturn)
static HRESULT Record_IntegerDataGet(IDispatch *pRecord, int iField, int *pValue)
#define TEST_SUMMARYINFO_PROPERTIES_MODIFIED
static const CHAR directory_dat[]
static HRESULT Session_Database(IDispatch *pSession, IDispatch **pDatabase)
static HRESULT StringList_Count(IDispatch *pStringList, int *pCount)
static void delete_test_files(void)
static HRESULT Session_LanguageGet(IDispatch *pSession, UINT *pLangId)
static const msi_summary_info summary_info[]
static HRESULT Installer_VersionGet(LPWSTR szVersion)
#define ADD_INFO_FILETIME(property, pftValue)
static HRESULT Installer_SummaryInformation(BSTR PackagePath, int UpdateCount, IDispatch **pSumInfo)
static const CHAR file_dat[]
static HRESULT Installer_ProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute, LPWSTR szString)
static void test_Database(IDispatch *pDatabase, BOOL readonly)
static HRESULT Record_StringDataGet(IDispatch *pRecord, int iField, LPWSTR szString)
static HRESULT StringList__NewEnum(IDispatch *pList, IUnknown **ppEnumVARIANT)
static HRESULT Session_PropertyGet(IDispatch *pSession, LPCWSTR szName, LPWSTR szReturn)
#define GET_PROC(dll, func)
static HRESULT Session_EvaluateCondition(IDispatch *pSession, LPCWSTR szCondition, int *iReturn)
static HRESULT Session_SetInstallLevel(IDispatch *pSession, LONG iInstallLevel)
static void test_Installer(void)
static void test_Installer_RegistryValue(void)
static void test_Session(IDispatch *pSession)
static const CHAR install_exec_seq_dat[]
static HRESULT Installer_OpenPackage(LPCWSTR szPackagePath, int options, IDispatch **pSession)
static FILETIME systemtime
static HRESULT Database_OpenView(IDispatch *pDatabase, LPCWSTR szSql, IDispatch **pView)
#define ok_w2n(format, szString1, szString2, len)
static HRESULT invoke(IDispatch *pDispatch, LPCSTR szName, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, VARTYPE vtResult)
#define ok_w2(format, szString1, szString2)
static void test_Installer_InstallProduct(void)
static HRESULT Record_StringDataPut(IDispatch *pRecord, int iField, LPCWSTR szString)
static HRESULT Installer_ProductState(LPCWSTR szProduct, int *pInstallState)
static HRESULT Record_IntegerDataPut(IDispatch *pRecord, int iField, int iValue)
static HRESULT StringList_Item(IDispatch *pStringList, int iIndex, LPWSTR szString)
static HRESULT Session_ModePut(IDispatch *pSession, int iFlag, VARIANT_BOOL mode)
static void create_test_files(void)
static UINT find_registry_key(HKEY hkeyParent, LPCSTR subkey, LPCSTR findkey, REGSAM access, HKEY *phkey)
static void init_functionpointers(void)
static HRESULT View_Modify(IDispatch *pView, int iMode, IDispatch *pRecord)
static HRESULT Installer_Products(IDispatch **pStringList)
struct _msi_table msi_table
static char PROG_FILES_DIR[MAX_PATH]
static HRESULT SummaryInfo_PropertyCountGet(IDispatch *pSummaryInfo, int *pCount)
static HRESULT Installer_RegistryValueE(HKEY hkey, LPCWSTR szKey, BOOL *pBool)
static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *info, int num_info, BOOL readonly)
struct _msi_summary_info msi_summary_info
static const CHAR feature_dat[]
static const char * msifile
static BOOL is_process_limited(void)
static CHAR string1[MAX_PATH]
static const msi_table tables[]
static EXCEPINFO excepinfo
static HRESULT Database_SummaryInformation(IDispatch *pDatabase, int iUpdateCount, IDispatch **pSummaryInfo)
#define ok_exception(hr, szDescription)
static void test_dispatch(void)
#define ok_awplus(format, extra, aString, wString)
static HRESULT Installer_RegistryValue(HKEY hkey, LPCWSTR szKey, VARIANT vValue, VARIANT *pVarResult, VARTYPE vtExpect)
static HRESULT View_Close(IDispatch *pView)
static BOOL delete_pf(const CHAR *rel_path, BOOL is_file)
static HRESULT Session_FeatureRequestStateGet(IDispatch *pSession, LPCWSTR szName, int *pState)
static HRESULT SummaryInfo_PropertyPut(IDispatch *pSummaryInfo, int pid, VARIANT *pVariant)
static const get_did_t get_did_data[]
static UINT delete_registry_key(HKEY hkeyParent, LPCSTR subkey, REGSAM access)
static int _invoke_todo_vtResult
static HRESULT Installer_UILevelPut(int level)
static HRESULT Installer_RegistryValueI(HKEY hkey, LPCWSTR szKey, int iValue, LPWSTR szString, VARTYPE vtResult)
static const CHAR component_dat[]
static const CHAR media_dat[]
static DISPID get_dispid(IDispatch *disp, const char *name)
static HRESULT Installer_RegistryValueW(HKEY hkey, LPCWSTR szKey, LPCWSTR szValue, LPWSTR szString)
static BOOL create_package(LPWSTR path)
static HRESULT Session_Installer(IDispatch *pSession, IDispatch **pInst)
static HRESULT Installer_RelatedProducts(LPCWSTR szProduct, IDispatch **pStringList)
#define ADD_INFO_I4(property, iValue)
static HRESULT Installer_InstallProduct(LPCWSTR szPackagePath, LPCWSTR szPropertyValues)
static void test_dispid(void)
static HRESULT Session_FeatureRequestStatePut(IDispatch *pSession, LPCWSTR szName, int iState)
static HRESULT Session_PropertyPut(IDispatch *pSession, LPCWSTR szName, LPCWSTR szValue)
static void write_msi_summary_info(MSIHANDLE db, const msi_summary_info *info, int num_info)
static LONG delete_key_portable(HKEY key, LPCSTR subkey, REGSAM access)
static const CHAR feature_comp_dat[]
static HRESULT Session_ModeGet(IDispatch *pSession, int iFlag, VARIANT_BOOL *mode)
static HRESULT Record_FieldCountGet(IDispatch *pRecord, int *pFieldCount)
#define ADD_INFO_LPSTR(property, szValue)
static void write_file(const CHAR *filename, const char *data, int data_size)
static IDispatch * pInstaller
static HRESULT Session_FeatureCurrentState(IDispatch *pSession, LPCWSTR szName, int *pState)
static HRESULT Installer_OpenDatabase(LPCWSTR szDatabasePath, int openmode, IDispatch **pDatabase)
static HRESULT Session_Message(IDispatch *pSession, LONG kind, IDispatch *record, int *ret)
static BOOL get_program_files_dir(LPSTR buf)
#define todo_wine_if(is_todo)
#define create_database(name, tables, num_tables)
static const WCHAR szAttribute[]
static VARIANTARG static DISPID
INTERNETFEATURELIST feature
@ INSTALLSTATE_ADVERTISED
UINT WINAPI MsiDatabaseCommit(MSIHANDLE hdb)
#define MSIDBOPEN_TRANSACT
#define KEY_ENUMERATE_SUB_KEYS
#define LOCALE_USER_DEFAULT
BSTR WINAPI SysAllocString(LPCOLESTR str)
#define DISPATCH_PROPERTYPUT
#define DISPATCH_PROPERTYGET
static const WCHAR szName[]
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define delete_key(r, p, s)
HRESULT WINAPI VariantChangeTypeEx(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, LCID lcid, USHORT wFlags, VARTYPE vt)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)
INT WINAPI SystemTimeToVariantTime(LPSYSTEMTIME lpSt, double *pDateOut)
HRESULT WINAPI VariantCopyInd(VARIANT *pvargDest, VARIANTARG *pvargSrc)
HRESULT WINAPI VariantCopy(VARIANTARG *pvargDest, VARIANTARG *pvargSrc)
static char * stringw(char *buf, char *end, const wchar_t *sw, int len, int field_width, int precision, int flags)
DWORD WINAPI GetLastError(void)
_In_ DWORD _Out_ _In_ WORD wFlags
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
#define DISP_E_MEMBERNOTFOUND