1001{
1010
1013 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1014
1015 lstrcatW(asmpath,
L"_MSIL\\wine\\1.0.0.0__2d03617b1c31e2f5\\wine.dll");
1016
1018
1019 hr = pCreateAssemblyCache(&
cache, 0);
1020 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1021
1022
1024 hr = IAssemblyCache_QueryAssemblyInfo(
cache, 0,
L"wine", &
info);
1026 "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08lx\n",
hr);
1028 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1029 ok(
info.dwAssemblyFlags == 0,
"Expected 0, got %08lx\n",
info.dwAssemblyFlags);
1030 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1031 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1032 ok(
info.uliAssemblySizeInKB.u.LowPart == 0,
1033 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1035 "Assembly path was changed\n");
1037
1038 hr = IAssemblyCache_InstallAssembly(
cache, 0,
L"wine.dll",
NULL);
1039 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1040
1041
1043 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_VALIDATE,
1047 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1048 ok(
info.dwAssemblyFlags == 0,
"Expected 0, got %08lx\n",
info.dwAssemblyFlags);
1049 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1050 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1051 ok(
info.uliAssemblySizeInKB.u.LowPart == 0,
1052 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1054 "Assembly path was changed\n");
1056
1057
1059 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_VALIDATE,
L"", &
info);
1062 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1063 ok(
info.dwAssemblyFlags == 0,
"Expected 0, got %08lx\n",
info.dwAssemblyFlags);
1064 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1065 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1066 ok(
info.uliAssemblySizeInKB.u.LowPart == 0,
1067 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1069 "Assembly path was changed\n");
1071
1072
1074 hr = IAssemblyCache_QueryAssemblyInfo(
cache, 0,
L"wine", &
info);
1075 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1077 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1079 "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n",
info.dwAssemblyFlags);
1080 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1081 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1082 ok(
info.uliAssemblySizeInKB.u.LowPart == 0,
1083 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1085 "Wrong assembly path returned\n");
1087 "Expected %d, got %ld\n",
lstrlenW(asmpath) + 1,
info.cchBuf);
1088
1089
1091 hr = IAssemblyCache_QueryAssemblyInfo(
cache, 0,
L"wine.dll", &
info);
1093 "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08lx\n",
hr);
1095 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1096 ok(
info.dwAssemblyFlags == 0,
"Expected 0, got %08lx\n",
info.dwAssemblyFlags);
1097 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1098 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1099 ok(
info.uliAssemblySizeInKB.u.LowPart == 0,
1100 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1102 "Assembly path was changed\n");
1104
1105
1106 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_VALIDATE,
L"wine",
NULL);
1107 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1108
1109
1110 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
L"wine",
NULL);
1111 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1112
1113
1115 info.cbAssemblyInfo = 0;
1116 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_VALIDATE,
L"wine", &
info);
1117 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1119 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1121 "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n",
info.dwAssemblyFlags);
1122 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1123 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1124 ok(
info.uliAssemblySizeInKB.u.LowPart == 0,
1125 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1127 "Wrong assembly path returned\n");
1129 "Expected %d, got %ld\n",
lstrlenW(asmpath) + 1,
info.cchBuf);
1130
1131
1133 info.cbAssemblyInfo = 1;
1134 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_VALIDATE,
L"wine", &
info);
1136 ok(
info.cbAssemblyInfo == 1,
"Expected 1, got %ld\n",
info.cbAssemblyInfo);
1137 ok(
info.dwAssemblyFlags == 0,
"Expected 0, got %08lx\n",
info.dwAssemblyFlags);
1138 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1139 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1140 ok(
info.uliAssemblySizeInKB.u.LowPart == 0,
1141 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1143 "Assembly path was changed\n");
1145
1146
1149 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
L"wine", &
info);
1152 "Expected sizeof(ASSEMBLY_INFO) * 2, got %ld\n",
info.cbAssemblyInfo);
1153 ok(
info.dwAssemblyFlags == 0,
"Expected 0, got %08lx\n",
info.dwAssemblyFlags);
1154 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1155 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1156 ok(
info.uliAssemblySizeInKB.u.LowPart == 0,
1157 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1159 "Assembly path was changed\n");
1161
1162
1164 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
L"wine", &
info);
1165 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1167 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1169 "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n",
info.dwAssemblyFlags);
1170 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1171 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1173 {
1174 ok((
info.uliAssemblySizeInKB.u.LowPart == 4),
1175 "Expected 4, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1176 }
1178 "Wrong assembly path returned\n");
1180 "Expected %d, got %ld\n",
lstrlenW(asmpath) + 1,
info.cchBuf);
1181
1182
1184 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE |
1185 QUERYASMINFO_FLAG_VALIDATE,
L"wine", &
info);
1186 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1188 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1190 "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n",
info.dwAssemblyFlags);
1191 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1192 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1194 {
1195 ok((
info.uliAssemblySizeInKB.u.LowPart == 4),
1196 "Expected 4, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1197 }
1199 "Wrong assembly path returned\n");
1201 "Expected %d, got %ld\n",
lstrlenW(asmpath) + 1,
info.cchBuf);
1202
1203
1205 info.pszCurrentAssemblyPathBuf =
NULL;
1206 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
L"wine", &
info);
1208 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1210 "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n",
info.dwAssemblyFlags);
1211 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1212 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1215 {
1216 ok((
info.uliAssemblySizeInKB.u.LowPart == 4),
1217 "Expected 4, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1218 }
1220 "Expected %d, got %ld\n",
lstrlenW(asmpath) + 1,
info.cchBuf);
1221
1222
1225 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
L"wine", &
info);
1227 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1229 "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n",
info.dwAssemblyFlags);
1230 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1231 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1233 "Assembly path was changed\n");
1236 {
1237 ok((
info.uliAssemblySizeInKB.u.LowPart == 4),
1238 "Expected 4, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1239 }
1241 "Expected %d, got %ld\n",
lstrlenW(asmpath) + 1,
info.cchBuf);
1242
1243
1246 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
L"wine", &
info);
1247 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1249 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1251 "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n",
info.dwAssemblyFlags);
1252 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1253 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1255 "Expected %d, got %ld\n",
lstrlenW(asmpath) + 1,
info.cchBuf);
1257 {
1258 ok((
info.uliAssemblySizeInKB.u.LowPart == 4),
1259 "Expected 4, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1260 }
1262 "Wrong assembly path returned\n");
1263
1264
1267 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
1269 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1271 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1273 "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n",
info.dwAssemblyFlags);
1274 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1275 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1277 {
1278 ok((
info.uliAssemblySizeInKB.u.LowPart == 4),
1279 "Expected 4, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1280 }
1282 "Wrong assembly path returned\n");
1284 "Expected %d, got %ld\n",
lstrlenW(asmpath) + 1,
info.cchBuf);
1285
1286
1289 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_VALIDATE,
1293
1294
1297 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
1301
1302
1304 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
1306 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1308 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1310 "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n",
info.dwAssemblyFlags);
1311 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1312 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1314 {
1315 ok((
info.uliAssemblySizeInKB.u.LowPart == 4),
1316 "Expected 4, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1317 }
1319 "Wrong assembly path returned\n");
1321 "Expected %d, got %ld\n",
lstrlenW(asmpath) + 1,
info.cchBuf);
1322
1323
1326 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
1329 "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08lx\n",
hr);
1331 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1332 ok(
info.dwAssemblyFlags == 0,
"Expected 0, got %08lx\n",
info.dwAssemblyFlags);
1333 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1334 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1335 ok(
info.uliAssemblySizeInKB.u.LowPart == 0,
1336 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1338 "Assembly path was changed\n");
1340
1341
1343 lstrcpyW(
name,
L"wine,version=1.0.0.1,publicKeyToken=2d03617b1c31e2f5,culture=neutral");
1344 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
1347 "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08lx\n",
hr);
1349 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1350 ok(
info.dwAssemblyFlags == 0,
"Expected 0, got %08lx\n",
info.dwAssemblyFlags);
1351 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1352 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1353 ok(
info.uliAssemblySizeInKB.u.LowPart == 0,
1354 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1356 "Assembly path was changed\n");
1358
1359
1361 lstrcpyW(
name,
L"mscorlib.dll,version=0.0.0.0,culture=neutral,publicKeyToken=null");
1364
1365
1370
1371
1374 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
1376 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1378 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1380 "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n",
info.dwAssemblyFlags);
1381 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1382 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1384 {
1385 ok((
info.uliAssemblySizeInKB.u.LowPart == 4),
1386 "Expected 4, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1387 }
1389 "Wrong assembly path returned\n");
1391 "Expected %d, got %ld\n",
lstrlenW(asmpath) + 1,
info.cchBuf);
1392
1393
1396 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
1399 "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08lx\n",
hr);
1400 ok(
info.dwAssemblyFlags == 0,
"Expected 0, got %08lx\n",
info.dwAssemblyFlags);
1402 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1403 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1404 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1405 ok(
info.uliAssemblySizeInKB.u.LowPart == 0,
1406 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1408 "Assembly path was changed\n");
1410
1411
1414 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
1416 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1418 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1420 "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n",
info.dwAssemblyFlags);
1421 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1422 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1424 {
1425 ok((
info.uliAssemblySizeInKB.u.LowPart == 4),
1426 "Expected 4, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1427 }
1429 "Wrong assembly path returned\n");
1431 "Expected %d, got %ld\n",
lstrlenW(asmpath) + 1,
info.cchBuf);
1432
1433
1436 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
1439 "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08lx\n",
hr);
1441 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1442 ok(
info.dwAssemblyFlags == 0,
"Expected 0, got %08lx\n",
info.dwAssemblyFlags);
1443 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1444 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1445 ok(
info.uliAssemblySizeInKB.u.LowPart == 0,
1446 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1448 "Assembly path was changed\n");
1450
1451
1454 hr = IAssemblyCache_QueryAssemblyInfo(
cache, QUERYASMINFO_FLAG_GETSIZE,
1456 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1458 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1460 "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n",
info.dwAssemblyFlags);
1461 ok(
info.uliAssemblySizeInKB.u.HighPart == 0,
1462 "Expected 0, got %ld\n",
info.uliAssemblySizeInKB.u.HighPart);
1464 {
1465 ok((
info.uliAssemblySizeInKB.u.LowPart == 4),
1466 "Expected 4, got %ld\n",
info.uliAssemblySizeInKB.u.LowPart);
1467 }
1469 "Wrong assembly path returned\n");
1471 "Expected %d, got %ld\n",
lstrlenW(asmpath) + 1,
info.cchBuf);
1472
1473
1475 info.pszCurrentAssemblyPathBuf =
NULL;
1481 "Expected sizeof(ASSEMBLY_INFO), got %ld\n",
info.cbAssemblyInfo);
1483 "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n",
info.dwAssemblyFlags);
1484
1485
1486 disp = 0xf00dbad;
1487 hr = IAssemblyCache_UninstallAssembly(
cache, 0,
L"wine",
NULL, &disp);
1488 ok(
hr ==
S_OK,
"Expected S_OK, got %08lx\n",
hr);
1489 ok(disp == IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED,
1490 "Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %ld\n", disp);
1491
1494 IAssemblyCache_Release(
cache);
1495}
#define FUSION_E_PRIVATE_ASM_DISALLOWED
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
#define ASSEMBLYINFO_FLAG_INSTALLED
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define E_NOT_SUFFICIENT_BUFFER