22#define NONAMELESSUNION
23#define NONAMELESSSTRUCT
35#define EXPECT_HR(hr,hr_exp) \
36 ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp)
38#define EXPECT_REF(obj,ref) _expect_ref((IUnknown *)obj, ref, __LINE__)
43 rc = IUnknown_Release(
obj);
44 ok_(__FILE__,
line)(rc ==
ref,
"Unexpected refcount %d, expected %d\n", rc,
ref);
52DEFINE_GUID(IID_IWin7ShellDispatch6, 0x34936ba1, 0x67ad, 0x4c41, 0x99,0xb8, 0x8c,0x12,0xdf,0xf1,0xe9,0x74);
77 pSHGetNameFromIDList = (
void*)
GetProcAddress(hshell32,
"SHGetNameFromIDList");
82 static const ShellSpecialFolderConstants special_folders[] =
126 ':',
':',
'{',
'6',
'4',
'5',
'F',
'F',
'0',
'4',
'0',
'-',
'5',
'0',
'8',
'1',
'-',
127 '1',
'0',
'1',
'B',
'-',
'9',
'F',
'0',
'8',
'-',
128 '0',
'0',
'A',
'A',
'0',
'0',
'2',
'F',
'9',
'5',
'4',
'E',
'}',0};
143 ok(
SUCCEEDED(
r),
"Failed to create ShellDispatch object: %#x.\n",
r);
146 r = IShellDispatch_get_Application(
sd, &disp);
147 ok(
r ==
S_OK,
"Failed to get application pointer, hr %#x.\n",
r);
148 ok(disp == (
IDispatch *)
sd,
"Unexpected application pointer %p.\n", disp);
149 IDispatch_Release(disp);
152 r = IShellDispatch_get_Parent(
sd, &disp);
153 ok(
r ==
S_OK,
"Failed to get Shell object parent, hr %#x.\n",
r);
154 ok(disp == (
IDispatch *)
sd,
"Unexpected parent pointer %p.\n", disp);
155 IDispatch_Release(disp);
158 folder = (
void*)0xdeadbeef;
160 ok(
r ==
S_FALSE,
"expected S_FALSE, got %08x\n",
r);
168 folder = (
void*)0xdeadbeef;
170 if (special_folders[
i] == ssfALTSTARTUP || special_folders[
i] == ssfCOMMONALTSTARTUP)
172 ok(
r ==
S_OK ||
broken(
r ==
S_FALSE) ,
"Failed to get folder for index %#x, got %08x\n", special_folders[
i],
r);
174 ok(
r ==
S_OK,
"Failed to get folder for index %#x, got %08x\n", special_folders[
i],
r);
181 folder = (
void *)0xdeadbeef;
189 ok(
r ==
S_OK,
"IShellDispatch::NameSpace failed: %08x\n",
r);
195 ok(
r ==
S_OK,
"Failed to get folder path: %#x.\n",
r);
198 ok(
r ==
S_OK,
"Folder::get_Title failed: %08x\n",
r);
205 if (pSHGetNameFromIDList)
211 ok(
r ==
S_OK,
"SHGetSpecialFolderLocation failed: %08x\n",
r);
212 r = pSHGetNameFromIDList(pidl, SIGDN_NORMALDISPLAY, &
name);
213 ok(
r ==
S_OK,
"SHGetNameFromIDList failed: %08x\n",
r);
223 while (
path <
p && *(
p - 1) !=
'\\')
230 r = Folder_QueryInterface(
folder, &IID_Folder2, (
LPVOID*)&folder2);
231 ok(
r ==
S_OK,
"Folder::QueryInterface failed: %08x\n",
r);
234 r = Folder2_get_Self(folder2, &
item);
235 ok(
r ==
S_OK,
"Folder::get_Self failed: %08x\n",
r);
238 r = FolderItem_get_Path(
item, &item_path);
239 ok(
r ==
S_OK,
"FolderItem::get_Path failed: %08x\n",
r);
242 FolderItem_Release(
item);
244 Folder2_Release(folder2);
252 ok(
r ==
S_OK,
"IShellDispatch::NameSpace failed: %08x\n",
r);
254 r = Folder_QueryInterface(
folder, &IID_Folder2, (
void **)&folder2);
255 ok(
r ==
S_OK,
"Failed to get Folder2 interface: %#x.\n",
r);
256 r = Folder2_get_Self(folder2, &
item);
257 ok(
r ==
S_OK,
"Folder::get_Self failed: %08x\n",
r);
258 r = FolderItem_get_Path(
item, &item_path);
259 ok(
r ==
S_OK,
"FolderItem::get_Path failed: %08x\n",
r);
264 FolderItem_Release(
item);
265 Folder2_Release(folder2);
275 ok(
r ==
S_FALSE,
"expected S_FALSE, got %08x\n",
r);
287 ok(
r ==
S_OK,
"IShellDispatch::NameSpace failed: %08x\n",
r);
289 disp = (
void *)0xdeadbeef;
290 r = Folder_get_Parent(
folder, &disp);
292 ok(disp ==
NULL,
"Unexpected parent pointer %p.\n", disp);
295 ok(
r ==
S_OK,
"Failed to get folder title: %#x.\n",
r);
299 r = Folder_QueryInterface(
folder, &IID_Folder2, (
void **)&folder2);
300 ok(
r ==
S_OK,
"Failed to get Folder2 interface: %#x.\n",
r);
301 r = Folder2_get_Self(folder2, &
item);
302 ok(
r ==
S_OK,
"Folder::get_Self failed: %08x\n",
r);
303 r = FolderItem_get_Path(
item, &item_path);
304 ok(
r ==
S_OK,
"Failed to get item path: %#x.\n",
r);
307 FolderItem_Release(
item);
308 Folder2_Release(folder2);
320 ok(
r ==
S_OK,
"IShellDispatch::NameSpace failed: %08x\n",
r);
324 ok(
r ==
S_OK,
"Folder::get_Title failed: %08x\n",
r);
331 r = Folder_QueryInterface(
folder, &IID_Folder2, (
LPVOID*)&folder2);
332 ok(
r ==
S_OK,
"Failed to get Folder2 interface: %#x.\n",
r);
335 r = Folder2_get_Self(folder2, &
item);
336 ok(
r ==
S_OK,
"Folder::get_Self failed: %08x\n",
r);
339 r = FolderItem_get_Path(
item, &item_path);
340 ok(
r ==
S_OK,
"FolderItem::get_Path failed: %08x\n",
r);
344 FolderItem_Release(
item);
346 Folder2_Release(folder2);
356 IShellDispatch_Release(
sd);
373 {
"00-Myfolder", DIRECTORY },
374 {
"01-empty.bin", EMPTY_FILE },
378 IShellDispatch *
sd =
NULL;
381 FolderItems2 *items2 =
NULL;
382 FolderItems3 *items3 =
NULL;
383 FolderItem *
item = (FolderItem*)0xdeadbeef, *
item2;
384 FolderItemVerbs *verbs = (FolderItemVerbs*)0xdeadbeef;
385 VARIANT var, var2, int_index, str_index, str_index2;
397 ok(!!
sd,
"sd is null\n");
411 ok(
r ==
S_OK,
"IShellDispatch::NameSpace failed: %08x\n",
r);
424 ok(
r ==
S_OK,
"Folder::Items failed: %08x\n",
r);
425 ok(!!
items,
"items is null\n");
430 r = Folder_Items(
folder, (FolderItems **)&unk);
431 ok(
r ==
S_OK,
"Folder::Items failed: %08x\n",
r);
433 IUnknown_Release(unk);
436 FolderItems_AddRef(
items);
438 FolderItems_Release(
items);
443 r = Folder_get_Application(
folder, &disp);
444 ok(
r ==
S_OK,
"Failed to get application %#x.\n",
r);
445 ok(disp != (
IDispatch *)
sd,
"Unexpected application pointer\n");
449 r = Folder_get_Application(
folder, &disp2);
450 ok(
r ==
S_OK,
"Failed to get application %#x.\n",
r);
451 ok(disp2 == disp,
"Unexpected application pointer\n");
452 IDispatch_Release(disp2);
454 r = IDispatch_QueryInterface(disp, &IID_IShellDispatch, (
void **)&disp2);
455 ok(
r ==
S_OK,
"Wrong instance, hr %#x.\n",
r);
456 IDispatch_Release(disp2);
457 IDispatch_Release(disp);
463 ok(
r ==
S_OK,
"FolderItems::get_Count failed: %08x\n",
r);
473 ok(
r ==
S_FALSE,
"expected S_FALSE, got %08x\n",
r);
474 ok(!
item,
"item is not null\n");
479 switch (file_defs[
i].
type)
501 ok(
r ==
S_OK,
"FolderItems::get_Count failed: %08x\n",
r);
508 ok(
r ==
S_OK,
"FolderItems::Item failed: %08x\n",
r);
509 ok(!!
item,
"item is null\n");
511 disp = (
void *)0xdeadbeef;
512 r = FolderItems_get_Parent(
items, &disp);
514 ok(disp ==
NULL,
"Unexpected parent pointer %p.\n", disp);
516 r = FolderItem_get_Parent(
item, &disp);
517 ok(
r ==
S_OK,
"Failed to get parent pointer, hr %#x.\n",
r);
519 IDispatch_Release(disp);
525 FolderItems_Release(
items);
528 ok(
r ==
S_OK,
"Folder::Items failed: %08x\n",
r);
529 ok(!!
items,
"items is null\n");
530 r = FolderItems_QueryInterface(
items, &IID_FolderItems2, (
void**)&items2);
534 ok(!!items2,
"items2 is null\n");
535 FolderItems2_Release(items2);
537 r = FolderItems_QueryInterface(
items, &IID_FolderItems3, (
void**)&items3);
538 ok(
r ==
S_OK,
"FolderItems::QueryInterface failed: %08x\n",
r);
539 ok(!!items3,
"items3 is null\n");
543 ok(
r ==
S_OK,
"FolderItems::get_Count failed: %08x\n",
r);
548 item = (FolderItem*)0xdeadbeef;
551 ok(!
item,
"item is not null\n");
561 ok(
r ==
S_OK,
"FolderItems::Item failed: %08x\n",
r);
562 ok(!!
item,
"item is null\n");
566 r = Folder_get_Application(
folder, &disp);
567 ok(
r ==
S_OK,
"Failed to get application pointer %#x.\n",
r);
568 r = FolderItem_get_Application(
item, &disp2);
569 ok(
r ==
S_OK,
"Failed to get application pointer %#x.\n",
r);
570 ok(disp == disp2,
"Unexpected application pointer.\n");
571 IDispatch_Release(disp2);
572 IDispatch_Release(disp);
574 FolderItem_Release(
item);
585 ok(
r ==
S_OK,
"FolderItems::Item failed: %08x\n",
r);
586 ok(!!
item,
"item is null\n");
587 FolderItem_Release(
item);
594 ok(
r ==
S_OK,
"FolderItems::Item failed: %08x\n",
r);
595 ok(!!
item,
"item is null\n");
599 item = (FolderItem*)0xdeadbeef;
601 ok(
r ==
S_FALSE,
"expected S_FALSE, got %08x\n",
r);
602 ok(!
item,
"item is not null\n");
608 ok(
r ==
S_OK,
"expected S_OK, got %08x\n",
r);
609 ok(!!
item,
"item is null\n");
613 r = FolderItem_get_Path(
item, &bstr);
614 ok(
r ==
S_OK,
"FolderItem::get_Path failed: %08x\n",
r);
618 FolderItem_Release(
item);
629 V_I4(&int_index) =
i;
633 r = FolderItems_Item(
items, int_index, &
item);
634 ok(
r ==
S_OK,
"file_defs[%d]: FolderItems::Item failed: %08x\n",
i,
r);
635 ok(!!
item,
"file_defs[%d]: item is null\n",
i);
639 ok(
r ==
S_OK,
"file_defs[%d]: FolderItems::Item failed: %08x\n",
i,
r);
640 ok(
item2 !=
item,
"file_defs[%d]: item and item2 are the same\n",
i);
641 FolderItem_Release(
item2);
644 r = FolderItem_get_Path(
item, &bstr);
645 ok(
r ==
S_OK,
"file_defs[%d]: FolderItem::get_Path failed: %08x\n",
i,
r);
653 ok(
r ==
S_OK,
"Failed to get item name, hr %#x.\n",
r);
660 FolderItem_Release(
item);
663 r = FolderItems_Item(
items, str_index, &
item);
664 ok(
r ==
S_OK,
"file_defs[%d]: FolderItems::Item failed: %08x\n",
i,
r);
665 ok(!!
item,
"file_defs[%d]: item is null\n",
i);
668 r = FolderItem_get_Path(
item, &bstr);
669 ok(
r ==
S_OK,
"file_defs[%d]: FolderItem::get_Path failed: %08x\n",
i,
r);
676 r = FolderItem_get_IsFolder(
item, &
b);
677 ok(
r ==
S_OK,
"Failed to get IsFolder property, %#x.\n",
r);
678 ok(file_defs[
i].
type == DIRECTORY ?
b == VARIANT_TRUE :
b == VARIANT_FALSE,
"Unexpected prop value %#x.\n",
b);
680 FolderItem_Release(
item);
682 if (file_defs[
i].
type == DIRECTORY)
689 ok(
r ==
S_OK,
"file_defs[%d]: FolderItems::Item failed: %08x\n",
i,
r);
690 ok(!!
item2,
"file_defs[%d]: item is null\n",
i);
703 item2 = (FolderItem*)0xdeadbeef;
706 ok(
r ==
S_FALSE,
"file_defs[%d]: expected S_FALSE, got %08x\n",
i,
r);
707 ok(!
item2,
"file_defs[%d]: item is not null\n",
i);
724 r = FolderItems_Item(
items, int_index, &
item);
725 ok(
r ==
S_OK,
"file_defs[%d]: FolderItems::Item failed: %08x\n",
i,
r);
726 ok(!!
item,
"file_defs[%d]: item is null\n",
i);
729 r = FolderItem_get_Path(
item, &bstr);
730 ok(
r ==
S_OK,
"file_defs[%d]: FolderItem::get_Path failed: %08x\n",
i,
r);
736 FolderItem_Release(
item);
739 item = (FolderItem*)0xdeadbeef;
740 r = FolderItems_Item(
items, str_index, &
item);
741 ok(
r ==
S_FALSE,
"file_defs[%d]: expected S_FALSE, got %08x\n",
i,
r);
742 ok(!
item,
"file_defs[%d]: item is not null\n",
i);
749 item = (FolderItem*)0xdeadbeef;
750 r = FolderItems_Item(
items, int_index, &
item);
751 ok(
r ==
S_FALSE,
"expected S_FALSE, got %08x\n",
r);
752 ok(!
item,
"item is not null\n");
760 r = FolderItems_get_Application(
items, &disp);
761 ok(
r ==
S_OK,
"FolderItems::get_Application failed: %08x\n",
r);
763 r = Folder_get_Application(
folder, &disp2);
764 ok(
r ==
S_OK,
"Failed to get application pointer, hr %#x.\n",
r);
765 ok(disp == disp2,
"Unexpected application pointer.\n");
766 IDispatch_Release(disp2);
767 IDispatch_Release(disp);
776 r = FolderItems_get_Parent(
items, &disp);
778 ok(!disp,
"disp is not null\n");
786 r = FolderItems__NewEnum(
items, &unk);
788 ok(
r ==
S_OK,
"FolderItems::_NewEnum failed: %08x\n",
r);
790 ok(!!unk,
"unk is null\n");
791 if (unk) IUnknown_Release(unk);
795 r = FolderItems3_Filter(items3, 0,
NULL);
797 ok(
r ==
S_OK,
"expected S_OK, got %08x\n",
r);
801 r = FolderItems3_get_Verbs(items3,
NULL);
805 r = FolderItems3_get_Verbs(items3, &verbs);
807 ok(
r ==
S_FALSE,
"expected S_FALSE, got %08x\n",
r);
808 ok(!verbs,
"verbs is not null\n");
821 ok(
r ==
S_OK,
"FolderItems::get_Count failed: %08x\n",
r);
825 V_I4(&int_index) = 0;
826 item = (FolderItem*)0xdeadbeef;
827 r = FolderItems_Item(
items, int_index, &
item);
828 ok(
r ==
S_FALSE,
"expected S_FALSE, got %08x\n",
r);
829 ok(!
item,
"item is not null\n");
832 item = (FolderItem*)0xdeadbeef;
833 r = FolderItems_Item(
items, str_index, &
item);
834 ok(
r ==
S_FALSE,
"expected S_FALSE, got %08x\n",
r);
835 ok(!
item,
"item is not null\n");
838 FolderItems_Release(
items);
840 if (items3) FolderItems3_Release(items3);
841 IShellDispatch_Release(
sd);
846 static const WCHAR spooler[] = {
'S',
'p',
'o',
'o',
'l',
'e',
'r',0};
847 static const WCHAR dummyW[] = {
'd',
'u',
'm',
'm',
'y',0};
849 SC_HANDLE scm, service;
857 &IID_IShellDispatch2, (
void**)&
sd);
860 win_skip(
"IShellDispatch2 not supported\n");
866 hr = IShellDispatch2_IsServiceRunning(
sd,
NULL, &
v);
880 hr = IShellDispatch2_IsServiceRunning(
sd,
name, &
v);
892 hr = IShellDispatch2_IsServiceRunning(
sd,
name, &
v);
898 IShellDispatch2_Release(
sd);
909 hr = IDispatch_GetTypeInfoCount(disp, &
count);
916 hr = ITypeInfo_GetTypeAttr(
typeinfo, &typeattr);
925 ITypeInfo_ReleaseTypeAttr(
typeinfo, typeattr);
931 static const IID *shelldisp_riids[] = {
932 &IID_IShellDispatch6,
933 &IID_IShellDispatch5,
934 &IID_IShellDispatch4,
935 &IID_IShellDispatch2,
936 &IID_IWin7ShellDispatch6,
939 IShellFolderViewDual *viewdual;
951 hr = IShellFolder_CreateViewObject(desktop,
NULL, &IID_IShellView, (
void**)&
view);
954 hr = IShellView_QueryInterface(
view, &IID_IShellFolderViewDual, (
void**)&viewdual);
962 ok(disp2 == disp,
"got %p, %p\n", disp2, disp);
963 IDispatch_Release(disp2);
965 hr = IDispatch_QueryInterface(disp, &IID_IShellFolderViewDual, (
void**)&viewdual);
967 ok(disp == (
IDispatch*)viewdual,
"got %p, expected %p\n", viewdual, disp);
969 hr = IShellFolderViewDual_QueryInterface(viewdual, &IID_IShellView, (
void**)&view2);
975 hr = IShellFolderViewDual_get_Application(viewdual,
NULL);
978 hr = IShellFolderViewDual_get_Application(viewdual, &disp2);
980 ok(disp2 != (
IDispatch*)viewdual,
"got %p, %p\n", disp2, viewdual);
982 IDispatch_Release(disp2);
984 IShellFolderViewDual_Release(viewdual);
985 IDispatch_Release(disp);
987 disp = (
void*)0xdeadbeef;
988 hr = IShellView_GetItemObject(
view, SVGIO_BACKGROUND, &IID_IShellFolderViewDual, (
void**)&disp);
990 ok(disp ==
NULL,
"got %p\n", disp);
991 IShellView_Release(
view);
998 hr = IShellFolder_BindToObject(desktop, pidl,
NULL, &IID_IShellFolder, (
void**)&
tmpdir);
1002 hr = IShellFolder_CreateViewObject(desktop,
NULL, &IID_IShellView, (
void**)&
view);
1005 hr = IShellView_QueryInterface(
view, &IID_IShellFolderViewDual, (
void**)&viewdual);
1010 IDispatch_Release(disp);
1011 IShellView_Release(
view);
1013 IShellFolder_Release(
tmpdir);
1014 IShellFolder_Release(desktop);
1019 IShellWindows *shellwindows;
1027 &IID_IShellWindows, (
void**)&shellwindows);
1033 hr = IShellWindows_Register(shellwindows,
NULL, 0, SWC_EXPLORER,
NULL);
1036 hr = IShellWindows_Register(shellwindows,
NULL, 0, SWC_EXPLORER, &
cookie);
1040 hr = IShellWindows_Register(shellwindows, (
IDispatch*)shellwindows, 0, SWC_EXPLORER, &
cookie);
1044 hr = IShellWindows_Register(shellwindows, (
IDispatch*)shellwindows, 0, SWC_EXPLORER, &
cookie);
1049 0, 0, 50, 14, 0, 0, 0,
NULL);
1062 ok(cookie2 != 0 && cookie2 !=
cookie,
"got %d\n", cookie2);
1064 hr = IShellWindows_Revoke(shellwindows,
cookie);
1067 hr = IShellWindows_Revoke(shellwindows, cookie2);
1071 hr = IShellWindows_Revoke(shellwindows, 0);
1082 disp = (
void*)0xdeadbeef;
1085 hr = IShellWindows_FindWindowSW(shellwindows, &
v, &
v, SWC_DESKTOP, &
ret, SWFO_NEEDDISPATCH, &disp);
1088 win_skip(
"SWC_DESKTOP is not supported, some tests will be skipped.\n");
1090 ok(disp ==
NULL,
"got %p\n", disp);
1094 static const IID *browser_riids[] = {
1099 static const IID *viewdual_riids[] = {
1100 &IID_IShellFolderViewDual3,
1104 IShellFolderViewDual *
view;
1112 ok(disp !=
NULL,
"got %p\n", disp);
1119 hr = IDispatch_QueryInterface(disp, &IID_IWebBrowser2, (
void**)&wb);
1122 hr = IWebBrowser2_Refresh(wb);
1126 hr = IWebBrowser2_get_Application(wb, &app);
1128 ok(disp == app,
"got %p, %p\n", app, disp);
1129 IDispatch_Release(app);
1131 hr = IWebBrowser2_get_Document(wb, &doc);
1137 IWebBrowser2_Release(wb);
1140 hr = IDispatch_QueryInterface(disp, &IID_IShellFolderViewDual, (
void**)&
view);
1143 hr = IDispatch_QueryInterface(disp, &IID_IServiceProvider, (
void**)&
sp);
1146 hr = IServiceProvider_QueryService(
sp, &SID_STopLevelBrowser, &IID_IShellBrowser, (
void**)&
sb);
1149 hr = IServiceProvider_QueryService(
sp, &SID_STopLevelBrowser, &IID_IShellBrowser, (
void**)&sb2);
1151 ok(
sb == sb2,
"got %p, %p\n",
sb, sb2);
1153 hr = IServiceProvider_QueryService(
sp, &SID_STopLevelBrowser, &
IID_IOleWindow, (
void**)&unk);
1155 IUnknown_Release(unk);
1157 hr = IServiceProvider_QueryService(
sp, &SID_STopLevelBrowser, &IID_IExplorerBrowser, (
void**)&unk);
1160 hr = IShellBrowser_QueryInterface(
sb, &IID_IExplorerBrowser, (
void**)&unk);
1163 hr = IShellBrowser_QueryInterface(
sb, &IID_IWebBrowser2, (
void**)&unk);
1169 hr = IShellBrowser_QueryActiveShellView(
sb, &sv);
1171 IShellView_Release(sv);
1173 IShellBrowser_Release(sb2);
1174 IShellBrowser_Release(
sb);
1176 hr = IServiceProvider_QueryService(
sp, &SID_STopLevelBrowser, &
IID_IUnknown, (
void**)&unk);
1179 hr = IUnknown_QueryInterface(unk, &IID_IShellBrowser, (
void**)&sb2);
1181 IShellBrowser_Release(sb2);
1182 IUnknown_Release(unk);
1184 hr = IServiceProvider_QueryService(
sp, &SID_STopLevelBrowser, &IID_IShellView, (
void**)&sv);
1187 IServiceProvider_Release(
sp);
1188 IDispatch_Release(disp);
1191 disp = (
void*)0xdeadbeef;
1194 hr = IShellWindows_FindWindowSW(shellwindows, &
v, &
v, SWC_DESKTOP, &
ret, 0, &disp);
1196 ok(disp ==
NULL,
"got %p\n", disp);
1199 disp = (
void*)0xdeadbeef;
1204 hr = IShellWindows_FindWindowSW(shellwindows, &
v, &
v2, SWC_BROWSER, &
ret, SWFO_COOKIEPASSED, &disp);
1207 ok(disp ==
NULL,
"got %p\n", disp);
1210 hr = IShellWindows_Revoke(shellwindows,
cookie);
1214 IShellWindows_Release(shellwindows);
1219 static const WCHAR cadabraW[] = {
'c',
'a',
'd',
'a',
'b',
'r',
'a',0};
1229 &IID_IShellDispatch, (
void**)&
sd);
1239 item = (
void*)0xdeadbeef;
1246 item = (
void*)0xdeadbeef;
1254 item = (
void*)0xdeadbeef;
1257 "got 0x%08x\n",
hr);
1277 FolderItem_Release(
item);
1279 IShellDispatch_Release(
sd);
1284 FolderItemVerbs *verbs, *verbs2;
1286 FolderItemVerb *verb;
1298 &IID_IShellDispatch, (
void**)&
sd);
1308 hr = Folder_QueryInterface(
folder, &IID_Folder2, (
void**)&folder2);
1312 hr = Folder2_get_Self(folder2, &
item);
1314 Folder2_Release(folder2);
1320 hr = FolderItem_Verbs(
item, &verbs);
1323 hr = FolderItem_Verbs(
item, &verbs2);
1325 ok(verbs2 != verbs,
"Unexpected verbs pointer.\n");
1326 FolderItemVerbs_Release(verbs2);
1328 disp = (
void *)0xdeadbeef;
1329 hr = FolderItemVerbs_get_Application(verbs, &disp);
1331 ok(disp ==
NULL,
"Unexpected application pointer.\n");
1333 disp = (
void *)0xdeadbeef;
1334 hr = FolderItemVerbs_get_Parent(verbs, &disp);
1336 ok(disp ==
NULL,
"Unexpected parent pointer %p.\n", disp);
1339 hr = FolderItemVerbs_get_Count(verbs,
NULL);
1343 hr = FolderItemVerbs_get_Count(verbs, &
count);
1350 hr = FolderItemVerbs_Item(verbs,
v,
NULL);
1358 hr = FolderItemVerbs_Item(verbs,
v, &verb);
1360 hr = FolderItemVerb_get_Name(verb, &
str);
1366 disp = (
void *)0xdeadbeef;
1367 hr = FolderItemVerb_get_Parent(verb, &disp);
1369 ok(disp ==
NULL,
"Unexpected parent pointer %p.\n", disp);
1371 disp = (
void *)0xdeadbeef;
1372 hr = FolderItemVerb_get_Application(verb, &disp);
1374 ok(disp ==
NULL,
"Unexpected parent pointer %p.\n", disp);
1377 FolderItemVerb_Release(verb);
1383 hr = FolderItemVerbs_Item(verbs,
v, &verb);
1385 ok(verb ==
NULL,
"got %p\n", verb);
1387 FolderItemVerbs_Release(verbs);
1388 FolderItem_Release(
item);
1389 IShellDispatch_Release(
sd);
1395 IShellDispatch2 *
sd;
1399 static const WCHAR regW[] = {
'r',
'e',
'g',0};
1402 &IID_IShellDispatch2, (
void**)&
sd);
1405 win_skip(
"IShellDispatch2 not supported\n");
1420 ok(
hr ==
S_OK,
"ShellExecute failed: %08x\n",
hr);
1427 ok(
hr ==
S_OK,
"ShellExecute failed: %08x\n",
hr);
1430 IShellDispatch2_Release(
sd);
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
char * strcat(char *DstString, const char *SrcString)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
char * strcpy(char *DstString, const char *SrcString)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static const WCHAR backslashW[]
static const WCHAR clsidW[]
#define GetCurrentDirectoryW(x, y)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
#define MultiByteToWideChar
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
DWORD WINAPI GetLongPathNameW(IN LPCWSTR lpszShortPath, OUT LPWSTR lpszLongPath, IN DWORD cchBuffer)
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
#define IShellFolder_ParseDisplayName
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
GLfloat GLfloat GLfloat v2
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
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define ERROR_FILE_NOT_FOUND
static const CHAR spooler[]
static const WCHAR dummyW[]
#define LOCALE_SYSTEM_DEFAULT
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
const GUID IID_IOleWindow
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualGUID(rguid1, rguid2)
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
BOOL WINAPI QueryServiceStatusEx(SC_HANDLE hService, SC_STATUS_TYPE InfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
static __inline const char * wine_dbgstr_guid(const GUID *id)
static void test_ShellFolderViewDual(void)
static void test_items(void)
static void test_ParseName(void)
#define EXPECT_HR(hr, hr_exp)
static void init_function_pointers(void)
static void _expect_ref(IUnknown *obj, ULONG ref, int line)
static BSTR a2bstr(const char *str)
static void test_ShellExecute(void)
static const WCHAR winetestW[]
#define EXPECT_REF(obj, ref)
static void test_namespace(void)
static void test_service(void)
static void test_ShellWindows(void)
static void test_Verbs(void)
static void variant_set_string(VARIANT *v, const char *s)
static void test_dispatch_typeinfo(IDispatch *disp, REFIID *riid)
static char tmpdir[MAX_PATH]
#define CSIDL_PROGRAM_FILES
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMIDLIST_ABSOLUTE * PCIDLIST_ABSOLUTE
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)
DWORD WINAPI GetLastError(void)
#define RPC_X_NULL_REF_POINTER
#define HRESULT_FROM_WIN32(x)
#define SERVICE_QUERY_STATUS
#define SC_MANAGER_CONNECT
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI DestroyWindow(_In_ HWND)