37#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks)
38#define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %d\n", cLocks)
39#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr)
41#define CHECK_EXPECTED_METHOD(method_name) \
43 trace("%s\n", method_name); \
44 ok(*expected_method_list != NULL, "Extra method %s called\n", method_name); \
45 if (*expected_method_list) \
47 ok(!strcmp(*expected_method_list, method_name), "Expected %s to be called instead of %s\n", \
48 *expected_method_list, method_name); \
49 expected_method_list++; \
54static const WCHAR wszFileName1[] = {
'c',
':',
'\\',
'w',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
't',
'e',
's',
't',
'1',
'.',
'd',
'o',
'c',0};
55static const WCHAR wszFileName2[] = {
'c',
':',
'\\',
'w',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
't',
'e',
's',
't',
'2',
'.',
'd',
'o',
'c',0};
62 {0xb9, 0x3e, 0x2f, 0xf9, 0xc8, 0x32, 0x23, 0xd7}
79 static SIZE_T global_size_alignment = -1;
80 if (global_size_alignment == -1)
87 return ((
size + global_size_alignment - 1) & ~(global_size_alignment - 1));
94 ok(0,
"unexpected call\n");
111 trace(
"add connection\n");
113 ok(extconn == EXTCONN_STRONG,
"extconn = %d\n", extconn);
121 trace(
"release connection\n");
123 ok(extconn == EXTCONN_STRONG,
"extconn = %d\n", extconn);
140 LPCLASSFACTORY iface,
150 IClassFactory_AddRef(iface);
176 LPCLASSFACTORY iface,
185 LPCLASSFACTORY iface,
217 IUnknown_AddRef(iface);
265 IMoniker_AddRef(iface);
343 if (ppmkReduced==
NULL)
346 IMoniker_AddRef(iface);
366 if (ppenumMoniker ==
NULL)
369 *ppenumMoniker =
NULL;
429 static const WCHAR wszDisplayName[] = {
'*',
'*',
'G',
'e',
'm',
'm',
'a',0};
432 memcpy(*ppszDisplayName, wszDisplayName,
sizeof(wszDisplayName));
452 (*pwdMksys)=MKSYS_NONE;
553 IMoniker_AddRef(iface);
590 '1',
'9',
'0',
'3',
'-',
'4',
'A',
'A',
'E',
'-',
'B',
'1',
'A',
'F',
'-',
591 '2',
'0',
'4',
'6',
'E',
'5',
'8',
'6',
'C',
'9',
'2',
'5',0};
596 static const char *methods_register_no_ROTData[] =
599 "Moniker_GetTimeOfLastChange",
600 "Moniker_QueryInterface(IID_IROTData)",
601 "Moniker_GetDisplayName",
602 "Moniker_GetClassID",
605 static const char *methods_register[] =
608 "Moniker_GetTimeOfLastChange",
609 "Moniker_QueryInterface(IID_IROTData)",
610 "ROTData_GetComparisonData",
613 static const char *methods_isrunning_no_ROTData[] =
616 "Moniker_QueryInterface(IID_IROTData)",
617 "Moniker_GetDisplayName",
618 "Moniker_GetClassID",
621 static const char *methods_isrunning[] =
624 "Moniker_QueryInterface(IID_IROTData)",
625 "ROTData_GetComparisonData",
637 hr = IRunningObjectTable_Register(pROT, ROTFLAGS_REGISTRATIONKEEPSALIVE,
650 hr = IRunningObjectTable_Revoke(pROT, dwCookie);
658 hr = IRunningObjectTable_Register(pROT, ROTFLAGS_REGISTRATIONKEEPSALIVE,
666 hr = IRunningObjectTable_IsRunning(pROT, &
Moniker);
670 hr = IRunningObjectTable_Revoke(pROT, dwCookie);
681 pMoniker, &dwCookie);
687 hr = IRunningObjectTable_Revoke(pROT, dwCookie);
693 hr = IRunningObjectTable_Register(pROT, ROTFLAGS_REGISTRATIONKEEPSALIVE,
699 hr = IRunningObjectTable_Revoke(pROT, dwCookie);
707 hr = IRunningObjectTable_Register(pROT,
708 ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT,
713 "IRunningObjectTable_Register should have returned CO_E_WRONG_SERVER_IDENTITY instead of 0x%08x\n",
hr);
715 if (
hr ==
S_OK) IRunningObjectTable_Revoke(pROT, dwCookie);
717 hr = IRunningObjectTable_Register(pROT, 0xdeadbeef,
719 ok(
hr ==
E_INVALIDARG,
"IRunningObjectTable_Register should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
721 IMoniker_Release(pMoniker);
723 IRunningObjectTable_Release(pROT);
731 DWORD dwCookie1, dwCookie2;
733 static const WCHAR moniker_path[] =
734 {
'\\',
'w',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
's',
'y',
's',
't',
'e',
'm',
'\\',
't',
'e',
's',
't',
'1',
'.',
'd',
'o',
'c',0};
748 ok(dwCookie1 != dwCookie2,
"cookie returned for registering duplicate object shouldn't match cookie of original object (0x%x)\n", dwCookie1);
750 hr = IRunningObjectTable_GetObject(pROT, pMoniker, &
pObject);
754 hr = IRunningObjectTable_Revoke(pROT, dwCookie1);
757 hr = IRunningObjectTable_GetObject(pROT, pMoniker, &
pObject);
761 hr = IRunningObjectTable_Revoke(pROT, dwCookie2);
764 IMoniker_Release(pMoniker);
766 IRunningObjectTable_Release(pROT);
775 IParseDisplayName_AddRef(iface);
800 char display_nameA[256];
803 ok(pszDisplayName ==
expected_display_name,
"pszDisplayName should be the same pointer as passed into MkParseDisplayName\n");
804 *pchEaten =
lstrlenW(pszDisplayName);
821 int monCnt=0, matchCnt=0;
823 while ((IEnumMoniker_Next(spEM, 1, &spMoniker,
NULL)==
S_OK))
828 hr=IMoniker_GetDisplayName(spMoniker, pbc,
NULL, &szDisplayn);
836 trace(
"Total number of monikers is %i\n", monCnt);
864 static const WCHAR wszDisplayName[] = {
'c',
'l',
's',
'i',
'd',
':',
865 '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};
866 static const WCHAR wszDisplayNameClsid[] = {
'c',
'l',
's',
'i',
'd',
':',0};
867 static const WCHAR wszNonExistentProgId[] = {
'N',
'o',
'n',
'E',
'x',
'i',
's',
't',
'e',
'n',
't',
'P',
'r',
'o',
'g',
'I',
'd',
':',0};
868 static const WCHAR wszDisplayNameRunning[] = {
'W',
'i',
'n',
'e',
'T',
'e',
's',
't',
'R',
'u',
'n',
'n',
'i',
'n',
'g',0};
869 static const WCHAR wszDisplayNameProgId1[] = {
'S',
't',
'd',
'F',
'o',
'n',
't',
':',0};
870 static const WCHAR wszDisplayNameProgId2[] = {
'@',
'S',
't',
'd',
'F',
'o',
'n',
't',0};
871 static const WCHAR wszDisplayNameProgIdFail[] = {
'S',
't',
'd',
'F',
'o',
'n',
't',0};
873 char szDisplayNameFile[256];
874 WCHAR wszDisplayNameFile[256];
880 LPCOLESTR szDisplayName;
883 } invalid_parameters[] =
896 {&pbc,
NULL, &eaten, &pmk},
911 invalid_parameters[
i].szDisplayName,
912 invalid_parameters[
i].pchEaten,
913 invalid_parameters[
i].ppmk);
914 ok(
hr ==
E_INVALIDARG,
"[%d] MkParseDisplayName should have failed with E_INVALIDARG instead of 0x%08x\n",
i,
hr);
915 ok(eaten == 0xdeadbeef,
"[%d] Processed character count should have been 0xdeadbeef instead of %u\n",
i, eaten);
916 ok(pmk == (
IMoniker *)0xdeadbeef,
"[%d] Output moniker pointer should have been 0xdeadbeef instead of %p\n",
i, pmk);
923 "MkParseDisplayName should have failed with MK_E_SYNTAX or MK_E_CANTOPENFILE instead of 0x%08x\n",
hr);
924 ok(eaten == 0,
"Processed character count should have been 0 instead of %u\n", eaten);
925 ok(pmk ==
NULL,
"Output moniker pointer should have been NULL instead of %p\n", pmk);
933 "MkParseDisplayName should have failed with MK_E_SYNTAX or MK_E_CANTOPENFILE instead of 0x%08x\n",
hr);
934 ok(eaten == 0,
"Processed character count should have been 0 instead of %u\n", eaten);
935 ok(pmk ==
NULL,
"Output moniker pointer should have been NULL instead of %p\n", pmk);
940 hr = IBindCtx_GetRunningObjectTable(pbc, &pprot);
944 IMoniker_Release(pmk);
949 "Processed character count should have been 43 instead of %u\n", eaten);
952 IMoniker_IsSystemMoniker(pmk, &moniker_type);
953 ok(moniker_type == MKSYS_CLASSMONIKER,
"moniker_type was %d instead of MKSYS_CLASSMONIKER\n", moniker_type);
954 IMoniker_Release(pmk);
956 hr = IRunningObjectTable_Revoke(pprot, pdwReg1);
958 IRunningObjectTable_Release(pprot);
962 hr = IBindCtx_GetRunningObjectTable(pbc, &pprot);
966 IMoniker_Release(pmk);
971 "Processed character count should have been 15 instead of %u\n", eaten);
974 IMoniker_IsSystemMoniker(pmk, &moniker_type);
975 ok(moniker_type == MKSYS_FILEMONIKER,
"moniker_type was %d instead of MKSYS_FILEMONIKER\n", moniker_type);
976 IMoniker_Release(pmk);
978 hr = IRunningObjectTable_Revoke(pprot, pdwReg1);
980 IRunningObjectTable_Release(pprot);
989 "Processed character count should have been 8 instead of %u\n", eaten);
992 IMoniker_IsSystemMoniker(pmk, &moniker_type);
993 ok(moniker_type == MKSYS_ANTIMONIKER,
"moniker_type was %d instead of MKSYS_ANTIMONIKER\n", moniker_type);
994 IMoniker_Release(pmk);
1001 "Processed character count should have been 8 instead of %u\n", eaten);
1004 IMoniker_IsSystemMoniker(pmk, &moniker_type);
1005 ok(moniker_type == MKSYS_ANTIMONIKER,
"moniker_type was %d instead of MKSYS_ANTIMONIKER\n", moniker_type);
1006 IMoniker_Release(pmk);
1013 "MkParseDisplayName with ProgId without marker should fail with MK_E_SYNTAX or MK_E_CANTOPENFILE instead of 0x%08x\n",
hr);
1014 ok(eaten == 0,
"Processed character count should have been 0 instead of %u\n", eaten);
1015 ok(pmk ==
NULL,
"Output moniker pointer should have been NULL instead of %p\n", pmk);
1021 strcat(szDisplayNameFile,
"\\kernel32.dll");
1026 ok(eaten ==
len - 1,
"Processed character count should have been %d instead of %u\n",
len - 1, eaten);
1029 IMoniker_IsSystemMoniker(pmk, &moniker_type);
1030 ok(moniker_type == MKSYS_FILEMONIKER,
"moniker_type was %d instead of MKSYS_FILEMONIKER\n", moniker_type);
1031 IMoniker_Release(pmk);
1037 "Processed character count should have been 43 instead of %u\n", eaten);
1045 IUnknown_Release(
object);
1046 IMoniker_Release(pmk);
1048 IBindCtx_Release(pbc);
1055 ok(
hr==0,
"CreateFileMoniker for file hr=%08x\n",
hr);
1057 ok(
hr==0,
"CreateFileMoniker for file hr=%08x\n",
hr);
1058 hr = IBindCtx_GetRunningObjectTable(pbc, &pprot);
1059 ok(
hr==0,
"IBindCtx_GetRunningObjectTable hr=%08x\n",
hr);
1062 hr = IRunningObjectTable_EnumRunning(pprot, &spEM1);
1063 ok(
hr==0,
"IRunningObjectTable_EnumRunning hr=%08x\n",
hr);
1064 hr = IEnumMoniker_QueryInterface(spEM1, &
IID_IUnknown, (
void*) &lpEM1);
1066 ok(
hr==0,
"IEnumMoniker_QueryInterface hr %08x %p\n",
hr, lpEM1);
1069 trace(
"Number of matches is %i\n", matchCnt);
1071 grflags= grflags | ROTFLAGS_REGISTRATIONKEEPSALIVE;
1072 hr = IRunningObjectTable_Register(pprot, grflags, lpEM1, pmk1, &pdwReg1);
1073 ok(
hr==0,
"IRunningObjectTable_Register hr=%08x %p %08x %p %p %d\n",
1074 hr, pprot, grflags, lpEM1, pmk1, pdwReg1);
1076 trace(
"IROT::Register\n");
1078 grflags= grflags | ROTFLAGS_REGISTRATIONKEEPSALIVE;
1079 hr = IRunningObjectTable_Register(pprot, grflags, lpEM1, pmk2, &pdwReg2);
1080 ok(
hr==0,
"IRunningObjectTable_Register hr=%08x %p %08x %p %p %d\n",
hr,
1081 pprot, grflags, lpEM1, pmk2, pdwReg2);
1083 hr = IRunningObjectTable_EnumRunning(pprot, &spEM2);
1084 ok(
hr==0,
"IRunningObjectTable_EnumRunning hr=%08x\n",
hr);
1087 ok(matchCnt==2,
"Number of matches should be equal to 2 not %i\n", matchCnt);
1089 trace(
"IEnumMoniker::Clone\n");
1090 IEnumMoniker_Clone(spEM2, &spEM3);
1093 ok(matchCnt==0,
"Number of matches should be equal to 0 not %i\n", matchCnt);
1094 trace(
"IEnumMoniker::Reset\n");
1095 IEnumMoniker_Reset(spEM3);
1098 ok(matchCnt==2,
"Number of matches should be equal to 2 not %i\n", matchCnt);
1100 IRunningObjectTable_Revoke(pprot,pdwReg1);
1101 IRunningObjectTable_Revoke(pprot,pdwReg2);
1102 IUnknown_Release(lpEM1);
1103 IEnumMoniker_Release(spEM1);
1104 IEnumMoniker_Release(spEM2);
1105 IEnumMoniker_Release(spEM3);
1106 IMoniker_Release(pmk1);
1107 IMoniker_Release(pmk2);
1108 IRunningObjectTable_Release(pprot);
1110 IBindCtx_Release(pbc);
1117 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1118 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1119 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1120 0x1a,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1121 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1122 0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
1123 0x05,0xe0,0x02,0x00,0x00,0x00,0x00,0x00,
1124 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1125 0x00,0x00,0x00,0x00,
1130 0x05,0xe0,0x02,0x00,0x00,0x00,0x00,0x00,
1131 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1132 0x00,0x00,0x00,0x00,
1137 0x1a,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1138 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1139 0x05,0xe0,0x02,0x00,0x00,0x00,0x00,0x00,
1140 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1145 'c',
'l',
's',
'i',
'd',
':',
'0',
'0',
'0',
'2',
'E',
'0',
'0',
'5',
'-',
'0',
'0',
'0',
1146 '0',
'-',
'0',
'0',
'0',
'0',
'-',
'C',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'0',
'0',
1147 '0',
'0',
'0',
'0',
'4',
'6',
':',0
1152 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1153 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1154 0x21,0x00,0x54,0x00,0x45,0x00,0x53,0x00,
1155 0x54,0x00,0x00,0x00,
1160 0x02,0x00,0x00,0x00,0x21,0x00,0x05,0x00,
1161 0x00,0x00,0x54,0x65,0x73,0x74,0x00,
1166 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1167 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1168 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1169 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1170 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1171 0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
1172 0x02,0x00,0x00,0x00,0x21,0x00,0x05,0x00,
1173 0x00,0x00,0x54,0x65,0x73,0x74,0x00,
1178 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1179 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1180 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1181 0x05,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1182 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1183 0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
1184 0x01,0x00,0x00,0x00,
1189 0x01,0x00,0x00,0x00,
1194 0x05,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1195 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1196 0x01,0x00,0x00,0x00,
1201 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1202 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1203 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1204 0x09,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1205 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1206 0x00,0x00,0x00,0x00,0x2c,0x01,0x00,0x00,
1207 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
1208 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1209 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1210 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1211 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1212 0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
1213 0x02,0x00,0x00,0x00,0x21,0x00,0x05,0x00,
1214 0x00,0x00,0x54,0x65,0x73,0x74,0x00,0x4d,
1215 0x45,0x4f,0x57,0x04,0x00,0x00,0x00,0x0f,
1216 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
1217 0x00,0x00,0x00,0x00,0x00,0x00,0x46,0x04,
1218 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
1219 0x00,0x00,0x00,0x00,0x00,0x00,0x46,0x00,
1220 0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x02,
1221 0x00,0x00,0x00,0x23,0x00,0x05,0x00,0x00,
1222 0x00,0x57,0x69,0x6e,0x65,0x00,
1227 0x02,0x00,0x00,0x00,0x04,0x03,0x00,0x00,
1228 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,
1229 0x00,0x00,0x00,0x46,0x02,0x00,0x00,0x00,
1230 0x21,0x00,0x05,0x00,0x00,0x00,0x54,0x65,
1231 0x73,0x74,0x00,0x04,0x03,0x00,0x00,0x00,
1232 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,
1233 0x00,0x00,0x46,0x02,0x00,0x00,0x00,0x23,
1234 0x00,0x05,0x00,0x00,0x00,0x57,0x69,0x6e,
1240 0x09,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1241 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1242 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
1243 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
1244 0x21,0x00,0x54,0x00,0x45,0x00,0x53,0x00,
1245 0x54,0x00,0x00,0x00,0x04,0x03,0x00,0x00,
1246 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,
1247 0x00,0x00,0x00,0x46,0x23,0x00,0x57,0x00,
1248 0x49,0x00,0x4e,0x00,0x45,0x00,0x00,0x00,
1253 const BYTE *expected_moniker_marshal_data,
unsigned int sizeof_expected_moniker_marshal_data,
1254 const BYTE *expected_moniker_saved_data,
unsigned int sizeof_expected_moniker_saved_data,
1255 const BYTE *expected_moniker_comparison_data,
unsigned int sizeof_expected_moniker_comparison_data,
1272 ok(
hr ==
S_FALSE,
"%s: IMoniker_IsDirty should return S_FALSE, not 0x%08x\n", testname,
hr);
1279 hr = IMoniker_GetDisplayName(
moniker, bindctx,
NULL, &display_name);
1284 IBindCtx_Release(bindctx);
1287 ok(
hr ==
S_FALSE,
"%s: IMoniker_IsDirty should return S_FALSE, not 0x%08x\n", testname,
hr);
1291 hr = IMoniker_QueryInterface(
moniker, &IID_IROTData, (
void **)&rotdata);
1294 hr = IROTData_GetComparisonData(rotdata,
buffer,
sizeof(
buffer), &moniker_size);
1297 if (
hr !=
S_OK) moniker_size = 0;
1300 ok(moniker_size == sizeof_expected_moniker_comparison_data,
1301 "%s: Size of comparison data differs (expected %d, actual %d)\n",
1302 testname, sizeof_expected_moniker_comparison_data, moniker_size);
1306 for (
i = 0;
i <
min(moniker_size, sizeof_expected_moniker_comparison_data);
i++)
1308 if (expected_moniker_comparison_data[
i] !=
buffer[
i])
1315 ok(same,
"%s: Comparison data differs\n", testname);
1318 for (
i = 0;
i < moniker_size;
i++)
1327 IROTData_Release(rotdata);
1346 "%s: Size of saved data differs (expected %d, actual %d)\n",
1353 if (expected_moniker_saved_data[
i] != moniker_data[
i])
1360 ok(same,
"%s: Saved data differs\n", testname);
1363 for (
i = 0;
i < moniker_size;
i++)
1366 printf(
"0x%02x,", moniker_data[
i]);
1393 "%s: Size of marshaled data differs (expected %d, actual %d)\n",
1398 if (expected_moniker_marshal_data)
1402 if (expected_moniker_marshal_data[
i] != moniker_data[
i])
1410 ok(same,
"%s: Marshaled data differs\n", testname);
1413 for (
i = 0;
i < moniker_size;
i++)
1416 printf(
"0x%02x,", moniker_data[
i]);
1429 IMoniker_Release(moniker_proxy);
1458 ok(
hash == CLSID_StdComponentCategoriesMgr.Data1,
1459 "Hash value != Data1 field of clsid, instead was 0x%08x\n",
1464 hr = IMoniker_IsSystemMoniker(
moniker, &moniker_type);
1467 ok(moniker_type == MKSYS_CLASSMONIKER,
1468 "dwMkSys != MKSYS_CLASSMONIKER, instead was 0x%08x\n",
1476 ok(
hr ==
E_NOTIMPL,
"IMoniker_IsRunning should return E_NOTIMPL, not 0x%08x\n",
hr);
1479 ok(
hr ==
E_NOTIMPL,
"IMoniker_IsRunning should return E_NOTIMPL, not 0x%08x\n",
hr);
1482 ok(
hr ==
MK_E_UNAVAILABLE,
"IMoniker_GetTimeOfLastChange should return MK_E_UNAVAILABLE, not 0x%08x\n",
hr);
1492 IBindCtx_Release(bindctx);
1494 hr = IMoniker_Inverse(
moniker, &inverse);
1496 IMoniker_Release(inverse);
1525 hr = IMoniker_IsEqual(moniker1, moniker2);
1530 IMoniker_Release(moniker1);
1532 IMoniker_Release(moniker2);
1538 {
'\\',
'w',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
's',
'y',
's',
't',
'e',
'm',
'\\',
't',
'e',
's',
't',
'1',
'.',
'd',
'o',
'c',0},
1539 {
'\\',
'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},
1541 {0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0},
1546 {0x20ac, 0x2020, 0x100, 0x101, 0x102, 0x103, 0x104, 0x105, 0x106, 0x107, 0x108, 0x109, 0x10a, 0x10b, 0x10c, 0},
1562 skip(
"string 2 doesn't round trip in codepage %u\n",
GetACP() );
1583 static const WCHAR wszDelimiter[] = {
'!',0};
1584 static const WCHAR wszObjectName[] = {
'T',
'e',
's',
't',0};
1602 "Hash value != 0x73c, instead was 0x%08x\n",
1607 hr = IMoniker_IsSystemMoniker(
moniker, &moniker_type);
1610 ok(moniker_type == MKSYS_ITEMMONIKER,
1611 "dwMkSys != MKSYS_ITEMMONIKER, instead was 0x%08x\n",
1619 ok(
hr ==
E_INVALIDARG,
"IMoniker_IsRunning should return E_INVALIDARG, not 0x%08x\n",
hr);
1622 ok(
hr ==
S_FALSE,
"IMoniker_IsRunning should return S_FALSE, not 0x%08x\n",
hr);
1625 ok(
hr ==
E_INVALIDARG,
"IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08x\n",
hr);
1628 ok(
hr ==
E_INVALIDARG,
"IMoniker_BindToObject should return E_INVALIDARG, not 0x%08x\n",
hr);
1630 IBindCtx_Release(bindctx);
1632 hr = IMoniker_Inverse(
moniker, &inverse);
1634 IMoniker_Release(inverse);
1665 "Hash value != 0x80000001, instead was 0x%08x\n",
1669 hr = IMoniker_IsSystemMoniker(
moniker, &moniker_type);
1671 ok(moniker_type == MKSYS_ANTIMONIKER,
1672 "dwMkSys != MKSYS_ANTIMONIKER, instead was 0x%08x\n",
1675 hr = IMoniker_Inverse(
moniker, &inverse);
1676 ok(
hr ==
MK_E_NOINVERSE,
"IMoniker_Inverse should have returned MK_E_NOINVERSE instead of 0x%08x\n",
hr);
1677 ok(inverse ==
NULL,
"inverse should have been set to NULL instead of %p\n", inverse);
1684 ok(
hr ==
S_FALSE,
"IMoniker_IsRunning should return S_FALSE, not 0x%08x\n",
hr);
1687 ok(
hr ==
E_NOTIMPL,
"IMoniker_GetTimeOfLastChange should return E_NOTIMPL, not 0x%08x\n",
hr);
1690 ok(
hr ==
E_NOTIMPL,
"IMoniker_BindToObject should return E_NOTIMPL, not 0x%08x\n",
hr);
1693 ok(
hr ==
E_NOTIMPL,
"IMoniker_BindToStorage should return E_NOTIMPL, not 0x%08x\n",
hr);
1695 IBindCtx_Release(bindctx);
1712 static const WCHAR wszDelimiter1[] = {
'!',0};
1713 static const WCHAR wszObjectName1[] = {
'T',
'e',
's',
't',0};
1714 static const WCHAR wszDelimiter2[] = {
'#',0};
1715 static const WCHAR wszObjectName2[] = {
'W',
'i',
'n',
'e',0};
1716 static const WCHAR expected_display_name[] = {
'!',
'T',
'e',
's',
't',
'#',
'W',
'i',
'n',
'e',0 };
1737 "Hash value != 0xd87, instead was 0x%08x\n",
1742 hr = IMoniker_IsSystemMoniker(
moniker, &moniker_type);
1745 ok(moniker_type == MKSYS_GENERICCOMPOSITE,
1746 "dwMkSys != MKSYS_GENERICCOMPOSITE, instead was 0x%08x\n",
1754 ok(
hr ==
E_INVALIDARG,
"IMoniker_IsRunning should return E_INVALIDARG, not 0x%08x\n",
hr);
1758 ok(
hr ==
S_FALSE,
"IMoniker_IsRunning should return S_FALSE, not 0x%08x\n",
hr);
1761 ok(
hr ==
MK_E_NOTBINDABLE,
"IMoniker_GetTimeOfLastChange should return MK_E_NOTBINDABLE, not 0x%08x\n",
hr);
1765 ok(
hr ==
E_INVALIDARG,
"IMoniker_BindToObject should return E_INVALIDARG, not 0x%08x\n",
hr);
1768 ok(
hr ==
E_INVALIDARG,
"IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08x\n",
hr);
1770 IBindCtx_Release(bindctx);
1772 hr = IMoniker_Inverse(
moniker, &inverse);
1774 IMoniker_Release(inverse);
1796 ok(
hr ==
E_INVALIDARG,
"CreatePointerMoniker(x, NULL) should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
1809 hr = IMoniker_GetDisplayName(
moniker, bindctx,
NULL, &display_name);
1810 ok(
hr ==
E_NOTIMPL,
"IMoniker_GetDisplayName should have returned E_NOTIMPL instead of 0x%08x\n",
hr);
1812 IBindCtx_Release(bindctx);
1815 ok(
hr ==
S_FALSE,
"IMoniker_IsDirty should return S_FALSE, not 0x%08x\n",
hr);
1819 hr = IMoniker_QueryInterface(
moniker, &IID_IROTData, (
void **)&rotdata);
1820 ok(
hr ==
E_NOINTERFACE,
"IMoniker_QueryInterface(IID_IROTData) should have returned E_NOINTERFACE instead of 0x%08x\n",
hr);
1828 ok(
hr ==
E_NOTIMPL,
"IMoniker_Save should have returned E_NOTIMPL instead of 0x%08x\n",
hr);
1836 "Hash value should have been 0x%08x, instead of 0x%08x\n",
1840 hr = IMoniker_IsSystemMoniker(
moniker, &moniker_type);
1842 ok(moniker_type == MKSYS_POINTERMONIKER,
1843 "dwMkSys != MKSYS_POINTERMONIKER, instead was 0x%08x\n",
1846 hr = IMoniker_Inverse(
moniker, &inverse);
1848 IMoniker_Release(inverse);
1855 ok(
hr ==
S_OK,
"IMoniker_IsRunning should return S_OK, not 0x%08x\n",
hr);
1858 ok(
hr ==
E_NOTIMPL,
"IMoniker_GetTimeOfLastChange should return E_NOTIMPL, not 0x%08x\n",
hr);
1876 ok(
hr ==
E_UNEXPECTED,
"IMoniker_BindToObject should have returned E_UNEXPECTED instead of 0x%08x\n",
hr);
1879 ok(
hr ==
E_UNEXPECTED,
"IMoniker_BindToStorage should have returned E_UNEXPECTED instead of 0x%08x\n",
hr);
1881 IBindCtx_Release(bindctx);
1891 BIND_OPTS2 bind_opts;
1896 static const WCHAR wszParamName[] = {
'G',
'e',
'm',
'm',
'a',0};
1897 static const WCHAR wszNonExistent[] = {
'N',
'o',
'n',
'E',
'x',
'i',
's',
't',
'e',
'n',
't',0};
1900 ok(
hr ==
E_INVALIDARG,
"CreateBindCtx with NULL ppbc should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
1903 ok(
hr ==
E_INVALIDARG,
"CreateBindCtx with reserved value non-zero should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
1908 bind_opts.cbStruct = -1;
1909 hr = IBindCtx_GetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts);
1911 ok(bind_opts.cbStruct ==
sizeof(bind_opts) ||
1912 bind_opts.cbStruct ==
sizeof(bind_opts) +
sizeof(
void*),
1913 "bind_opts.cbStruct was %d\n", bind_opts.cbStruct);
1915 bind_opts.cbStruct =
sizeof(BIND_OPTS);
1916 hr = IBindCtx_GetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts);
1918 ok(bind_opts.cbStruct ==
sizeof(BIND_OPTS),
"bind_opts.cbStruct was %d\n", bind_opts.cbStruct);
1920 bind_opts.cbStruct =
sizeof(bind_opts);
1921 hr = IBindCtx_GetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts);
1923 ok(bind_opts.cbStruct ==
sizeof(bind_opts),
"bind_opts.cbStruct was %d\n", bind_opts.cbStruct);
1924 ok(bind_opts.grfFlags == 0,
"bind_opts.grfFlags was 0x%x instead of 0\n", bind_opts.grfFlags);
1925 ok(bind_opts.grfMode ==
STGM_READWRITE,
"bind_opts.grfMode was 0x%x instead of STGM_READWRITE\n", bind_opts.grfMode);
1926 ok(bind_opts.dwTickCountDeadline == 0,
"bind_opts.dwTickCountDeadline was %d instead of 0\n", bind_opts.dwTickCountDeadline);
1927 ok(bind_opts.dwTrackFlags == 0,
"bind_opts.dwTrackFlags was 0x%x instead of 0\n", bind_opts.dwTrackFlags);
1928 ok(bind_opts.dwClassContext == (CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER|CLSCTX_REMOTE_SERVER),
1929 "bind_opts.dwClassContext should have been 0x15 instead of 0x%x\n", bind_opts.dwClassContext);
1931 ok(bind_opts.pServerInfo ==
NULL,
"bind_opts.pServerInfo should have been NULL instead of %p\n", bind_opts.pServerInfo);
1933 bind_opts.cbStruct = -1;
1934 hr = IBindCtx_SetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts);
1935 ok(
hr ==
E_INVALIDARG,
"IBindCtx_SetBindOptions with bad cbStruct should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
1937 hr = IBindCtx_RegisterObjectParam(pBindCtx, (
WCHAR *)wszParamName,
NULL);
1938 ok(
hr ==
E_INVALIDARG,
"IBindCtx_RegisterObjectParam should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
1943 hr = IBindCtx_RegisterObjectParam(pBindCtx, (
WCHAR *)wszParamName, &
unknown->IUnknown_iface);
1946 hr = IBindCtx_GetObjectParam(pBindCtx, (
WCHAR *)wszParamName, ¶m_obj);
1948 IUnknown_Release(param_obj);
1951 ok(
hr ==
E_FAIL,
"IBindCtx_GetObjectParam with nonexistent key should have failed with E_FAIL instead of 0x%08x\n",
hr);
1952 ok(param_obj ==
NULL,
"IBindCtx_GetObjectParam with nonexistent key should have set output parameter to NULL instead of %p\n", param_obj);
1955 ok(
hr ==
E_FAIL,
"IBindCtx_RevokeObjectParam with nonexistent key should have failed with E_FAIL instead of 0x%08x\n",
hr);
1957 hr = IBindCtx_EnumObjectParam(pBindCtx, &pEnumString);
1958 ok(
hr ==
E_NOTIMPL,
"IBindCtx_EnumObjectParam should have returned E_NOTIMPL instead of 0x%08x\n",
hr);
1959 ok(!pEnumString,
"pEnumString should be NULL\n");
1961 hr = IBindCtx_RegisterObjectBound(pBindCtx,
NULL);
1964 hr = IBindCtx_RevokeObjectBound(pBindCtx,
NULL);
1965 ok(
hr ==
E_INVALIDARG,
"IBindCtx_RevokeObjectBound(NULL) should have return E_INVALIDARG instead of 0x%08x\n",
hr);
1977 ok(
hr ==
MK_E_NOTBOUND,
"IBindCtx_RevokeObjectBound with not bound object should have returned MK_E_NOTBOUND instead of 0x%08x\n",
hr);
1979 IBindCtx_Release(pBindCtx);
1981 refs = IUnknown_Release(&
unknown->IUnknown_iface);
1982 ok(!refs,
"object param should have been destroyed, instead of having %d refs\n", refs);
1985 ok(!refs,
"bound object should have been destroyed, instead of having %d refs\n", refs);
1995 DWORD some_val = 0xFEDCBA98;
2007 size.u.LowPart = 128;
2008 hr = IStream_SetSize(pStm,
size);
2015 hr = IMoniker_Save(pMk, pStm,
TRUE);
2017 IMoniker_Release(pMk);
2020 hr = IStream_Seek(pStm, zero_pos, STREAM_SEEK_SET,
NULL);
2022 hr = IStream_Write(pStm, &some_val,
sizeof(
WORD),
NULL);
2025 hr = IStream_Seek(pStm, dead_pos, STREAM_SEEK_SET,
NULL);
2027 hr = IStream_Write(pStm, &some_val,
sizeof(
WORD),
NULL);
2030 hr = IStream_Seek(pStm, nulls_pos, STREAM_SEEK_SET,
NULL);
2032 for(
i = 0;
i < 5; ++
i){
2033 hr = IStream_Write(pStm, &some_val,
sizeof(
DWORD),
NULL);
2038 hr = IStream_Seek(pStm, zero_pos, STREAM_SEEK_SET,
NULL);
2045 hr = IMoniker_Load(pMk, pStm);
2048 IMoniker_Release(pMk);
2049 IStream_Release(pStm);
2055 win_skip(
"skipping test on win9x\n");
char * strcat(char *DstString, const char *SrcString)
HRESULT WINAPI CreateAntiMoniker(IMoniker **ppmk)
#define InterlockedIncrement
#define InterlockedDecrement
static WCHAR wszFileName[MAX_PATH]
const GUID IID_IClassFactory
HRESULT WINAPI CreateClassMoniker(REFCLSID rclsid, IMoniker **ppmk)
HRESULT WINAPI CreateGenericComposite(IMoniker *pmkFirst, IMoniker *pmkRest, IMoniker **ppmkComposite)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
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)
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister)
HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject(DWORD dwRegister)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI GetHGlobalFromStream(IStream *pstm, HGLOBAL *phglobal)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI CoUnmarshalInterface(IStream *pStream, REFIID riid, LPVOID *ppv)
HRESULT WINAPI CoMarshalInterface(IStream *pStream, REFIID riid, IUnknown *pUnk, DWORD dwDestContext, void *pvDestContext, DWORD mshlFlags)
HRESULT WINAPI MkParseDisplayName(LPBC pbc, LPCOLESTR szDisplayName, LPDWORD pchEaten, LPMONIKER *ppmk)
HRESULT WINAPI GetRunningObjectTable(DWORD reserved, LPRUNNINGOBJECTTABLE *pprot)
static MonikerMarshal * impl_from_IUnknown(IUnknown *iface)
HRESULT WINAPI CreateFileMoniker(LPCOLESTR lpszPathName, IMoniker **ppmk)
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
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
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
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
HRESULT WINAPI CreateItemMoniker(LPCOLESTR lpszDelim, LPCOLESTR lpszItem, IMoniker **ppmk)
#define memcpy(s1, s2, n)
static const CLSID CLSID_StdFont
static const WCHAR wszNonExistent[]
static HRESULT WINAPI Moniker_GetClassID(IMoniker *iface, CLSID *pClassID)
#define ok_more_than_one_lock()
static void test_anti_moniker(void)
static HRESULT WINAPI Moniker_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
static DWORD external_connections
static IMoniker MonikerNoROTData
static const BYTE expected_gc_moniker_saved_data[]
static HRESULT WINAPI Moniker_GetSizeMax(IMoniker *iface, ULARGE_INTEGER *pcbSize)
static void test_ROT(void)
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 void test_file_moniker(WCHAR *path)
static HRESULT WINAPI ParseDisplayName_ParseDisplayName(IParseDisplayName *iface, IBindCtx *pbc, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
static const BYTE expected_gc_moniker_comparison_data[]
static HRESULT WINAPI Test_IClassFactory_QueryInterface(LPCLASSFACTORY iface, REFIID riid, LPVOID *ppvObj)
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 HRESULT WINAPI Moniker_BindToObject(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, VOID **ppvResult)
static HRESULT WINAPI ROTData_GetComparisonData(IROTData *iface, BYTE *pbData, ULONG cbMax, ULONG *pcbData)
static IClassFactory Test_ClassFactory
static const BYTE expected_item_moniker_comparison_data[]
static HRESULT WINAPI Moniker_ComposeWith(IMoniker *iface, IMoniker *pmkRight, BOOL fOnlyIfNotGeneric, IMoniker **ppmkComposite)
static char const *const * expected_method_list
static HRESULT WINAPI Moniker_Load(IMoniker *iface, IStream *pStm)
static HRESULT WINAPI Test_IClassFactory_LockServer(LPCLASSFACTORY iface, BOOL fLock)
static HRESULT WINAPI Test_IClassFactory_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj)
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 HRESULT WINAPI Moniker_GetDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR *ppszDisplayName)
static ULONG WINAPI HeapUnknown_AddRef(IUnknown *iface)
#define CHECK_EXPECTED_METHOD(method_name)
static ULONG WINAPI HeapUnknown_Release(IUnknown *iface)
static const WCHAR wszFileName1[]
static HRESULT WINAPI Moniker_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoniker)
static void test_generic_composite_moniker(void)
static const IMonikerVtbl MonikerNoROTDataVtbl
static const IMonikerVtbl MonikerVtbl
static void test_MkParseDisplayName(void)
static SIZE_T round_global_size(SIZE_T size)
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 IExternalConnection ExternalConnection
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 void UnlockModule(void)
static HRESULT WINAPI HeapUnknown_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
static const BYTE expected_class_moniker_saved_data[]
static ULONG WINAPI Test_IClassFactory_AddRef(LPCLASSFACTORY iface)
static HRESULT WINAPI Moniker_QueryInterface(IMoniker *iface, REFIID riid, void **ppvObject)
static const CLSID CLSID_TestMoniker
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 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 HRESULT WINAPI Moniker_CommonPrefixWith(IMoniker *iface, IMoniker *pmkOther, IMoniker **ppmkPrefix)
static HRESULT WINAPI ExternalConnection_QueryInterface(IExternalConnection *iface, REFIID riid, void **ppv)
static const WCHAR expected_class_moniker_display_name[]
static IParseDisplayName ParseDisplayName
static void test_class_moniker(void)
static const BYTE expected_item_moniker_marshal_data[]
static const BYTE expected_item_moniker_saved_data[]
static const WCHAR wszFileName2[]
static const BYTE expected_anti_moniker_comparison_data[]
static ULONG WINAPI Moniker_AddRef(IMoniker *iface)
static const IClassFactoryVtbl TestClassFactory_Vtbl
static const BYTE expected_gc_moniker_marshal_data[]
static void LockModule(void)
static HRESULT WINAPI Moniker_Enum(IMoniker *iface, BOOL fForward, IEnumMoniker **ppenumMoniker)
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 LARGE_INTEGER llZero
static const IExternalConnectionVtbl ExternalConnectionVtbl
static const IUnknownVtbl HeapUnknown_Vtbl
static HRESULT WINAPI MonikerNoROTData_QueryInterface(IMoniker *iface, REFIID riid, void **ppvObject)
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 ULONG WINAPI Test_IClassFactory_Release(LPCLASSFACTORY iface)
static ULONG WINAPI ParseDisplayName_AddRef(IParseDisplayName *iface)
static IMoniker test_moniker
static const WCHAR wszEmpty[]
@ COINIT_APARTMENTTHREADED
interface IMoniker * LPMONIKER
interface IBindCtx * LPBC
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC *ppbc)
const GUID IID_IParseDisplayName
HRESULT WINAPI CreatePointerMoniker(LPUNKNOWN punk, LPMONIKER *ppmk)
const GUID IID_IPersistStream
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
#define CONTAINING_RECORD(address, type, field)
static const WCHAR wszFile[]
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_updates_bytes_to_ pdwDataLen BYTE * pbData
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
_In_ DWORD _Out_writes_bytes_to_opt_ pcbData void _Inout_ DWORD * pcbData
#define MK_S_REDUCED_TO_SELF
#define CO_E_WRONG_SERVER_IDENTITY
#define MK_E_CANTOPENFILE
#define MK_S_MONIKERALREADYREGISTERED