38#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
47 hr = IUnknown_QueryInterface(iface, iid, (
void **)&unk);
48 ok_(__FILE__,
line)(
hr == expected_hr,
"Got hr %#lx, expected %#lx.\n",
hr, expected_hr);
50 IUnknown_Release(unk);
53#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error %#08lx\n", hr)
57#define CHECK_EXPECTED_METHOD(method_name) check_expected_method_(__LINE__, method_name)
70static const WCHAR wszFileName1[] = {
'c',
':',
'\\',
'w',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
't',
'e',
's',
't',
'1',
'.',
'd',
'o',
'c',0};
71static const WCHAR wszFileName2[] = {
'c',
':',
'\\',
'w',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
't',
'e',
's',
't',
'2',
'.',
'd',
'o',
'c',0};
78 {0xb9, 0x3e, 0x2f, 0xf9, 0xc8, 0x32, 0x23, 0xd7}
89#define TEST_MONIKER_TYPE_TODO(m,t) _test_moniker_type(m, t, TRUE, __LINE__)
90#define TEST_MONIKER_TYPE(m,t) _test_moniker_type(m, t, FALSE, __LINE__)
96 hr = IMoniker_IsSystemMoniker(
moniker, &type2);
99 ok_(__FILE__,
line)(type2 ==
type,
"Unexpected moniker type %ld.\n", type2);
102#define TEST_DISPLAY_NAME(m,name) _test_moniker_name(m, name, __LINE__)
110 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to create bind context, hr %#lx.\n",
hr);
112 hr = IMoniker_GetDisplayName(
moniker, pbc,
NULL, &display_name);
113 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get display name, hr %#lx.\n",
hr);
117 IBindCtx_Release(pbc);
128 ok(
hr ==
S_OK,
"Failed to create antimoniker, hr %#lx.\n",
hr);
131 ok(
hr ==
S_OK,
"Failed to create a stream, hr %#lx.\n",
hr);
134 ok(
hr ==
S_OK,
"Failed to write contents, hr %#lx.\n",
hr);
138 ok(
hr ==
S_OK,
"Failed to rewind, hr %#lx.\n",
hr);
141 ok(
hr ==
S_OK,
"Failed to load, hr %#lx.\n",
hr);
183 unsigned int comp_len = 0;
184 WCHAR itemnameW[3] =
L"Ix";
191 itemnameW[1] =
desc[1];
219 IMoniker_Release(
left);
220 IMoniker_Release(
right);
223 ok(0,
"Unexpected description %s.\n",
desc);
230 unsigned int eaten = 0;
236 static SIZE_T global_size_alignment = -1;
237 if (global_size_alignment == -1)
244 return ((
size + global_size_alignment - 1) & ~(global_size_alignment - 1));
267 ok(0,
"unexpected call\n");
287 ok(extconn == EXTCONN_STRONG,
"Unexpected connection type %ld\n", extconn);
289 return ++
factory->external_connections;
296 ok(extconn == EXTCONN_STRONG,
"Unexpected connection type %ld\n", extconn);
298 return --
factory->external_connections;
371 factory->external_connections = 0;
389 IUnknown_AddRef(iface);
456 IParseDisplayName_AddRef(iface);
498 IOleItemContainer_AddRef(iface);
543 IOleItemContainer_AddRef(iface);
546 return 0x8bee0000 | bind_speed;
557 ok(0,
"Unexpected call.\n");
593 *ppvObject = &
moniker->IROTData_iface;
599 IMoniker_AddRef(iface);
670 IMoniker_AddRef(iface);
692 if (ppmkReduced==
NULL)
695 IMoniker_AddRef(iface);
715 if (ppenumMoniker ==
NULL)
718 *ppenumMoniker =
NULL;
779 static const WCHAR wszDisplayName[] = {
'*',
'*',
'G',
'e',
'm',
'm',
'a',0};
782 memcpy(*ppszDisplayName, wszDisplayName,
sizeof(wszDisplayName));
802 (*pwdMksys)=MKSYS_NONE;
895 '1',
'9',
'0',
'3',
'-',
'4',
'A',
'A',
'E',
'-',
'B',
'1',
'A',
'F',
'-',
896 '2',
'0',
'4',
'6',
'E',
'5',
'8',
'6',
'C',
'9',
'2',
'5',0};
903 static const char *methods_register_no_ROTData[] =
906 "Moniker_GetTimeOfLastChange",
907 "Moniker_QueryInterface(IID_IROTData)",
908 "Moniker_GetDisplayName",
909 "Moniker_GetClassID",
912 static const char *methods_register[] =
915 "Moniker_GetTimeOfLastChange",
916 "Moniker_QueryInterface(IID_IROTData)",
917 "ROTData_GetComparisonData",
920 static const char *methods_isrunning_no_ROTData[] =
923 "Moniker_QueryInterface(IID_IROTData)",
924 "Moniker_GetDisplayName",
925 "Moniker_GetClassID",
928 static const char *methods_isrunning[] =
931 "Moniker_QueryInterface(IID_IROTData)",
932 "ROTData_GetComparisonData",
948 ok(
hr ==
S_OK,
"Failed to register interface, hr %#lx.\n",
hr);
950 ok(
factory.external_connections == 1,
"external_connections = %d\n",
factory.external_connections);
951 ok(
factory.refcount > 1,
"Unexpected factory refcount %lu.\n",
factory.refcount);
958 hr = IRunningObjectTable_Revoke(pROT, dwCookie);
960 ok(!
factory.external_connections,
"external_connections = %d\n",
factory.external_connections);
961 ok(
factory.refcount == 1,
"Unexpected factory refcount %lu.\n",
factory.refcount);
970 ok(
factory.refcount > 1,
"Unexpected factory refcount %lu.\n",
factory.refcount);
978 hr = IRunningObjectTable_Revoke(pROT, dwCookie);
980 ok(
factory.refcount == 1,
"Unexpected factory refcount %lu.\n",
factory.refcount);
986 factory.external_connections = 0;
989 ok(!
factory.external_connections,
"external_connections = %d\n",
factory.external_connections);
990 ok(
factory.refcount > 1,
"Unexpected factory refcount %lu.\n",
factory.refcount);
992 hr = IRunningObjectTable_Revoke(pROT, dwCookie);
994 ok(
factory.refcount == 1,
"Unexpected factory refcount %lu.\n",
factory.refcount);
998 pMoniker, &dwCookie);
1000 ok(
factory.refcount > 1,
"Unexpected factory refcount %lu.\n",
factory.refcount);
1002 hr = IRunningObjectTable_Revoke(pROT, dwCookie);
1004 ok(
factory.refcount == 1,
"Unexpected factory refcount %lu.\n",
factory.refcount);
1009 hr = IRunningObjectTable_Register(pROT, ROTFLAGS_REGISTRATIONKEEPSALIVE | ROTFLAGS_ALLOWANYCLIENT,
1016 hr = IRunningObjectTable_Revoke(pROT, dwCookie);
1021 ok(
hr ==
E_INVALIDARG,
"IRunningObjectTable_Register should have returned E_INVALIDARG instead of 0x%08lx\n",
hr);
1023 IMoniker_Release(pMoniker);
1030 pMoniker, &dwCookie);
1033 IMoniker_Release(pMoniker);
1040 pMoniker, &dwCookie);
1042 IMoniker_Release(pMoniker);
1045 IRunningObjectTable_Release(pROT);
1053 DWORD dwCookie1, dwCookie2;
1055 static const WCHAR moniker_path[] =
1056 {
'\\',
'w',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
's',
'y',
's',
't',
'e',
'm',
'\\',
't',
'e',
's',
't',
'1',
'.',
'd',
'o',
'c',0};
1073 ok(dwCookie1 != dwCookie2,
"cookie returned for registering duplicate object shouldn't match cookie of original object (0x%lx)\n", dwCookie1);
1075 hr = IRunningObjectTable_GetObject(pROT, pMoniker, &
pObject);
1079 hr = IRunningObjectTable_Revoke(pROT, dwCookie1);
1082 hr = IRunningObjectTable_GetObject(pROT, pMoniker, &
pObject);
1086 hr = IRunningObjectTable_Revoke(pROT, dwCookie2);
1089 IMoniker_Release(pMoniker);
1091 IRunningObjectTable_Release(pROT);
1100 IParseDisplayName_AddRef(iface);
1125 char display_nameA[256];
1128 ok(pszDisplayName ==
expected_display_name,
"pszDisplayName should be the same pointer as passed into MkParseDisplayName\n");
1129 *pchEaten =
lstrlenW(pszDisplayName);
1148 while ((IEnumMoniker_Next(spEM, 1, &spMoniker,
NULL)==
S_OK))
1152 hr=IMoniker_GetDisplayName(spMoniker, pbc,
NULL, &szDisplayn);
1185 static const WCHAR wszDisplayName[] = {
'c',
'l',
's',
'i',
'd',
':',
1186 '2',
'0',
'D',
'0',
'4',
'F',
'E',
'0',
'-',
'3',
'A',
'E',
'A',
'-',
'1',
'0',
'6',
'9',
'-',
'A',
'2',
'D',
'8',
'-',
'0',
'8',
'0',
'0',
'2',
'B',
'3',
'0',
'3',
'0',
'9',
'D',
':',0};
1187 static const WCHAR wszDisplayNameClsid[] = {
'c',
'l',
's',
'i',
'd',
':',0};
1188 static const WCHAR wszNonExistentProgId[] = {
'N',
'o',
'n',
'E',
'x',
'i',
's',
't',
'e',
'n',
't',
'P',
'r',
'o',
'g',
'I',
'd',
':',0};
1189 static const WCHAR wszDisplayNameRunning[] = {
'W',
'i',
'n',
'e',
'T',
'e',
's',
't',
'R',
'u',
'n',
'n',
'i',
'n',
'g',0};
1190 static const WCHAR wszDisplayNameProgId1[] = {
'S',
't',
'd',
'F',
'o',
'n',
't',
':',0};
1191 static const WCHAR wszDisplayNameProgId2[] = {
'@',
'S',
't',
'd',
'F',
'o',
'n',
't',0};
1192 static const WCHAR wszDisplayNameProgIdFail[] = {
'S',
't',
'd',
'F',
'o',
'n',
't',0};
1194 char szDisplayNameFile[256];
1195 WCHAR wszDisplayNameFile[256];
1201 LPCOLESTR szDisplayName;
1204 } invalid_parameters[] =
1217 {&pbc,
NULL, &eaten, &pmk},
1235 invalid_parameters[
i].szDisplayName,
1236 invalid_parameters[
i].pchEaten,
1237 invalid_parameters[
i].ppmk);
1238 ok(
hr ==
E_INVALIDARG,
"[%d] MkParseDisplayName should have failed with E_INVALIDARG instead of 0x%08lx\n",
i,
hr);
1239 ok(eaten == 0xdeadbeef,
"[%d] Processed character count should have been 0xdeadbeef instead of %lu\n",
i, eaten);
1240 ok(pmk == (
IMoniker *)0xdeadbeef,
"[%d] Output moniker pointer should have been 0xdeadbeef instead of %p\n",
i, pmk);
1248 ok(eaten == 0,
"Processed character count should have been 0 instead of %lu\n", eaten);
1249 ok(pmk ==
NULL,
"Output moniker pointer should have been NULL instead of %p\n", pmk);
1258 ok(eaten == 0,
"Processed character count should have been 0 instead of %lu\n", eaten);
1259 ok(pmk ==
NULL,
"Output moniker pointer should have been NULL instead of %p\n", pmk);
1264 hr = IBindCtx_GetRunningObjectTable(pbc, &pprot);
1268 IMoniker_Release(pmk);
1273 "Processed character count should have been 43 instead of %lu\n", eaten);
1277 IMoniker_Release(pmk);
1279 hr = IRunningObjectTable_Revoke(pprot, pdwReg1);
1281 IRunningObjectTable_Release(pprot);
1285 hr = IBindCtx_GetRunningObjectTable(pbc, &pprot);
1289 IMoniker_Release(pmk);
1294 "Processed character count should have been 15 instead of %lu\n", eaten);
1298 IMoniker_Release(pmk);
1300 hr = IRunningObjectTable_Revoke(pprot, pdwReg1);
1302 IRunningObjectTable_Release(pprot);
1311 "Processed character count should have been 8 instead of %lu\n", eaten);
1315 IMoniker_Release(pmk);
1322 "Processed character count should have been 8 instead of %lu\n", eaten);
1326 IMoniker_Release(pmk);
1334 ok(eaten == 0,
"Processed character count should have been 0 instead of %lu\n", eaten);
1335 ok(pmk ==
NULL,
"Output moniker pointer should have been NULL instead of %p\n", pmk);
1341 strcat(szDisplayNameFile,
"\\kernel32.dll");
1346 ok(eaten ==
len - 1,
"Processed character count should have been %d instead of %lu\n",
len - 1, eaten);
1350 IMoniker_Release(pmk);
1356 "Processed character count should have been 43 instead of %lu\n", eaten);
1364 IUnknown_Release(
object);
1365 IMoniker_Release(pmk);
1367 IBindCtx_Release(pbc);
1374 ok(
hr ==
S_OK,
"Failed to create file moniker, hr %#lx.\n",
hr);
1376 ok(
hr ==
S_OK,
"Failed to create file moniker, hr %#lx.\n",
hr);
1377 hr = IBindCtx_GetRunningObjectTable(pbc, &pprot);
1378 ok(
hr ==
S_OK,
"Failed to get ROT, hr %#lx.\n",
hr);
1381 hr = IRunningObjectTable_EnumRunning(pprot, &spEM1);
1382 ok(
hr ==
S_OK,
"Failed to get enum object, hr %#lx.\n",
hr);
1383 hr = IEnumMoniker_QueryInterface(spEM1, &
IID_IUnknown, (
void *)&lpEM1);
1385 ok(
hr ==
S_OK,
"Failed to get interface, hr %#lx.\n",
hr);
1389 hr = IRunningObjectTable_Register(pprot, ROTFLAGS_REGISTRATIONKEEPSALIVE, lpEM1, pmk1, &pdwReg1);
1390 ok(
hr ==
S_OK,
"Failed to register object, hr %#lx.\n",
hr);
1392 hr = IRunningObjectTable_Register(pprot, ROTFLAGS_REGISTRATIONKEEPSALIVE, lpEM1, pmk2, &pdwReg2);
1393 ok(
hr ==
S_OK,
"Failed to register object, hr %#lx.\n",
hr);
1395 hr = IRunningObjectTable_EnumRunning(pprot, &spEM2);
1396 ok(
hr ==
S_OK,
"Failed to get enum object, hr %#lx.\n",
hr);
1399 ok(matchCnt==2,
"Number of matches should be equal to 2 not %i\n", matchCnt);
1401 IEnumMoniker_Clone(spEM2, &spEM3);
1404 ok(matchCnt==0,
"Number of matches should be equal to 0 not %i\n", matchCnt);
1405 IEnumMoniker_Reset(spEM3);
1408 ok(matchCnt==2,
"Number of matches should be equal to 2 not %i\n", matchCnt);
1410 hr = IRunningObjectTable_Revoke(pprot,pdwReg1);
1411 ok(
hr ==
S_OK,
"Failed to revoke, hr %#lx.\n",
hr);
1412 hr = IRunningObjectTable_Revoke(pprot,pdwReg2);
1413 ok(
hr ==
S_OK,
"Failed to revoke, hr %#lx.\n",
hr);
1414 IUnknown_Release(lpEM1);
1415 IEnumMoniker_Release(spEM1);
1416 IEnumMoniker_Release(spEM2);
1417 IEnumMoniker_Release(spEM3);
1418 IMoniker_Release(pmk1);
1419 IMoniker_Release(pmk2);
1420 IRunningObjectTable_Release(pprot);
1422 IBindCtx_Release(pbc);
1429 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1430 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1431 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1432 0x1a,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1433 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1434 0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
1435 0x05,0xe0,0x02,0x00,0x00,0x00,0x00,0x00,
1436 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1437 0x00,0x00,0x00,0x00,
1442 0x05,0xe0,0x02,0x00,0x00,0x00,0x00,0x00,
1443 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1444 0x00,0x00,0x00,0x00,
1449 0x1a,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1450 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1451 0x05,0xe0,0x02,0x00,0x00,0x00,0x00,0x00,
1452 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1457 'c',
'l',
's',
'i',
'd',
':',
'0',
'0',
'0',
'2',
'E',
'0',
'0',
'5',
'-',
'0',
'0',
'0',
1458 '0',
'-',
'0',
'0',
'0',
'0',
'-',
'C',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'0',
'0',
1459 '0',
'0',
'0',
'0',
'4',
'6',
':',0
1464 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1465 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1466 '!',0x00,
'T',0x00,
'E',0x00,
'S',0x00,
1472 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1473 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1474 'T',0x00,
'E',0x00,
'S',0x00,
'T',0x00,
1480 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1481 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1482 '&',0x00,
'&',0x00,
'T',0x00,
'E',0x00,
1483 'S',0x00,
'T',0x00,0x00,0x00,
1488 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1489 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1490 'A',0x00,
'B',0x00,
'T',0x00,
'E',0x00,
1491 'S',0x00,
'T',0x00,0x00,0x00,
1496 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1497 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1503 0x02,0x00,0x00,0x00,
'!',0x00,0x05,0x00,
1504 0x00,0x00,
'T',
'e',
's',
't',0x00,
1509 0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,
1510 'T',
'e',
's',
't',0x00,
1515 0x01,0x00,0x00,0x00,0x00,0x05,0x00,0x00,
1516 0x00,
'T',
'e',
's',
't',0x00,
1521 0x03,0x00,0x00,0x00,
'&',
'&',0x00,0x05,
1522 0x00,0x00,0x00,
'T',
'e',
's',
't',0x00,
1527 0x03,0x00,0x00,0x00,
'a',
'b',0x00,0x05,
1528 0x00,0x00,0x00,
'T',
'e',
's',
't',0x00,
1533 0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
1539 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1540 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1541 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1542 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1543 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1544 0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
1545 0x02,0x00,0x00,0x00,
'!',0x00,0x05,0x00,
1546 0x00,0x00,
'T',
'e',
's',
't',0x00,
1551 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1552 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1553 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1554 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1555 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1556 0x00,0x00,0x00,0x00,0x2e,0x00,0x00,0x00,
1557 0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,
1558 'T',
'e',
's',
't',0x00,
1563 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1564 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1565 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1566 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1567 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1568 0x00,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
1569 0x01,0x00,0x00,0x00,0x00,0x05,0x00,0x00,
1570 0x00,
'T',
'e',
's',
't',0x00,
1575 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1576 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1577 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1578 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1579 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1580 0x00,0x00,0x00,0x00,0x3a,0x00,0x00,0x00,
1581 0x03,0x00,0x00,0x00,
'&',
'&',0x00,0x05,
1582 0x00,0x00,0x00,
'T',
'e',
's',
't',0x00,
1587 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1588 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1589 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1590 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1591 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1592 0x00,0x00,0x00,0x00,0x3a,0x00,0x00,0x00,
1593 0x03,0x00,0x00,0x00,
'a',
'b',0x00,0x05,
1594 0x00,0x00,0x00,
'T',
'e',
's',
't',0x00,
1599 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1600 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1601 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1602 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1603 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1604 0x00,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
1605 0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
1611 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1612 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1613 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1614 0x05,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1615 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1616 0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
1617 0x01,0x00,0x00,0x00,
1622 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1623 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1624 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1625 0x05,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1626 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1627 0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
1628 0x02,0x00,0x00,0x00,
1633 0x01,0x00,0x00,0x00,
1638 0x02,0x00,0x00,0x00,
1643 0x05,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1644 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1645 0x01,0x00,0x00,0x00,
1650 0x05,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1651 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1652 0x02,0x00,0x00,0x00,
1657 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1658 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1659 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1660 0x09,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1661 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1662 0x00,0x00,0x00,0x00,0x2c,0x01,0x00,0x00,
1663 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1664 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1665 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1666 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1667 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1668 0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
1669 0x02,0x00,0x00,0x00,0x21,0x00,0x05,0x00,
1670 0x00,0x00,0x54,0x65,0x73,0x74,0x00,0x4d,
1671 0x45,0x4f,0x57,0x04,0x00,0x00,0x00,0x0f,
1672 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
1673 0x00,0x00,0x00,0x00,0x00,0x00,0x46,0x04,
1674 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
1675 0x00,0x00,0x00,0x00,0x00,0x00,0x46,0x00,
1676 0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x02,
1677 0x00,0x00,0x00,0x23,0x00,0x05,0x00,0x00,
1678 0x00,0x57,0x69,0x6e,0x65,0x00,
1683 0x02,0x00,0x00,0x00,0x04,0x03,0x00,0x00,
1684 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,
1685 0x00,0x00,0x00,0x46,0x02,0x00,0x00,0x00,
1686 0x21,0x00,0x05,0x00,0x00,0x00,0x54,0x65,
1687 0x73,0x74,0x00,0x04,0x03,0x00,0x00,0x00,
1688 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,
1689 0x00,0x00,0x46,0x02,0x00,0x00,0x00,0x23,
1690 0x00,0x05,0x00,0x00,0x00,0x57,0x69,0x6e,
1696 0x09,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1697 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1698 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1699 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1700 '!',0x00,
'T',0x00,
'E',0x00,
'S',0x00,
1701 'T',0x00,0x00,0x00,0x04,0x03,0x00,0x00,
1702 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,
1703 0x00,0x00,0x00,0x46,
'#',0x00,
'W',0x00,
1704 'I',0x00,
'N',0x00,
'E',0x00,0x00,0x00,
1709 const BYTE *expected_moniker_marshal_data,
unsigned int sizeof_expected_moniker_marshal_data,
1710 const BYTE *expected_moniker_saved_data,
unsigned int sizeof_expected_moniker_saved_data,
1711 const BYTE *expected_moniker_comparison_data,
unsigned int sizeof_expected_moniker_comparison_data,
1727 ok(
hr ==
S_FALSE,
"%s: IMoniker_IsDirty should return S_FALSE, not 0x%08lx\n", testname,
hr);
1733 ok(
hr ==
S_FALSE,
"%s: IMoniker_IsDirty should return S_FALSE, not 0x%08lx\n", testname,
hr);
1737 hr = IMoniker_QueryInterface(
moniker, &IID_IROTData, (
void **)&rotdata);
1740 hr = IROTData_GetComparisonData(rotdata,
buffer,
sizeof(
buffer), &moniker_size);
1743 if (
hr !=
S_OK) moniker_size = 0;
1746 ok(moniker_size == sizeof_expected_moniker_comparison_data,
1747 "%s: Size of comparison data differs (expected %d, actual %ld)\n",
1748 testname, sizeof_expected_moniker_comparison_data, moniker_size);
1752 for (
i = 0;
i <
min(moniker_size, sizeof_expected_moniker_comparison_data);
i++)
1754 if (expected_moniker_comparison_data[
i] !=
buffer[
i])
1761 ok(same,
"%s: Comparison data differs\n", testname);
1764 for (
i = 0;
i < moniker_size;
i++)
1773 IROTData_Release(rotdata);
1780 IMoniker_IsSystemMoniker(
moniker, &moniker_type);
1783 ok(
hr ==
S_OK,
"Failed to get max size, hr %#lx.\n",
hr);
1785 ok(expected_max_size ==
max_size.u.LowPart,
"%s: unexpected max size %lu.\n", testname,
max_size.u.LowPart);
1799 "%s: Size of saved data differs (expected %ld, actual %ld)\n",
1806 if (expected_moniker_saved_data[
i] != moniker_data[
i])
1813 ok(same,
"%s: Saved data differs\n", testname);
1816 for (
i = 0;
i < moniker_size;
i++)
1819 printf(
"0x%02x,", moniker_data[
i]);
1846 "%s: Size of marshaled data differs (expected %ld, actual %ld)\n",
1851 if (expected_moniker_marshal_data)
1855 if (expected_moniker_marshal_data[
i] != moniker_data[
i])
1863 ok(same,
"%s: Marshaled data differs\n", testname);
1866 for (
i = 0;
i < moniker_size;
i++)
1869 printf(
"0x%02x,", moniker_data[
i]);
1882 IMoniker_Release(moniker_proxy);
1895 {
L"clsid:11111111-0000-0000-2222-444444444444;extra data:", 54 },
1896 {
L"clsid:11111111-0000-0000-2222-444444444444extra data", 52 },
1897 {
L"clsid:11111111-0000-0000-2222-444444444444:", 43 },
1898 {
L"clsid:11111111-0000-0000-2222-444444444444", 42 },
1899 {
L"clsid:{11111111-0000-0000-2222-444444444444}", 44 },
1900 {
L"clsid:{11111111-0000-0000-2222-444444444444", 0,
MK_E_SYNTAX },
1901 {
L"clsid:11111111-0000-0000-2222-444444444444}", 43 },
1929 ok(eaten ==
tests[
i].eaten,
"%u: unexpected eaten length %lu, expected %lu.\n",
i, eaten,
tests[
i].eaten);
1940 ok(eaten == 54,
"Unexpected length %lu.\n", eaten);
1942 hr =
MkParseDisplayName(bindctx,
L"clsid:11111111-0000-0000-2222-444444444444;different extra data:", &eaten, &moniker2);
1949 ok(
size.LowPart == 44,
"Unexpected size %lu.\n",
size.LowPart);
1953 hr = IMoniker_IsEqual(
moniker, moniker2);
1956 hr = IMoniker_IsEqual(moniker2,
moniker);
1959 IMoniker_Release(moniker2);
1978 ok(
size.QuadPart == 20,
"Unexpected size %lu.\n",
size.LowPart);
1980 hr = IStream_Write(
stream, &CLSID_StdComponentCategoriesMgr,
sizeof(
CLSID),
NULL);
1996 ok(
size.QuadPart == 30,
"Unexpected size %lu.\n",
size.LowPart);
2014 ok(*
data == 10,
"Unexpected data length %lu.\n", *
data);
2021 hr = IMoniker_QueryInterface(
moniker, &IID_IROTData, (
void **)&rotdata);
2027 IROTData_Release(rotdata);
2036 ok(
size.LowPart == 20,
"Unexpected size %lu.\n",
size.LowPart);
2038 hr = IMoniker_QueryInterface(
moniker, &CLSID_ClassMoniker, (
void **)&
unknown);
2054 ok(
hash == CLSID_StdComponentCategoriesMgr.Data1,
2055 "Hash value != Data1 field of clsid, instead was 0x%08lx\n",
2063 ok(
hr ==
E_NOTIMPL,
"IMoniker_IsRunning should return E_NOTIMPL, not 0x%08lx\n",
hr);
2066 ok(
hr ==
E_NOTIMPL,
"IMoniker_IsRunning should return E_NOTIMPL, not 0x%08lx\n",
hr);
2069 ok(
hr ==
MK_E_UNAVAILABLE,
"IMoniker_GetTimeOfLastChange should return MK_E_UNAVAILABLE, not 0x%08lx\n",
hr);
2079 hr = IMoniker_Inverse(
moniker, &inverse);
2080 ok(
hr ==
S_OK,
"Failed to get inverse, hr %#lx.\n",
hr);
2082 IMoniker_Release(inverse);
2087 ok(reduced ==
moniker,
"Unexpected moniker.\n");
2088 IMoniker_Release(reduced);
2091 enummoniker = (
void *)0xdeadbeef;
2094 ok(!enummoniker,
"Unexpected pointer.\n");
2096 enummoniker = (
void *)0xdeadbeef;
2099 ok(!enummoniker,
"Unexpected pointer.\n");
2105 IBindCtx_Release(bindctx);
2112 ok(
hr ==
S_OK,
"Failed to compose, hr %#lx.\n",
hr);
2113 ok(!moniker2,
"Unexpected pointer.\n");
2114 IMoniker_Release(anti);
2119 ok(
hr ==
S_OK,
"Failed to compose, hr %#lx.\n",
hr);
2120 ok(!moniker2,
"Unexpected pointer.\n");
2121 IMoniker_Release(anti);
2131 IMoniker_Release(moniker2);
2132 IMoniker_Release(
c);
2142 IMoniker_Release(moniker2);
2143 IMoniker_Release(
c);
2150 IMoniker *moniker1 =
NULL, *moniker2 =
NULL, *m3, *inverse, *reduced, *anti;
2161 hr = IMoniker_QueryInterface(moniker1, &CLSID_FileMoniker, (
void **)&unk);
2163 ok(unk == (
IUnknown *)moniker1,
"Unexpected interface.\n");
2164 IUnknown_Release(unk);
2166 hr = IMoniker_Inverse(moniker1, &inverse);
2167 ok(
hr ==
S_OK,
"Failed to get inverse, hr %#lx.\n",
hr);
2169 IMoniker_Release(inverse);
2186 hr = IMoniker_IsEqual(moniker1, moniker2);
2191 ok(
hr ==
S_OK,
"Failed to create bind context, hr %#lx.\n",
hr);
2193 hr = IMoniker_Reduce(moniker1,
NULL, MKRREDUCE_ALL,
NULL, &reduced);
2196 hr = IMoniker_Reduce(moniker1, bind_ctx, MKRREDUCE_ALL,
NULL,
NULL);
2200 hr = IMoniker_Reduce(moniker1, bind_ctx, MKRREDUCE_ALL, &m3, &reduced);
2202 ok(reduced == moniker1,
"Unexpected moniker.\n");
2203 ok(m3 == anti,
"Unexpected pointer.\n");
2204 IMoniker_Release(reduced);
2205 IMoniker_Release(anti);
2207 hr = IMoniker_Reduce(moniker1, bind_ctx, MKRREDUCE_ALL,
NULL, &reduced);
2209 ok(reduced == moniker1,
"Unexpected moniker.\n");
2210 IMoniker_Release(reduced);
2213 enummoniker = (
void *)0xdeadbeef;
2214 hr = IMoniker_Enum(moniker1,
TRUE, &enummoniker);
2216 ok(!enummoniker,
"Unexpected pointer.\n");
2218 enummoniker = (
void *)0xdeadbeef;
2219 hr = IMoniker_Enum(moniker1,
FALSE, &enummoniker);
2221 ok(!enummoniker,
"Unexpected pointer.\n");
2227 IBindCtx_Release(bind_ctx);
2230 IMoniker_Release(moniker2);
2236 hr = IMoniker_ComposeWith(moniker1, anti,
TRUE, &moniker2);
2237 ok(
hr ==
S_OK,
"Failed to compose, hr %#lx.\n",
hr);
2238 ok(!moniker2,
"Unexpected pointer.\n");
2239 IMoniker_Release(anti);
2243 hr = IMoniker_ComposeWith(moniker1, anti,
TRUE, &moniker2);
2244 ok(
hr ==
S_OK,
"Failed to compose, hr %#lx.\n",
hr);
2246 hr = IMoniker_Hash(moniker2, &
hash);
2247 ok(
hr ==
S_OK,
"Failed to get hash, hr %#lx.\n",
hr);
2248 ok(
hash == 0x80000001,
"Unexpected hash.\n");
2249 IMoniker_Release(moniker2);
2251 IMoniker_Release(anti);
2253 IMoniker_Release(moniker1);
2259 {
'\\',
'w',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
's',
'y',
's',
't',
'e',
'm',
'\\',
't',
'e',
's',
't',
'1',
'.',
'd',
'o',
'c',0},
2260 {
'\\',
'a',
'b',
'c',
'd',
'e',
'f',
'g',
'\\',
'h',
'i',
'j',
'k',
'l',
'\\',
'm',
'n',
'o',
'p',
'q',
'r',
's',
't',
'u',
'.',
'm',
'n',
'o',0},
2262 {0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0},
2267 {0x20ac, 0x2020, 0x100, 0x101, 0x102, 0x103, 0x104, 0x105, 0x106, 0x107, 0x108, 0x109, 0x10a, 0x10b, 0x10c, 0},
2271 BIND_OPTS bind_opts;
2289 skip(
"string 2 doesn't round trip in codepage %u\n",
GetACP() );
2310 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
2324 ok(
hr ==
S_OK,
"Failed to create bind context, hr %#lx.\n",
hr);
2329 bind_opts.cbStruct =
sizeof(bind_opts);
2331 hr = IBindCtx_SetBindOptions(bindctx, &bind_opts);
2338 hr = IBindCtx_SetBindOptions(bindctx, &bind_opts);
2344 memset(&statstg, 0,
sizeof(statstg));
2345 hr = IStorage_Stat(
storage, &statstg, STATFLAG_NONAME);
2350 IBindCtx_Release(bindctx);
2357 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
2360 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
2362 hr = IMoniker_IsEqual(
moniker, moniker2);
2368 IMoniker_Release(moniker2);
2374 static const char item_moniker_unicode_delim_stream[] =
2376 0x05, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00,
'!',
2377 0x00, 0x02, 0x00, 0x00, 0x00,
'A', 0x00,
2379 static const char item_moniker_unicode_item_stream[] =
2381 0x02, 0x00, 0x00, 0x00,
'!', 0x00, 0x05, 0x00,
2382 0x00, 0x00, 0xff, 0xff, 0x00,
'B', 0x00,
2384 static const char item_moniker_unicode_delim_item_stream[] =
2386 0x05, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00,
'!',
2387 0x00, 0x06, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
2394 const WCHAR *display_name;
2396 item_moniker_data[] =
2398 { item_moniker_unicode_delim_stream,
sizeof(item_moniker_unicode_delim_stream),
L"!A" },
2399 { item_moniker_unicode_item_stream,
sizeof(item_moniker_unicode_item_stream),
L"!B" },
2400 { item_moniker_unicode_delim_item_stream,
sizeof(item_moniker_unicode_delim_item_stream),
L"!C" },
2404 const WCHAR *delim1;
2406 const WCHAR *delim2;
2411 {
L"!",
L"Item1",
L"!",
L"ITEM1",
S_OK },
2413 {
L"",
L"Item1",
L"!",
L"ITEM1",
S_OK },
2414 {
L"&",
L"Item1",
L"!",
L"ITEM1",
S_OK },
2426 {
L"!",
L"Test", 0x73c },
2427 {
L"%",
L"Test", 0x73c },
2428 {
L"%",
L"TEST", 0x73c },
2429 {
L"%",
L"T", 0x54 },
2430 {
L"%",
L"A", 0x41 },
2431 {
L"%",
L"a", 0x41 },
2433 static const char *methods_isrunning[] =
2435 "Moniker_IsRunning",
2438 IMoniker *
moniker, *moniker1, *moniker2, *moniker3, *reduced, *anti, *inverse, *
c;
2443 static const WCHAR wszDelimiter[] = {
'!',0};
2444 static const WCHAR wszObjectName[] = {
'T',
'e',
's',
't',0};
2447 WCHAR displayname[16] =
L"display name";
2450 BIND_OPTS bind_opts;
2455 ok(
hr ==
S_OK,
"Failed to create item moniker, hr %#lx.\n",
hr);
2457 hr = IMoniker_QueryInterface(
moniker, &CLSID_ItemMoniker, (
void **)&
unknown);
2471 ok(
hr ==
S_OK,
"Failed to create item moniker, hr %#lx.\n",
hr);
2482 ok(
hr ==
S_OK,
"Failed to create item moniker, hr %#lx.\n",
hr);
2493 ok(
hr ==
S_OK,
"Failed to create item moniker, hr %#lx.\n",
hr);
2503 ok(
hr ==
S_OK,
"Failed to create item moniker, hr %#lx.\n",
hr);
2506 ok(
hr ==
S_OK,
"Failed to create a stream, hr %#lx.\n",
hr);
2509 ok(
hr ==
S_OK,
"Failed to create bind context, hr %#lx.\n",
hr);
2515 ok(
hr ==
S_OK,
"Failed to seek stream, hr %#lx.\n",
hr);
2517 hr = IStream_Write(
stream, item_moniker_data[
i].
data, item_moniker_data[
i].data_len,
NULL);
2518 ok(
hr ==
S_OK,
"Failed to write stream contents, hr %#lx.\n",
hr);
2522 ok(
hr ==
S_OK,
"Failed to seek stream, hr %#lx.\n",
hr);
2524 hr = IMoniker_Load(moniker2,
stream);
2525 ok(
hr ==
S_OK,
"Failed to load moniker, hr %#lx.\n",
hr);
2532 IMoniker_Release(moniker2);
2540 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
2543 ok(
hr ==
S_OK,
"Failed to get hash value, hr %#lx.\n",
hr);
2544 ok(
hash == hash_tests[
i].
hash,
"%ld: unexpected hash value %#lx.\n",
i,
hash);
2565 ok(
hr ==
E_INVALIDARG,
"IMoniker_IsRunning should return E_INVALIDARG, not 0x%08lx\n",
hr);
2571 ok(
hr ==
S_FALSE,
"IMoniker_IsRunning should return S_FALSE, not 0x%08lx\n",
hr);
2574 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
2577 IMoniker_Release(moniker2);
2581 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
2586 hr = IBindCtx_GetRunningObjectTable(bindctx, &
rot);
2587 ok(
hr ==
S_OK,
"Failed to get ROT, hr %#lx.\n",
hr);
2590 ok(
hr ==
S_OK,
"Failed to register, hr %#lx.\n",
hr);
2602 ok(
hr ==
S_OK,
"Failed to revoke registration, hr %#lx.\n",
hr);
2604 IRunningObjectTable_Release(
rot);
2608 ok(
hr == 0x8beef000,
"Unexpected hr %#lx.\n",
hr);
2612 ok(
hr == 0x8beef000,
"Unexpected hr %#lx.\n",
hr);
2615 IMoniker_Release(moniker2);
2619 ok(
hr ==
E_INVALIDARG,
"IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08lx\n",
hr);
2622 ok(
hr == (0x8bee0000 | BINDSPEED_INDEFINITE),
"Unexpected hr %#lx.\n",
hr);
2624 bind_opts.cbStruct =
sizeof(bind_opts);
2625 hr = IBindCtx_GetBindOptions(bindctx, &bind_opts);
2626 ok(
hr ==
S_OK,
"Failed to get bind options, hr %#lx.\n",
hr);
2628 bind_opts.dwTickCountDeadline = 1;
2629 hr = IBindCtx_SetBindOptions(bindctx, &bind_opts);
2630 ok(
hr ==
S_OK,
"Failed to set bind options, hr %#lx.\n",
hr);
2632 ok(
hr == (0x8bee0000 | BINDSPEED_IMMEDIATE),
"Unexpected hr %#lx.\n",
hr);
2634 bind_opts.dwTickCountDeadline = 2499;
2635 hr = IBindCtx_SetBindOptions(bindctx, &bind_opts);
2636 ok(
hr ==
S_OK,
"Failed to set bind options, hr %#lx.\n",
hr);
2638 ok(
hr == (0x8bee0000 | BINDSPEED_IMMEDIATE),
"Unexpected hr %#lx.\n",
hr);
2640 bind_opts.dwTickCountDeadline = 2500;
2641 hr = IBindCtx_SetBindOptions(bindctx, &bind_opts);
2642 ok(
hr ==
S_OK,
"Failed to set bind options, hr %#lx.\n",
hr);
2644 ok(
hr == (0x8bee0000 | BINDSPEED_MODERATE),
"Unexpected hr %#lx.\n",
hr);
2651 ok(
hr == 0x8bee0001,
"Unexpected hr %#lx.\n",
hr);
2654 hr = IMoniker_ParseDisplayName(
moniker, bindctx,
NULL, displayname, &eaten, &moniker2);
2657 bind_opts.dwTickCountDeadline = 0;
2658 hr = IBindCtx_SetBindOptions(bindctx, &bind_opts);
2659 ok(
hr ==
S_OK,
"Failed to set bind options, hr %#lx.\n",
hr);
2660 hr = IMoniker_ParseDisplayName(
moniker, bindctx, &container_moniker->
IMoniker_iface, displayname, &eaten, &moniker2);
2661 ok(
hr == (0x8bee0000 | BINDSPEED_INDEFINITE),
"Unexpected hr %#lx.\n",
hr);
2663 bind_opts.dwTickCountDeadline = 1;
2664 hr = IBindCtx_SetBindOptions(bindctx, &bind_opts);
2665 ok(
hr ==
S_OK,
"Failed to set bind options, hr %#lx.\n",
hr);
2666 hr = IMoniker_ParseDisplayName(
moniker, bindctx, &container_moniker->
IMoniker_iface, displayname, &eaten, &moniker2);
2667 ok(
hr == (0x8bee0000 | BINDSPEED_IMMEDIATE),
"Unexpected hr %#lx.\n",
hr);
2669 bind_opts.dwTickCountDeadline = 2499;
2670 hr = IBindCtx_SetBindOptions(bindctx, &bind_opts);
2671 ok(
hr ==
S_OK,
"Failed to set bind options, hr %#lx.\n",
hr);
2672 hr = IMoniker_ParseDisplayName(
moniker, bindctx, &container_moniker->
IMoniker_iface, displayname, &eaten, &moniker2);
2673 ok(
hr == (0x8bee0000 | BINDSPEED_IMMEDIATE),
"Unexpected hr %#lx.\n",
hr);
2675 bind_opts.dwTickCountDeadline = 2500;
2676 hr = IBindCtx_SetBindOptions(bindctx, &bind_opts);
2677 ok(
hr ==
S_OK,
"Failed to set bind options, hr %#lx.\n",
hr);
2678 hr = IMoniker_ParseDisplayName(
moniker, bindctx, &container_moniker->
IMoniker_iface, displayname, &eaten, &moniker2);
2679 ok(
hr == (0x8bee0000 | BINDSPEED_MODERATE),
"Unexpected hr %#lx.\n",
hr);
2683 IBindCtx_Release(bindctx);
2686 ok(
hr ==
S_OK,
"Failed to get inverse, hr %#lx.\n",
hr);
2693 ok(reduced ==
moniker,
"Unexpected moniker.\n");
2694 IMoniker_Release(reduced);
2697 enummoniker = (
void *)0xdeadbeef;
2700 ok(!enummoniker,
"Unexpected pointer.\n");
2702 enummoniker = (
void *)0xdeadbeef;
2705 ok(!enummoniker,
"Unexpected pointer.\n");
2720 ok(
hr ==
S_OK,
"Failed to create moniker, hr %#lx.\n",
hr);
2723 ok(
hr ==
S_OK,
"Failed to create moniker, hr %#lx.\n",
hr);
2725 hr = IMoniker_IsEqual(
moniker, moniker2);
2726 ok(
hr == isequal_tests[
i].
hr,
"%ld: unexpected result %#lx.\n",
i,
hr);
2728 hr = IMoniker_IsEqual(moniker2,
moniker);
2729 ok(
hr == isequal_tests[
i].
hr,
"%ld: unexpected result %#lx.\n",
i,
hr);
2732 IMoniker_Release(moniker2);
2737 ok(
hr ==
S_OK,
"Failed to create item moniker, hr %#lx.\n",
hr);
2752 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
2757 ok(
hr ==
S_OK,
"Failed to compose, hr %#lx.\n",
hr);
2758 ok(!moniker2,
"Unexpected pointer.\n");
2759 IMoniker_Release(anti);
2764 ok(
hr ==
S_OK,
"Failed to compose, hr %#lx.\n",
hr);
2766 hr = IMoniker_Hash(moniker2, &
hash);
2767 ok(
hr ==
S_OK,
"Failed to get hash, hr %#lx.\n",
hr);
2768 ok(
hash == 0x80000001,
"Unexpected hash.\n");
2769 IMoniker_Release(moniker2);
2771 IMoniker_Release(anti);
2784 hr = IMoniker_Hash(moniker2, &
hash);
2785 ok(
hr ==
S_OK,
"Failed to get hash, hr %#lx.\n",
hr);
2786 ok(
hash == 0x80000003,
"Unexpected hash.\n");
2787 IMoniker_Release(moniker2);
2788 IMoniker_Release(
c);
2794 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
2796 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
2798 hr = IMoniker_CommonPrefixWith(
moniker, moniker2, &moniker3);
2800 ok(moniker3 ==
moniker,
"Unexpected object.\n");
2801 IMoniker_Release(moniker3);
2803 IMoniker_Release(moniker2);
2806 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
2808 moniker3 = (
void *)0xdeadbeef;
2809 hr = IMoniker_CommonPrefixWith(
moniker, moniker2, &moniker3);
2813 ok(!moniker3,
"Unexpected object.\n");
2816 IMoniker_Release(moniker2);
2832 moniker2 = (
void *)0xdeadbeef;
2833 hr = IMoniker_RelativePathTo(
moniker, moniker1, &moniker2);
2835 ok(!moniker2,
"Unexpected pointer.\n");
2837 IMoniker_Release(moniker1);
2848 ok(
hr ==
S_OK,
"Failed to seek, hr %#lx.\n",
hr);
2851 ok(
hr ==
S_OK,
"Stream write failed, hr %#lx.\n",
hr);
2854 ok(
hr ==
S_OK,
"Failed to seek, hr %#lx.\n",
hr);
2880 hr = IMoniker_QueryInterface(
moniker, &CLSID_AntiMoniker, (
void **)&
unknown);
2895 "Hash value != 0x80000001, instead was 0x%08lx\n",
2902 ok(
hr ==
MK_E_NOINVERSE,
"IMoniker_Inverse should have returned MK_E_NOINVERSE instead of 0x%08lx\n",
hr);
2910 ok(
hr ==
S_FALSE,
"IMoniker_IsRunning should return S_FALSE, not 0x%08lx\n",
hr);
2913 ok(
hr ==
E_NOTIMPL,
"IMoniker_GetTimeOfLastChange should return E_NOTIMPL, not 0x%08lx\n",
hr);
2916 ok(
hr ==
E_NOTIMPL,
"IMoniker_BindToObject should return E_NOTIMPL, not 0x%08lx\n",
hr);
2919 ok(
hr ==
E_NOTIMPL,
"IMoniker_BindToStorage should return E_NOTIMPL, not 0x%08lx\n",
hr);
2923 ok(
hr ==
S_OK,
"Failed to create moniker, hr %#lx.\n",
hr);
2926 hr = IMoniker_ComposeWith(
moniker, moniker2,
TRUE, &moniker3);
2928 ok(!moniker3,
"Unexpected interface.\n");
2931 ok(
hr ==
S_OK,
"Failed to compose, hr %#lx.\n",
hr);
2933 IMoniker_Release(moniker3);
2935 IMoniker_Release(moniker2);
2939 ok(
hr ==
S_OK,
"Failed to create moniker, hr %#lx.\n",
hr);
2942 ok(
hr ==
S_OK,
"Failed to create a stream, hr %#lx.\n",
hr);
2955 hr = IMoniker_IsEqual(
moniker, moniker2);
2958 hr = IMoniker_IsEqual(moniker2,
moniker);
2962 ok(
hr ==
S_OK,
"Failed to get hash value, hr %#lx.\n",
hr);
2963 ok(
hash == 0x80000002,
"Unexpected hash value %#lx.\n",
hash);
2975 ok(
hr ==
S_OK,
"Failed to get hash value, hr %#lx.\n",
hr);
2976 ok(
hash == 0x800fffff,
"Unexpected hash value %#lx.\n",
hash);
2984 ok(
hr ==
S_OK,
"Failed to get hash value, hr %#lx.\n",
hr);
2985 ok(
hash == 0x800fffff,
"Unexpected hash value %#lx.\n",
hash);
2993 hr = IMoniker_IsEqual(
moniker, moniker2);
2996 hr = IMoniker_IsEqual(moniker2,
moniker);
3000 ok(
hr ==
S_OK,
"Failed to get hash value, hr %#lx.\n",
hr);
3001 ok(
hash == 0x80000000,
"Unexpected hash value %#lx.\n",
hash);
3011 hr = IMoniker_IsEqual(
moniker, moniker2);
3014 hr = IMoniker_IsEqual(moniker2,
moniker);
3023 ok(reduced ==
moniker,
"Unexpected moniker.\n");
3024 IMoniker_Release(reduced);
3027 enummoniker = (
void *)0xdeadbeef;
3030 ok(!enummoniker,
"Unexpected pointer.\n");
3032 enummoniker = (
void *)0xdeadbeef;
3035 ok(!enummoniker,
"Unexpected pointer.\n");
3049 hr = IMoniker_CommonPrefixWith(
moniker, moniker2, &moniker3);
3051 ok(moniker3 ==
moniker,
"Unexpected prefix moniker.\n");
3052 IMoniker_Release(moniker3);
3054 hr = IMoniker_CommonPrefixWith(moniker2,
moniker, &moniker3);
3056 ok(moniker3 ==
moniker,
"Unexpected prefix moniker.\n");
3057 IMoniker_Release(moniker3);
3066 hr = IMoniker_Load(moniker2,
stream);
3069 hr = IMoniker_CommonPrefixWith(
moniker, moniker2, &moniker3);
3071 ok(moniker3 == moniker2,
"Unexpected prefix moniker.\n");
3072 IMoniker_Release(moniker3);
3074 hr = IMoniker_CommonPrefixWith(moniker2,
moniker, &moniker3);
3076 ok(moniker3 == moniker2,
"Unexpected prefix moniker.\n");
3077 IMoniker_Release(moniker3);
3085 hr = IMoniker_Load(moniker2,
stream);
3088 hr = IMoniker_CommonPrefixWith(
moniker, moniker2, &moniker3);
3090 ok(moniker3 ==
moniker,
"Unexpected prefix moniker.\n");
3091 IMoniker_Release(moniker3);
3098 hr = IMoniker_Load(moniker2,
stream);
3101 hr = IMoniker_CommonPrefixWith(
moniker, moniker2, &moniker3);
3103 ok(moniker3 ==
moniker,
"Unexpected prefix moniker.\n");
3104 IMoniker_Release(moniker3);
3107 IBindCtx_Release(bindctx);
3109 IMoniker_Release(moniker2);
3121 hr = IMoniker_RelativePathTo(
moniker, moniker2, &moniker3);
3123 ok(moniker3 == moniker2,
"Unexpected object.\n");
3124 IMoniker_Release(moniker3);
3125 IMoniker_Release(moniker2);
3128 hr = IMoniker_RelativePathTo(
moniker, moniker2, &moniker3);
3130 ok(moniker3 == moniker2,
"Unexpected object.\n");
3131 IMoniker_Release(moniker3);
3132 hr = IMoniker_RelativePathTo(moniker2,
moniker, &moniker3);
3134 ok(moniker3 ==
moniker,
"Unexpected object.\n");
3135 IMoniker_Release(moniker3);
3137 IMoniker_Release(moniker2);
3143 static const struct simplify_test
3147 unsigned int result_type;
3152 {
"I1",
"I2", MKSYS_GENERICCOMPOSITE,
L"!I1!I2" },
3153 {
"I1",
"A2", MKSYS_ANTIMONIKER,
L"\\.." },
3154 {
"A1",
"A1", MKSYS_GENERICCOMPOSITE,
L"\\..\\.." },
3155 {
"A2",
"A1", MKSYS_GENERICCOMPOSITE,
L"\\..\\..\\.." },
3156 {
"CI1I2",
"A1", MKSYS_ITEMMONIKER,
L"!I1" },
3157 {
"I1",
"A1", MKSYS_NONE },
3158 {
"CI1I2",
"A2", MKSYS_NONE },
3159 {
"CI1I2",
"A3", MKSYS_ANTIMONIKER,
L"\\.." },
3160 {
"CI1I3",
"CA1I2", MKSYS_GENERICCOMPOSITE,
L"!I1!I2" },
3162 IMoniker *
moniker, *inverse, *moniker1, *moniker2, *moniker3, *moniker4;
3181 ok(
hr ==
S_OK,
"Failed to create bind context, hr %#lx.\n",
hr);
3196 ok(
hr ==
S_OK,
"Failed to create a composite, hr %#lx.\n",
hr);
3200 hr = IMoniker_IsSystemMoniker(composite, &moniker_type);
3202 ok(moniker_type == simplify_tests[
i].result_type,
"Unexpected result type %lu.\n", moniker_type);
3204 hr = IMoniker_GetDisplayName(composite, bindctx,
NULL, &
name);
3209 IMoniker_Release(composite);
3212 ok(simplify_tests[
i].result_type == MKSYS_NONE,
"Unexpected result type.\n");
3216 IMoniker_Release(
left);
3217 IMoniker_Release(
right);
3221 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
3223 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
3225 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
3235 ok(
hr ==
S_OK,
"Failed to create composite, hr %#lx.\n",
hr);
3239 hr = IMoniker_QueryInterface(
moniker, &CLSID_CompositeMoniker, (
void **)&
unknown);
3249 160,
L"!Test#Wine");
3257 "Hash value != 0xd87, instead was 0x%08lx\n",
3268 ok(
hr ==
E_INVALIDARG,
"IMoniker_IsRunning should return E_INVALIDARG, not 0x%08lx\n",
hr);
3283 ok(
hr ==
MK_E_NOTBINDABLE,
"IMoniker_GetTimeOfLastChange should return MK_E_NOTBINDABLE, not 0x%08lx\n",
hr);
3286 ok(
hr ==
E_INVALIDARG,
"IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08lx\n",
hr);
3289 ok(
hr ==
S_OK,
"Failed to get inverse, hr %#lx.\n",
hr);
3297 hr = IBindCtx_GetRunningObjectTable(bindctx, &
rot);
3331 hr = IMoniker_BindToObject(moniker3, bindctx, moniker2, &IID_IMoniker, (
void **)&
unknown);
3339 hr = IRunningObjectTable_Register(
rot, ROTFLAGS_REGISTRATIONKEEPSALIVE, (
IUnknown *)moniker4,
3344 hr = IMoniker_BindToObject(moniker3, bindctx, moniker2, &IID_IMoniker, (
void **)&
unknown);
3351 IMoniker_Release(moniker3);
3352 IMoniker_Release(moniker2);
3355 IRunningObjectTable_Release(
rot);
3362 ok(
hr ==
S_OK,
"Failed to create a stream, hr %#lx.\n",
hr);
3371 ok(
hash == 0xdeadbeef,
"Unexpected hash %#lx.\n",
hash);
3376 hr = IMoniker_QueryInterface(
moniker, &IID_IROTData, (
void **)&rotdata);
3378 hr = IROTData_GetComparisonData(rotdata,
NULL, 0, &
len);
3380 IROTData_Release(rotdata);
3382 hr = IMoniker_QueryInterface(
moniker, &IID_IMarshal, (
void **)&marshal);
3384 hr = IMarshal_GetMarshalSizeMax(marshal, &IID_IMoniker,
NULL, MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL, &
len);
3386 hr = IMarshal_MarshalInterface(marshal,
stream, &IID_IMoniker,
NULL, MSHCTX_INPROC,
NULL, MSHLFLAGS_NORMAL);
3388 IMarshal_Release(marshal);
3400 hr = IMoniker_ComposeWith(moniker1,
moniker,
TRUE, &moniker2);
3403 hr = IBindCtx_GetRunningObjectTable(bindctx, &
rot);
3406 hr = IMoniker_GetTimeOfLastChange(
moniker, bindctx, moniker1, &ft);
3409 hr = IMoniker_GetTimeOfLastChange(
moniker, bindctx,
NULL, &ft);
3422 hr = IMoniker_GetTimeOfLastChange(
moniker, bindctx,
NULL, &ft);
3425 hr = IMoniker_GetTimeOfLastChange(
moniker, bindctx, moniker1, &ft);
3431 IRunningObjectTable_Release(
rot);
3434 IMoniker_Release(moniker1);
3448 moniker2 = (
void *)0xdeadbeef;
3451 ok(!moniker2,
"Unexpected pointer.\n");
3456 hr = IMoniker_IsEqual(
moniker, moniker2);
3458 IMoniker_Release(moniker2);
3461 hr = IMoniker_CommonPrefixWith(
moniker, moniker1, &moniker2);
3463 ok(moniker2 !=
moniker && moniker2 != moniker1,
"Unexpected object.\n");
3464 hr = IMoniker_IsEqual(
moniker, moniker2);
3466 IMoniker_Release(moniker2);
3470 hr = IMoniker_CommonPrefixWith(
moniker, moniker2, &moniker3);
3472 IMoniker_Release(moniker2);
3476 hr = IMoniker_CommonPrefixWith(
moniker, moniker2, &moniker3);
3478 hr = IMoniker_IsEqual(moniker2, moniker3);
3479 ok(
hr ==
S_OK && moniker3 != moniker2,
"Unexpected object.\n");
3480 IMoniker_Release(moniker3);
3482 hr = IMoniker_CommonPrefixWith(moniker2,
moniker, &moniker3);
3487 hr = IMoniker_IsEqual(moniker2, moniker3);
3488 ok(
hr ==
S_OK && moniker3 != moniker2,
"Unexpected object.\n");
3489 IMoniker_Release(moniker3);
3492 IMoniker_Release(moniker2);
3495 IMoniker_Release(moniker1);
3502 hr = IMoniker_IsEqual(moniker1,
NULL);
3504 hr = IMoniker_IsEqual(moniker1, moniker2);
3506 hr = IMoniker_IsEqual(moniker1, moniker1);
3508 IMoniker_Release(moniker2);
3509 IMoniker_Release(moniker1);
3519 ok(
moniker == moniker1,
"Unexpected pointer.\n");
3526 IMoniker_Release(moniker2);
3527 IMoniker_Release(moniker1);
3532 hr = IMoniker_Inverse(moniker1,
NULL);
3534 hr = IMoniker_Inverse(moniker1, &
inverse);
3539 IMoniker_Release(moniker1);
3544 hr = IMoniker_Inverse(moniker1, &
inverse);
3547 IMoniker_Release(moniker1);
3552 hr = IMoniker_Inverse(moniker1, &
inverse);
3555 IMoniker_Release(moniker1);
3566 hr = IMoniker_Inverse(moniker2, &
inverse);
3569 IMoniker_Release(moniker1);
3577 hr = IMoniker_Inverse(moniker2, &
inverse);
3582 IMoniker_Release(moniker2);
3584 IMoniker_Release(&
m->IMoniker_iface);
3603 hr = IMoniker_QueryInterface(
moniker, &IID_IROTData, (
void **)&rotdata);
3609 ok(!
len,
"Unexpected length %lu.\n",
len);
3611 IROTData_Release(rotdata);
3626 hr = IMoniker_Reduce(
moniker, bindctx, MKRREDUCE_ALL,
NULL, &moniker2);
3628 ok(moniker2 ==
moniker,
"Unexpected object.\n");
3629 IMoniker_Release(moniker2);
3644 hr = IEnumMoniker_Next(enummoniker, 0,
NULL,
NULL);
3647 moniker2 = (
void *)0xdeadbeef;
3648 hr = IEnumMoniker_Next(enummoniker, 0, &moniker2,
NULL);
3650 ok(!moniker2,
"Unexpected pointer.\n");
3653 moniker2 = (
void *)0xdeadbeef;
3654 hr = IEnumMoniker_Next(enummoniker, 0, &moniker2, &
len);
3656 ok(!
len,
"Unexpected count %lu.\n",
len);
3657 ok(!moniker2,
"Unexpected pointer.\n");
3659 hr = IEnumMoniker_Skip(enummoniker, 0);
3663 hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &
len);
3665 ok(
len == 1,
"Unexpected count %lu.\n",
len);
3667 IMoniker_Release(moniker2);
3670 hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &
len);
3672 ok(
len == 1,
"Unexpected count %lu.\n",
len);
3674 IMoniker_Release(moniker2);
3677 hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &
len);
3679 ok(
len == 1,
"Unexpected count %lu.\n",
len);
3681 IMoniker_Release(moniker2);
3684 hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &
len);
3686 ok(!
len,
"Unexpected count %lu.\n",
len);
3688 hr = IEnumMoniker_Skip(enummoniker, 0);
3691 hr = IEnumMoniker_Skip(enummoniker, 1);
3694 hr = IEnumMoniker_Clone(enummoniker,
NULL);
3697 enummoniker2 = (
void *)0xdeadbeef;
3698 hr = IEnumMoniker_Clone(enummoniker, &enummoniker2);
3700 ok(!enummoniker2,
"Unexpected pointer.\n");
3702 hr = IEnumMoniker_Reset(enummoniker);
3705 hr = IEnumMoniker_Skip(enummoniker, 2);
3709 hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &
len);
3711 ok(
len == 1,
"Unexpected count %lu.\n",
len);
3713 IMoniker_Release(moniker2);
3715 enummoniker2 = (
void *)0xdeadbeef;
3716 hr = IEnumMoniker_Clone(enummoniker, &enummoniker2);
3718 ok(!enummoniker2,
"Unexpected pointer.\n");
3720 IEnumMoniker_Release(enummoniker);
3724 ok(
hr ==
S_OK,
"Failed to get enumerator, hr %#lx.\n",
hr);
3726 hr = IEnumMoniker_Next(enummoniker, 0,
NULL,
NULL);
3729 moniker2 = (
void *)0xdeadbeef;
3730 hr = IEnumMoniker_Next(enummoniker, 0, &moniker2,
NULL);
3732 ok(!moniker2,
"Unexpected pointer.\n");
3735 moniker2 = (
void *)0xdeadbeef;
3736 hr = IEnumMoniker_Next(enummoniker, 0, &moniker2, &
len);
3738 ok(!
len,
"Unexpected count %lu.\n",
len);
3739 ok(!moniker2,
"Unexpected pointer.\n");
3741 hr = IEnumMoniker_Skip(enummoniker, 0);
3745 hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &
len);
3747 ok(
len == 1,
"Unexpected count %lu.\n",
len);
3749 IMoniker_Release(moniker2);
3752 hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &
len);
3754 ok(
len == 1,
"Unexpected count %lu.\n",
len);
3756 IMoniker_Release(moniker2);
3759 hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &
len);
3761 ok(
len == 1,
"Unexpected count %lu.\n",
len);
3763 IMoniker_Release(moniker2);
3766 hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &
len);
3768 ok(!
len,
"Unexpected count %lu.\n",
len);
3770 hr = IEnumMoniker_Skip(enummoniker, 0);
3773 hr = IEnumMoniker_Skip(enummoniker, 1);
3776 hr = IEnumMoniker_Clone(enummoniker,
NULL);
3779 enummoniker2 = (
void *)0xdeadbeef;
3780 hr = IEnumMoniker_Clone(enummoniker, &enummoniker2);
3782 ok(!enummoniker2,
"Unexpected pointer.\n");
3784 hr = IEnumMoniker_Reset(enummoniker);
3787 hr = IEnumMoniker_Skip(enummoniker, 2);
3791 hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &
len);
3793 ok(
len == 1,
"Unexpected count %lu.\n",
len);
3795 IMoniker_Release(moniker2);
3797 enummoniker2 = (
void *)0xdeadbeef;
3798 hr = IEnumMoniker_Clone(enummoniker, &enummoniker2);
3800 ok(!enummoniker2,
"Unexpected pointer.\n");
3802 IEnumMoniker_Release(enummoniker);
3813 hr = IMoniker_RelativePathTo(moniker1,
NULL,
NULL);
3815 hr = IMoniker_RelativePathTo(moniker1, moniker2, &moniker3);
3818 IBindCtx_Release(bindctx);
3856 hr = IMoniker_QueryInterface(
moniker, &CLSID_PointerMoniker, (
void **)&
unknown);
3860 hr = IMoniker_QueryInterface(
moniker, &IID_IMarshal, (
void **)&marshal);
3861 ok(
hr ==
S_OK,
"Failed to get interface, hr %#lx.\n",
hr);
3864 ok(
hr ==
S_OK,
"Failed to get class, hr %#lx.\n",
hr);
3867 hr = IMarshal_GetMarshalSizeMax(marshal, &IID_IMoniker,
NULL, CLSCTX_INPROC,
NULL, 0, &
size);
3868 ok(
hr ==
S_OK,
"Failed to get marshal size, hr %#lx.\n",
hr);
3869 ok(
size > 0,
"Unexpected size %ld.\n",
size);
3872 ok(
hr ==
S_OK,
"Failed to create a stream, hr %#lx.\n",
hr);
3875 ok(
hr ==
S_OK,
"Failed to marshal moniker, hr %#lx.\n",
hr);
3880 ok(
hr ==
S_OK,
"Failed to unmarshal, hr %#lx.\n",
hr);
3881 hr = IMoniker_IsEqual(
moniker, moniker2);
3882 ok(
hr ==
S_OK,
"Expected equal moniker, hr %#lx.\n",
hr);
3883 IMoniker_Release(moniker2);
3887 IMarshal_Release(marshal);
3889 ok(
factory.refcount > 1,
"Unexpected factory refcount %lu.\n",
factory.refcount);
3896 hr = IMoniker_GetDisplayName(
moniker, bindctx,
NULL, &display_name);
3902 display_name = (
void *)0xdeadbeef;
3905 ok(!display_name,
"Unexpected pointer.\n");
3907 IBindCtx_Release(bindctx);
3910 ok(
hr ==
S_FALSE,
"IMoniker_IsDirty should return S_FALSE, not 0x%08lx\n",
hr);
3918 ok(
hr ==
E_NOTIMPL,
"IMoniker_Save should have returned E_NOTIMPL instead of 0x%08lx\n",
hr);
3930 hr = IMoniker_Inverse(
moniker, &inverse);
3931 ok(
hr ==
S_OK,
"Failed to get inverse, hr %#lx.\n",
hr);
3933 IMoniker_Release(inverse);
3940 ok(
hr ==
S_OK,
"IMoniker_IsRunning should return S_OK, not 0x%08lx\n",
hr);
3943 ok(
hr ==
E_NOTIMPL,
"IMoniker_GetTimeOfLastChange should return E_NOTIMPL, not 0x%08lx\n",
hr);
3955 ok(
factory.refcount == 1,
"Unexpected factory refcount %lu.\n",
factory.refcount);
3961 ok(
hr ==
E_UNEXPECTED,
"IMoniker_BindToObject should have returned E_UNEXPECTED instead of 0x%08lx\n",
hr);
3964 ok(
hr ==
E_UNEXPECTED,
"IMoniker_BindToStorage should have returned E_UNEXPECTED instead of 0x%08lx\n",
hr);
3966 IBindCtx_Release(bindctx);
3979 ok(
hr ==
S_OK,
"Failed to create moniker, hr %#lx.\n",
hr);
3982 ok(
hr ==
S_OK,
"Failed to create moniker, hr %#lx.\n",
hr);
3987 hr = IMoniker_IsEqual(
moniker, moniker2);
3999 IMoniker_Release(
prefix);
4001 IMoniker_Release(moniker2);
4004 ok(
hr ==
S_OK,
"Failed to create moniker, hr %#lx.\n",
hr);
4006 hr = IMoniker_IsEqual(
moniker, moniker2);
4012 IMoniker_Release(moniker2);
4019 ok(
hr ==
S_OK,
"Failed to compose, hr %#lx.\n",
hr);
4020 ok(!moniker2,
"Unexpected pointer.\n");
4021 IMoniker_Release(anti);
4026 ok(
hr ==
S_OK,
"Failed to compose, hr %#lx.\n",
hr);
4028 IMoniker_Release(moniker2);
4030 IMoniker_Release(anti);
4043 hr = IMoniker_Hash(moniker2, &
hash);
4044 ok(
hr ==
S_OK,
"Failed to get hash, hr %#lx.\n",
hr);
4045 ok(
hash == 0x80000003,
"Unexpected hash.\n");
4046 IMoniker_Release(moniker2);
4047 IMoniker_Release(
c);
4057 IMoniker_Release(moniker2);
4058 IMoniker_Release(
c);
4065 moniker2 = (
void *)0xdeadbeef;
4068 ok(!moniker2,
"Unexpected pointer.\n");
4071 moniker2 = (
void *)0xdeadbeef;
4072 hr = IMoniker_RelativePathTo(
moniker, moniker3, &moniker2);
4074 ok(!moniker2,
"Unexpected pointer.\n");
4075 IMoniker_Release(moniker3);
4108 hr = IMoniker_QueryInterface(
moniker, &CLSID_PointerMoniker, (
void **)&
unknown);
4112 hr = IMoniker_QueryInterface(
moniker, &CLSID_ObjrefMoniker, (
void **)&
unknown);
4116 hr = IMoniker_QueryInterface(
moniker, &IID_IMarshal, (
void **)&marshal);
4117 ok(
hr ==
S_OK,
"Failed to get interface, hr %#lx\n",
hr);
4120 ok(
hr ==
S_OK,
"Failed to get class, hr %#lx\n",
hr);
4123 hr = IMarshal_GetMarshalSizeMax(marshal, &IID_IMoniker,
NULL, CLSCTX_INPROC,
NULL, 0, &
size);
4124 ok(
hr ==
S_OK,
"Failed to get marshal size, hr %#lx\n",
hr);
4128 ok(
hr ==
S_OK,
"Failed to create a stream, hr %#lx\n",
hr);
4131 ok(
hr ==
S_OK,
"Failed to marshal moniker, hr %#lx\n",
hr);
4136 ok(
hr ==
S_OK,
"Failed to unmarshal, hr %#lx\n",
hr);
4137 hr = IMoniker_IsEqual(
moniker, moniker2);
4139 ok(
hr ==
S_OK,
"Expected equal moniker, hr %#lx\n",
hr);
4140 IMoniker_Release(moniker2);
4144 IMarshal_Release(marshal);
4146 ok(
factory.refcount > 1,
"Unexpected factory refcount %lu\n",
factory.refcount);
4151 ok(
hr ==
S_OK,
"CreateBindCtx failed: 0x%08lx\n",
hr);
4153 hr = IMoniker_GetDisplayName(
moniker, bindctx,
NULL, &display_name);
4155 ok(
hr ==
S_OK,
"IMoniker_GetDisplayName failed: 0x%08lx\n",
hr);
4157 IBindCtx_Release(bindctx);
4160 ok(
hr ==
S_FALSE,
"IMoniker_IsDirty should return S_FALSE, not 0x%08lx\n",
hr);
4164 hr = IMoniker_QueryInterface(
moniker, &IID_IROTData, (
void **)&rotdata);
4165 ok(
hr ==
E_NOINTERFACE,
"IMoniker_QueryInterface(IID_IROTData) should have returned E_NOINTERFACE instead of 0x%08lx\n",
hr);
4170 ok(
hr ==
S_OK,
"CreateStreamOnHGlobal failed: 0x%08lx\n",
hr);
4174 ok(
hr ==
S_OK,
"IMoniker_Save failed: 0x%08lx\n",
hr);
4180 ok(
hr ==
S_OK,
"IMoniker_Hash failed: 0x%08lx\n",
hr);
4186 hr = IMoniker_Inverse(
moniker, &inverse);
4188 ok(
hr ==
S_OK,
"Failed to get inverse, hr %#lx\n",
hr);
4192 IMoniker_Release(inverse);
4196 ok(
hr ==
S_OK,
"CreateBindCtx failed: 0x%08lx\n",
hr);
4201 ok(
hr ==
S_OK,
"IMoniker_IsRunning should return S_OK, not 0x%08lx\n",
hr);
4204 ok(
hr ==
MK_E_UNAVAILABLE,
"IMoniker_GetTimeOfLastChange should return MK_E_UNAVAILABLE, not 0x%08lx\n",
hr);
4208 ok(
hr ==
S_OK,
"IMoniker_BindToObject failed: 0x%08lx\n",
hr);
4214 ok(
hr ==
S_OK,
"IMoniker_BindToObject failed: 0x%08lx\n",
hr);
4221 ok(
factory.refcount > 1,
"Unexpected factory refcount %lu\n",
factory.refcount);
4224 ok(
hr ==
S_OK,
"CreateObjrefMoniker failed, hr %#lx\n",
hr);
4228 ok(
hr ==
E_UNEXPECTED,
"IMoniker_BindToObject should have returned E_UNEXPECTED instead of 0x%08lx\n",
hr);
4232 ok(
hr ==
E_UNEXPECTED,
"IMoniker_BindToStorage should have returned E_UNEXPECTED instead of 0x%08lx\n",
hr);
4234 IBindCtx_Release(bindctx);
4237 enummoniker = (
void *)0xdeadbeef;
4240 ok(enummoniker ==
NULL,
"got %p\n", enummoniker);
4242 enummoniker = (
void *)0xdeadbeef;
4245 ok(enummoniker ==
NULL,
"got %p\n", enummoniker);
4251 ok(
hr ==
S_OK,
"CreateObjrefMoniker failed: hr %#lx\n",
hr);
4254 ok(
hr ==
S_OK,
"CreateObjrefMoniker failed: hr %#lx\n",
hr);
4260 hr = IMoniker_IsEqual(
moniker, moniker2);
4278 IMoniker_Release(
prefix);
4281 IMoniker_Release(moniker2);
4284 ok(
hr ==
S_OK,
"Failed to create moniker, hr %#lx\n",
hr);
4286 hr = IMoniker_IsEqual(
moniker, moniker2);
4294 IMoniker_Release(moniker2);
4302 ok(
hr ==
S_OK,
"Failed to compose, hr %#lx\n",
hr);
4304 ok(!moniker2,
"Unexpected pointer\n");
4305 IMoniker_Release(anti);
4311 ok(
hr ==
S_OK,
"Failed to compose, hr %#lx\n",
hr);
4315 IMoniker_Release(moniker2);
4318 IMoniker_Release(anti);
4329 BIND_OPTS3 bind_opts;
4334 static const WCHAR wszParamName[] = {
'G',
'e',
'm',
'm',
'a',0};
4335 static const WCHAR wszNonExistent[] = {
'N',
'o',
'n',
'E',
'x',
'i',
's',
't',
'e',
'n',
't',0};
4338 ok(
hr ==
E_INVALIDARG,
"CreateBindCtx with NULL ppbc should have returned E_INVALIDARG instead of 0x%08lx\n",
hr);
4341 ok(
hr ==
E_INVALIDARG,
"CreateBindCtx with reserved value non-zero should have returned E_INVALIDARG instead of 0x%08lx\n",
hr);
4346 hr = IBindCtx_GetRunningObjectTable(pBindCtx,
NULL);
4349 hr = IBindCtx_GetRunningObjectTable(pBindCtx, &
rot);
4354 ok(
rot == rot2,
"Unexpected ROT instance.\n");
4355 IRunningObjectTable_Release(
rot);
4356 IRunningObjectTable_Release(rot2);
4358 bind_opts.cbStruct = -1;
4359 hr = IBindCtx_GetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts);
4361 ok(bind_opts.cbStruct ==
sizeof(BIND_OPTS3) ||
broken(bind_opts.cbStruct ==
sizeof(BIND_OPTS2)) ,
4362 "Unexpected bind_opts.cbStruct %ld.\n", bind_opts.cbStruct);
4364 bind_opts.cbStruct =
sizeof(BIND_OPTS);
4365 hr = IBindCtx_GetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts);
4367 ok(bind_opts.cbStruct ==
sizeof(BIND_OPTS),
"bind_opts.cbStruct was %ld\n", bind_opts.cbStruct);
4369 memset(&bind_opts, 0xfe,
sizeof(bind_opts));
4370 bind_opts.cbStruct =
sizeof(bind_opts);
4371 hr = IBindCtx_GetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts);
4373 ok(bind_opts.cbStruct ==
sizeof(bind_opts) || bind_opts.cbStruct ==
sizeof(BIND_OPTS2) ,
4374 "Unexpected bind_opts.cbStruct %ld.\n", bind_opts.cbStruct);
4375 ok(bind_opts.grfFlags == 0,
"bind_opts.grfFlags was 0x%lx instead of 0\n", bind_opts.grfFlags);
4376 ok(bind_opts.grfMode ==
STGM_READWRITE,
"bind_opts.grfMode was 0x%lx instead of STGM_READWRITE\n", bind_opts.grfMode);
4377 ok(bind_opts.dwTickCountDeadline == 0,
"bind_opts.dwTickCountDeadline was %ld instead of 0\n", bind_opts.dwTickCountDeadline);
4378 ok(bind_opts.dwTrackFlags == 0,
"bind_opts.dwTrackFlags was 0x%lx instead of 0\n", bind_opts.dwTrackFlags);
4379 ok(bind_opts.dwClassContext == (CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER|CLSCTX_REMOTE_SERVER),
4380 "bind_opts.dwClassContext should have been 0x15 instead of 0x%lx\n", bind_opts.dwClassContext);
4382 ok(bind_opts.pServerInfo ==
NULL,
"bind_opts.pServerInfo should have been NULL instead of %p\n", bind_opts.pServerInfo);
4383 if (bind_opts.cbStruct >=
sizeof(BIND_OPTS3))
4384 ok(bind_opts.hwnd ==
NULL,
"Unexpected bind_opts.hwnd %p.\n", bind_opts.hwnd);
4386 bind_opts.cbStruct = -1;
4387 hr = IBindCtx_SetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts);
4388 ok(
hr ==
E_INVALIDARG,
"IBindCtx_SetBindOptions with bad cbStruct should have returned E_INVALIDARG instead of 0x%08lx\n",
hr);
4390 hr = IBindCtx_RegisterObjectParam(pBindCtx, (
WCHAR *)wszParamName,
NULL);
4391 ok(
hr ==
E_INVALIDARG,
"IBindCtx_RegisterObjectParam should have returned E_INVALIDARG instead of 0x%08lx\n",
hr);
4396 hr = IBindCtx_RegisterObjectParam(pBindCtx, (
WCHAR *)wszParamName, &
unknown->IUnknown_iface);
4399 hr = IBindCtx_GetObjectParam(pBindCtx, (
WCHAR *)wszParamName, ¶m_obj);
4401 IUnknown_Release(param_obj);
4404 ok(
hr ==
E_FAIL,
"IBindCtx_GetObjectParam with nonexistent key should have failed with E_FAIL instead of 0x%08lx\n",
hr);
4405 ok(param_obj ==
NULL,
"IBindCtx_GetObjectParam with nonexistent key should have set output parameter to NULL instead of %p\n", param_obj);
4408 ok(
hr ==
E_FAIL,
"IBindCtx_RevokeObjectParam with nonexistent key should have failed with E_FAIL instead of 0x%08lx\n",
hr);
4410 hr = IBindCtx_EnumObjectParam(pBindCtx, &pEnumString);
4411 ok(
hr ==
E_NOTIMPL,
"IBindCtx_EnumObjectParam should have returned E_NOTIMPL instead of 0x%08lx\n",
hr);
4412 ok(!pEnumString,
"pEnumString should be NULL\n");
4414 hr = IBindCtx_RegisterObjectBound(pBindCtx,
NULL);
4417 hr = IBindCtx_RevokeObjectBound(pBindCtx,
NULL);
4418 ok(
hr ==
E_INVALIDARG,
"IBindCtx_RevokeObjectBound(NULL) should have return E_INVALIDARG instead of 0x%08lx\n",
hr);
4430 ok(
hr ==
MK_E_NOTBOUND,
"IBindCtx_RevokeObjectBound with not bound object should have returned MK_E_NOTBOUND instead of 0x%08lx\n",
hr);
4432 IBindCtx_Release(pBindCtx);
4434 refs = IUnknown_Release(&
unknown->IUnknown_iface);
4435 ok(!refs,
"object param should have been destroyed, instead of having %ld refs\n", refs);
4438 ok(!refs,
"bound object should have been destroyed, instead of having %ld refs\n", refs);
4448 DWORD some_val = 0xFEDCBA98;
4460 size.u.LowPart = 128;
4461 hr = IStream_SetSize(pStm,
size);
4468 hr = IMoniker_Save(pMk, pStm,
TRUE);
4470 IMoniker_Release(pMk);
4473 hr = IStream_Seek(pStm, zero_pos, STREAM_SEEK_SET,
NULL);
4475 hr = IStream_Write(pStm, &some_val,
sizeof(
WORD),
NULL);
4478 hr = IStream_Seek(pStm, dead_pos, STREAM_SEEK_SET,
NULL);
4480 hr = IStream_Write(pStm, &some_val,
sizeof(
WORD),
NULL);
4483 hr = IStream_Seek(pStm, nulls_pos, STREAM_SEEK_SET,
NULL);
4485 for(
i = 0;
i < 5; ++
i){
4486 hr = IStream_Write(pStm, &some_val,
sizeof(
DWORD),
NULL);
4491 hr = IStream_Seek(pStm, zero_pos, STREAM_SEEK_SET,
NULL);
4498 hr = IMoniker_Load(pMk, pStm);
4501 IMoniker_Release(pMk);
4502 IStream_Release(pStm);
4520 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
4536 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
4549 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
4556 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
4559 ok(
hr ==
S_OK,
"Failed to create a moniker, hr %#lx.\n",
hr);
4564 ok(
moniker == file1,
"Unexpected pointer.\n");
4584 ok(
moniker == file1,
"Unexpected pointer.\n");
4592 ok(
moniker != composite,
"Unexpected pointer.\n");
4600 IMoniker_Release(composite2);
4601 IMoniker_Release(composite);
4614 IMoniker_Release(file2);
4615 IMoniker_Release(file1);
4616 IMoniker_Release(
item);
HRESULT WINAPI CreateAntiMoniker(IMoniker **moniker)
#define InterlockedIncrement
#define InterlockedDecrement
static WCHAR wszFileName[MAX_PATH]
const GUID IID_IClassFactory
HRESULT WINAPI CreateClassMoniker(REFCLSID rclsid, IMoniker **moniker)
HRESULT WINAPI MonikerCommonPrefixWith(IMoniker *pmkThis, IMoniker *pmkOther, IMoniker **ppmkCommon)
HRESULT WINAPI CreateGenericComposite(IMoniker *left, IMoniker *right, IMoniker **composite)
HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject(DWORD cookie)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(void *reserved, DWORD model)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, IUnknown *object, DWORD clscontext, DWORD flags, DWORD *cookie)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
HRESULT WINAPI GetHGlobalFromStream(IStream *stream, HGLOBAL *phglobal)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL delete_on_release, IStream **stream)
HRESULT WINAPI CoMarshalInterface(IStream *stream, REFIID riid, IUnknown *unk, DWORD dest_context, void *pvDestContext, DWORD mshlFlags)
HRESULT WINAPI CoUnmarshalInterface(IStream *stream, REFIID riid, void **ppv)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define WideCharToMultiByte
#define MultiByteToWideChar
static ITS_IMonikerImpl * impl_from_IMoniker(IMoniker *iface)
static ITS_IParseDisplayNameImpl * impl_from_IParseDisplayName(IParseDisplayName *iface)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
UINT WINAPI GetSystemDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
LCID WINAPI GetThreadLocale(void)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
HRESULT WINAPI GetRunningObjectTable(DWORD reserved, IRunningObjectTable **ret)
HRESULT WINAPI MkParseDisplayName(LPBC pbc, LPCOLESTR szDisplayName, LPDWORD pchEaten, LPMONIKER *ppmk)
static MonikerMarshal * impl_from_IUnknown(IUnknown *iface)
static RunningObjectTableImpl rot
HRESULT WINAPI StgCreateStorageEx(const WCHAR *pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS *pStgOptions, void *reserved, REFIID riid, void **ppObjectOpen)
HRESULT WINAPI CreateFileMoniker(LPCOLESTR lpszPathName, IMoniker **ppmk)
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLsizei GLsizei * length
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 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
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
#define WC_NO_BEST_FIT_CHARS
static ERESOURCE GlobalLock
HRESULT WINAPI CreateItemMoniker(const WCHAR *delimiter, const WCHAR *name, IMoniker **ret)
void *WINAPI CoTaskMemAlloc(SIZE_T size)
void WINAPI CoTaskMemFree(void *ptr)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
#define todo_wine_if(is_todo)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
#define memcpy(s1, s2, n)
static struct test_info tests[]
D3D11_SHADER_VARIABLE_DESC desc
static const CLSID CLSID_StdFont
static const WCHAR wszNonExistent[]
static HRESULT WINAPI Moniker_GetClassID(IMoniker *iface, CLSID *pClassID)
static void test_anti_moniker(void)
static struct test_factory * impl_from_IClassFactory(IClassFactory *iface)
static HRESULT WINAPI Moniker_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
static IMoniker * create_antimoniker(DWORD level)
static HRESULT WINAPI test_factory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **obj)
static ULONG WINAPI pointer_moniker_obj_Release(IUnknown *iface)
static const BYTE expected_gc_moniker_saved_data[]
static HRESULT WINAPI Moniker_GetSizeMax(IMoniker *iface, ULARGE_INTEGER *pcbSize)
static void test_ROT(void)
static ULONG WINAPI test_moniker_parse_AddRef(IParseDisplayName *iface)
static IROTDataVtbl ROTDataVtbl
static void test_file_monikers(void)
static void test_ROT_multiple_entries(void)
static void test_pointer_moniker(void)
static HRESULT WINAPI Moniker_Inverse(IMoniker *iface, IMoniker **ppmk)
static const BYTE expected_class_moniker_comparison_data[]
static void test_item_moniker(void)
static ULONG WINAPI test_factory_Release(IClassFactory *iface)
static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOOL supported)
static void test_file_moniker(WCHAR *path)
static HRESULT WINAPI ParseDisplayName_ParseDisplayName(IParseDisplayName *iface, IBindCtx *pbc, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
#define TEST_MONIKER_TYPE(m, t)
static const BYTE expected_item_moniker_saved_data2[]
static const BYTE expected_item_moniker_saved_data3[]
static void check_expected_method_(unsigned int line, const char *method_name)
static const BYTE expected_gc_moniker_comparison_data[]
static HRESULT WINAPI Moniker_Hash(IMoniker *iface, DWORD *pdwHash)
static ULONG WINAPI ExternalConnection_Release(IExternalConnection *iface)
#define ok_ole_success(hr, func)
static HRESULT WINAPI Moniker_IsSystemMoniker(IMoniker *iface, DWORD *pwdMksys)
static ULONG WINAPI ParseDisplayName_Release(IParseDisplayName *iface)
static void _test_moniker_name(IMoniker *moniker, const WCHAR *name, int line)
static HRESULT WINAPI ROTData_GetComparisonData(IROTData *iface, BYTE *pbData, ULONG cbMax, ULONG *pcbData)
static const BYTE expected_item_moniker_comparison_data[]
static HRESULT WINAPI Moniker_ComposeWith(IMoniker *iface, IMoniker *pmkRight, BOOL fOnlyIfNotGeneric, IMoniker **ppmkComposite)
static HRESULT WINAPI Moniker_BindToObject(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, void **obj)
static char const *const * expected_method_list
static HRESULT WINAPI test_item_container_GetObject(IOleItemContainer *iface, LPOLESTR item, DWORD bind_speed, IBindCtx *pbc, REFIID riid, void **obj)
static HRESULT WINAPI Moniker_Load(IMoniker *iface, IStream *pStm)
static struct test_moniker * impl_from_IOleItemContainer(IOleItemContainer *iface)
static HRESULT WINAPI Moniker_GetTimeOfLastChange(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, FILETIME *pFileTime)
static void test_bind_context(void)
static ULONG WINAPI ROTData_Release(IROTData *iface)
static const IParseDisplayNameVtbl test_moniker_parse_vtbl
static HRESULT WINAPI Moniker_GetDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR *ppszDisplayName)
static ULONG WINAPI HeapUnknown_AddRef(IUnknown *iface)
static HRESULT WINAPI test_item_container_GetObjectStorage(IOleItemContainer *iface, LPOLESTR item, IBindCtx *pbc, REFIID riid, void **obj)
static const BYTE expected_anti_moniker_saved_data2[]
#define CHECK_EXPECTED_METHOD(method_name)
static HRESULT create_moniker_parse_desc(const char *desc, unsigned int *eaten, IMoniker **moniker)
static const BYTE expected_item_moniker_saved_data6[]
static ULONG WINAPI HeapUnknown_Release(IUnknown *iface)
static const WCHAR wszFileName1[]
static void test_objref_moniker(void)
static HRESULT WINAPI Moniker_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoniker)
static void test_generic_composite_moniker(void)
static const BYTE expected_item_moniker_comparison_data5[]
static const IClassFactoryVtbl test_factory_vtbl
static const BYTE expected_item_moniker_saved_data4[]
static const IMonikerVtbl MonikerVtbl
static void test_MkParseDisplayName(void)
static SIZE_T round_global_size(SIZE_T size)
static const BYTE expected_item_moniker_comparison_data4[]
static HRESULT WINAPI test_item_container_ParseDisplayName(IOleItemContainer *iface, IBindCtx *pbc, LPOLESTR displayname, ULONG *eaten, IMoniker **out)
static HRESULT WINAPI Moniker_Save(IMoniker *iface, IStream *pStm, BOOL fClearDirty)
static const BYTE expected_anti_moniker_saved_data[]
static const BYTE expected_anti_moniker_marshal_data[]
static LPCWSTR expected_display_name
static const BYTE expected_item_moniker_saved_data5[]
static DWORD WINAPI ExternalConnection_ReleaseConnection(IExternalConnection *iface, DWORD extconn, DWORD reserved, BOOL fLastReleaseCloses)
static ULONG WINAPI ExternalConnection_AddRef(IExternalConnection *iface)
static const IParseDisplayNameVtbl ParseDisplayName_Vtbl
static HRESULT WINAPI ParseDisplayName_QueryInterface(IParseDisplayName *iface, REFIID riid, void **ppv)
static ULONG WINAPI test_item_container_Release(IOleItemContainer *iface)
static HRESULT WINAPI HeapUnknown_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
static const BYTE expected_class_moniker_saved_data[]
static void _test_moniker_type(IMoniker *moniker, DWORD type, BOOL todo, int line)
static HRESULT WINAPI Moniker_QueryInterface(IMoniker *iface, REFIID riid, void **ppvObject)
static const CLSID CLSID_TestMoniker
static HRESULT WINAPI pointer_moniker_obj_QueryInterface(IUnknown *iface, REFIID riid, void **obj)
static HRESULT WINAPI Moniker_BindToStorage(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, VOID **ppvObject)
static HRESULT WINAPI Moniker_IsDirty(IMoniker *iface)
static const BYTE expected_class_moniker_marshal_data[]
static HRESULT WINAPI test_item_container_QueryInterface(IOleItemContainer *iface, REFIID riid, void **obj)
static HRESULT WINAPI ROTData_QueryInterface(IROTData *iface, REFIID riid, VOID **ppvObject)
static HRESULT WINAPI Moniker_RelativePathTo(IMoniker *iface, IMoniker *pmOther, IMoniker **ppmkRelPath)
static HRESULT WINAPI Moniker_IsRunning(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, IMoniker *pmkNewlyRunning)
static const BYTE expected_anti_moniker_comparison_data2[]
static ULONG WINAPI test_moniker_parse_Release(IParseDisplayName *iface)
static const BYTE expected_item_moniker_marshal_data3[]
static HRESULT WINAPI Moniker_CommonPrefixWith(IMoniker *iface, IMoniker *pmkOther, IMoniker **ppmkPrefix)
static void test_MonikerCommonPrefixWith(void)
static const IOleItemContainerVtbl test_item_container_vtbl
static HRESULT WINAPI test_moniker_parse_ParseDisplayName(IParseDisplayName *iface, IBindCtx *pbc, LPOLESTR displayname, ULONG *eaten, IMoniker **out)
static ULONG WINAPI test_factory_AddRef(IClassFactory *iface)
static struct test_moniker * impl_from_IROTData(IROTData *iface)
static HRESULT WINAPI ExternalConnection_QueryInterface(IExternalConnection *iface, REFIID riid, void **ppv)
static HRESULT create_moniker_from_desc(const char *desc, IMoniker **moniker)
static ULONG WINAPI pointer_moniker_obj_AddRef(IUnknown *iface)
static HRESULT WINAPI test_factory_QueryInterface(IClassFactory *iface, REFIID riid, void **obj)
static const WCHAR expected_class_moniker_display_name[]
static IParseDisplayName ParseDisplayName
static const BYTE expected_item_moniker_marshal_data2[]
static void test_class_moniker(void)
static const BYTE expected_item_moniker_marshal_data[]
static const BYTE expected_item_moniker_saved_data[]
static const BYTE expected_anti_moniker_marshal_data2[]
#define check_interface(a, b, c)
static const WCHAR wszFileName2[]
static const BYTE expected_anti_moniker_comparison_data[]
static HRESULT WINAPI test_item_container_EnumObjects(IOleItemContainer *iface, DWORD flags, IEnumUnknown **ppenum)
static const BYTE expected_item_moniker_comparison_data2[]
static HRESULT WINAPI test_item_container_LockContainer(IOleItemContainer *iface, BOOL lock)
static HRESULT WINAPI test_moniker_parse_QueryInterface(IParseDisplayName *iface, REFIID riid, void **obj)
static ULONG WINAPI Moniker_AddRef(IMoniker *iface)
static struct test_factory * impl_from_IExternalConnection(IExternalConnection *iface)
static const BYTE expected_gc_moniker_marshal_data[]
static HRESULT WINAPI test_factory_LockServer(IClassFactory *iface, BOOL lock)
#define TEST_DISPLAY_NAME(m, name)
static HRESULT WINAPI Moniker_Enum(IMoniker *iface, BOOL fForward, IEnumMoniker **ppenumMoniker)
static const IUnknownVtbl pointer_moniker_obj_vtbl
static HRESULT WINAPI test_item_container_IsRunning(IOleItemContainer *iface, LPOLESTR item)
static DWORD WINAPI ExternalConnection_AddConnection(IExternalConnection *iface, DWORD extconn, DWORD reserved)
static void test_save_load_filemoniker(void)
static ULONG WINAPI ROTData_AddRef(IROTData *iface)
static ULONG WINAPI Moniker_Release(IMoniker *iface)
static const BYTE expected_item_moniker_comparison_data6[]
static const LARGE_INTEGER llZero
static const IExternalConnectionVtbl ExternalConnectionVtbl
static const IUnknownVtbl HeapUnknown_Vtbl
static struct test_moniker * create_test_moniker(void)
static void test_factory_init(struct test_factory *factory)
static ULONG WINAPI test_item_container_AddRef(IOleItemContainer *iface)
static int count_moniker_matches(IBindCtx *pbc, IEnumMoniker *spEM)
static HRESULT WINAPI Moniker_ParseDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
static const BYTE expected_item_moniker_marshal_data5[]
static ULONG WINAPI ParseDisplayName_AddRef(IParseDisplayName *iface)
static const BYTE expected_item_moniker_marshal_data6[]
static const BYTE expected_item_moniker_marshal_data4[]
static void stream_write_dword(IStream *stream, DWORD value)
static const WCHAR wszEmpty[]
#define STGM_SHARE_EXCLUSIVE
#define STGM_SHARE_DENY_WRITE
@ COINIT_APARTMENTTHREADED
interface IMoniker * LPMONIKER
interface IBindCtx * LPBC
HRESULT WINAPI CreateBindCtx(DWORD reserved, IBindCtx **bind_context)
const GUID IID_IOleContainer
const GUID IID_IParseDisplayName
const GUID IID_IOleItemContainer
HRESULT WINAPI CreatePointerMoniker(IUnknown *object, IMoniker **ret)
HRESULT WINAPI CreateObjrefMoniker(IUnknown *obj, IMoniker **ret)
const GUID IID_IPersistStream
#define IsEqualGUID(rguid1, rguid2)
#define DEFINE_OLEGUID(name, l, w1, w2)
#define IsEqualIID(riid1, riid2)
_In_ _Out_writes_opt_ pcchValueName _Inout_opt_ LPDWORD _Out_opt_ _Out_writes_bytes_to_opt_ pcbData _Inout_opt_ LPDWORD pcbData
static __inline const char * wine_dbgstr_guid(const GUID *id)
IClassFactory IClassFactory_iface
unsigned int external_connections
IClassFactory IClassFactory_iface
IExternalConnection IExternalConnection_iface
IOleItemContainer IOleItemContainer_iface
IParseDisplayName IParseDisplayName_iface
Character const *const prefix
#define CONTAINING_RECORD(address, type, field)
static const WCHAR wszFile[]
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
#define MK_S_REDUCED_TO_SELF
#define CO_E_WRONG_SERVER_IDENTITY
#define STG_E_INVALIDFLAG
#define MK_S_MONIKERALREADYREGISTERED