38DEFINE_GUID(IID_IBrowserSettings, 0xDD1E21CC, 0xE2C7, 0x402C, 0xBF,0x05, 0x10,0x32,0x8D,0x3F,0x6B,0xAD);
39DEFINE_GUID(IID_IShellBrowserService, 0xDFBC7E30, 0xF9E5, 0x455F, 0x88,0xF8, 0xFA,0x98,0xC1,0xE4,0x94,0xCA);
40DEFINE_GUID(IID_IShellTaskScheduler, 0x6CCB7BE0, 0x6807, 0x11D0, 0xB8,0x10, 0x00,0xC0,0x4F,0xD7,0x06,0xEC);
42 0x6DB89131, 0x7B4C, 0x4E1C, 0x8B,0x01, 0x5D,0x31,0x2C,0x9C,0x73,0x88);
43DEFINE_GUID(IID_ILayoutModifier, 0x90B4135A, 0x95BA, 0x46EA, 0x8C,0xAA, 0xE0,0x5B,0x45,0xCD,0x80,0x1E);
44DEFINE_GUID(CLSID_Desktop, 0x00021400, 0x0000, 0x0000, 0xC0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
45DEFINE_GUID(IID_IFileDialogPrivate, 0xAC92FFC5, 0xF0E9, 0x455A, 0x90,0x6B, 0x4A,0x83,0xE7,0x4A,0x80,0x3B);
46DEFINE_GUID(IID_IWebbrowserApp, 0x0002df05, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
47DEFINE_GUID(IID_IBrowserSettings_Vista, 0xF81B80BC, 0x29D1, 0x4734, 0xB5,0x15, 0x77,0x24,0xBF,0xF1,0x60,0x01);
48DEFINE_GUID(IID_IFolderTypeModifier, 0x04BA120E, 0xAD52, 0x4A2D, 0x98,0x07, 0x2D,0xA1,0x78,0xD0,0xC3,0xE1);
49DEFINE_GUID(IID_IShellBrowserService_Vista, 0xF5A24314, 0x5B8B, 0x44FA, 0xBC,0x2E, 0x31,0x28,0x55,0x44,0xB5,0x20);
50DEFINE_GUID(IID_IFileDialogPrivate_Vista, 0x2539E31C, 0x857F, 0x43C4, 0x88,0x72, 0x45,0xBD,0x6A,0x02,0x48,0x92);
51DEFINE_GUID(SID_SMenuBandParent, 0x8C278EEC, 0x3EAB, 0x11D1, 0x8C,0xB0 ,0x00,0xC0,0x4F,0xD9,0x18,0xD0);
52DEFINE_GUID(SID_SMenuPopup, 0xD1E7AFEB, 0x6A2E, 0x11D0, 0x8C,0x78, 0x00,0xC0,0x4F,0xD9,0x18,0xB4);
53DEFINE_GUID(IID_IShellMenu, 0xEE1F7637, 0xE138, 0x11D1, 0x83,0x79, 0x00,0xC0,0x4F,0xD9,0x18,0xD0);
55DEFINE_GUID(IID_UnknownInterface1, 0x3934E4C2, 0x8143, 0x4E4C, 0xA1,0xDC, 0x71,0x8F,0x85,0x63,0xF3,0x37);
56DEFINE_GUID(IID_UnknownInterface2, 0x3E24A11C, 0x15B2, 0x4F71, 0xB8,0x1E, 0x00,0x8F,0x77,0x99,0x8E,0x9F);
57DEFINE_GUID(IID_UnknownInterface3, 0xE38FE0F3, 0x3DB0, 0x47EE, 0xA3,0x14, 0x25,0xCF,0x7F,0x4B,0xF5,0x21);
58DEFINE_GUID(IID_UnknownInterface4, 0xFAD451C2, 0xAF58, 0x4161, 0xB9,0xFF, 0x57,0xAF,0xBB,0xED,0x0A,0xD2);
59DEFINE_GUID(IID_UnknownInterface5, 0xF80C2137, 0x5829, 0x4CE9, 0x9F,0x81, 0xA9,0x5E,0x15,0x9D,0xD8,0xD5);
60DEFINE_GUID(IID_UnknownInterface6, 0xD7F81F62, 0x491F, 0x49BC, 0x89,0x1D, 0x56,0x65,0x08,0x5D,0xF9,0x69);
61DEFINE_GUID(IID_UnknownInterface7, 0x68A4FDBA, 0xA48A, 0x4A86, 0xA3,0x29, 0x1B,0x69,0xB9,0xB1,0x9E,0x89);
62DEFINE_GUID(IID_UnknownInterface8, 0xD3B1CAF5, 0xEC4F, 0x4B2E, 0xBC,0xB0, 0x60,0xD7,0x15,0xC9,0x3C,0xB2);
63DEFINE_GUID(IID_UnknownInterface9, 0x9536CA39, 0x1ACB, 0x4AE6, 0xAD,0x27, 0x24,0x03,0xD0,0x4C,0xA2,0x8F);
64DEFINE_GUID(IID_UnknownInterface10, 0xB722BE00, 0x4E68, 0x101B, 0xA2,0xBC, 0x00,0xAA,0x00,0x40,0x47,0x70);
65DEFINE_GUID(IID_UnknownInterface11, 0x691ecf9f, 0x6b9c, 0x4311, 0xa1,0x7b, 0xad,0x15,0x4c,0x30,0xe9,0x1f);
66DEFINE_GUID(IID_UnknownInterface12, 0x7e3159f5, 0x21ca, 0x4ec2, 0x8f,0xbe, 0x66,0x2d,0x08,0x2c,0xa3,0xeb);
67DEFINE_GUID(IID_UnknownInterface13, 0xa36a3ace, 0x8332, 0x45ce, 0xaa,0x29, 0x50,0x3c,0xb7,0x6b,0x25,0x87);
68DEFINE_GUID(IID_UnknownInterface14, 0x16770868, 0x239c, 0x445b, 0xa0,0x1d, 0xf2,0x6c,0x7f,0xbb,0xf2,0x6c);
69DEFINE_GUID(IID_UnknownInterface15, 0x05a89298, 0x6246, 0x4c63, 0xbb,0x0d, 0x9b,0xda,0xf1,0x40,0xbf,0x3b);
70DEFINE_GUID(IID_UnknownInterface16, 0x35094a87, 0x8bb1, 0x4237, 0x96,0xc6, 0xc4,0x17,0xee,0xbd,0xb0,0x78);
71DEFINE_GUID(IID_UnknownInterface17, 0x3d5d8c60, 0x21e4, 0x4b03, 0x83,0xb8, 0xc7,0x3f,0x8c,0x94,0x00,0x78);
72DEFINE_GUID(IID_UnknownInterface18, 0x1fc45c07, 0x9e35, 0x4276, 0xad,0x7f, 0x08,0x60,0x3a,0xa0,0xf6,0x0f);
73DEFINE_GUID(IID_UnknownInterface19, 0xacd9b67a, 0xceab, 0x4c6c, 0x90,0xa1, 0xe8,0x57,0xc6,0x59,0xe3,0x9d);
74DEFINE_GUID(IID_UnknownInterface20, 0xd0fe6f62, 0xdea4, 0x46c9, 0x9d,0xae, 0x36,0xcb,0x13,0x99,0x78,0xfa);
75DEFINE_GUID(IID_UnknownInterface21, 0x732c1ccd, 0xbc5c, 0x4065, 0x88,0xcb, 0xfb,0x5b,0xce,0xa7,0x1f,0x66);
76DEFINE_GUID(IID_UnknownInterface22, 0xc13b3d3a, 0x10d6, 0x43f5, 0x98,0xdb, 0xb7,0xdd,0xd9,0x87,0xb3,0x3d);
77DEFINE_GUID(IID_UnknownInterface23, 0x2e228ba3, 0xea25, 0x4378, 0x97,0xb6, 0xd5,0x74,0xfa,0xeb,0xa3,0x56);
78DEFINE_GUID(IID_UnknownInterface24, 0xd56a2092, 0x7dbf, 0x4144, 0xa1,0x10, 0xc2,0x96,0x3a,0x70,0x98,0x32);
100 &IID_IExplorerBrowser, (
void**)peb);
107 return IExplorerBrowser_Initialize(peb,
hwnd, &rc,
NULL);
115 hr = IExplorerBrowser_BrowseToIDList(peb, pidl_desktop, 0);
150 ok(0,
"Never called.\n");
250 EXPLORERPANESTATE *peps)
255 ok(ep !=
NULL,
"ep is NULL.\n");
256 ok(peps !=
NULL,
"peps is NULL.\n");
257 ok(*peps == 0,
"got %d\n", *peps);
277static const IExplorerPaneVisibilityVtbl
epvvt =
289 epv = heap_alloc_zero(
sizeof(*epv));
340 This->OnDefaultCommand++;
350 This->OnStateChange++;
360 This->IncludeObject++;
381 This->GetDefaultMenuText++;
390 This->GetViewFlags++;
400 This->OnColumnClicked++;
410 This->GetCurrentFilter++;
419 This->OnPreviewCreated++;
443 cdb = heap_alloc_zero(
sizeof(*cdb));
475 IServiceProvider_AddRef(iface);
517 for(
i = 0;
This->interfaces[
i].service !=
NULL;
i++)
523 This->interfaces[
i].count++;
524 punk =
This->interfaces[
i].punk;
535 IUnknown_AddRef(punk);
542static const IServiceProviderVtbl
spvtbl =
553 sp->IServiceProvider_iface.lpVtbl = &
spvtbl;
568#define test_qinterface(iid, exp) \
570 hr = IExplorerBrowser_QueryInterface(peb, &iid, (void**)&punk); \
571 ok(hr == exp, "(%s:)Expected (0x%08x), got (0x%08x)\n", \
573 if(SUCCEEDED(hr)) IUnknown_Release(punk); \
594#undef test_qinterface
596 lres = IExplorerBrowser_Release(peb);
597 ok(lres == 0,
"Got %d\n", lres);
611 hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (
void**)&psb);
615 skip(
"Failed to get IShellBrowser interface.\n");
620 retHwnd = (
HWND)0xdeadbeef;
621 hr = IShellBrowser_GetControlWindow(psb, FCW_TOOLBAR, &retHwnd);
623 ok(retHwnd ==
NULL ||
broken(retHwnd == (
HWND)0xdeadbeef),
"got %p\n", retHwnd);
625 retHwnd = (
HWND)0xdeadbeef;
626 hr = IShellBrowser_GetControlWindow(psb, FCW_STATUS, &retHwnd);
628 ok(retHwnd ==
NULL ||
broken(retHwnd == (
HWND)0xdeadbeef),
"got %p\n", retHwnd);
630 retHwnd = (
HWND)0xdeadbeef;
631 hr = IShellBrowser_GetControlWindow(psb, FCW_TREE, &retHwnd);
633 ok(retHwnd ==
NULL ||
broken(retHwnd == (
HWND)0xdeadbeef),
"got %p\n", retHwnd);
635 retHwnd = (
HWND)0xdeadbeef;
636 hr = IShellBrowser_GetControlWindow(psb, FCW_PROGRESS, &retHwnd);
638 ok(retHwnd ==
NULL ||
broken(retHwnd == (
HWND)0xdeadbeef),
"got %p\n", retHwnd);
641 hr = IShellBrowser_InsertMenusSB(psb,
NULL,
NULL);
645 hr = IShellBrowser_RemoveMenusSB(psb,
NULL);
655 retHwnd = (
HWND)0xDEADBEEF;
656 hr = IShellBrowser_GetWindow(psb, &retHwnd);
658 ok(retHwnd == (
HWND)0xDEADBEEF,
"HWND overwritten\n");
665 hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, &lres);
667 ok(lres == 0,
"lres was %ld\n", lres);
673 ok(lres == 0,
"lres was %ld\n", lres);
675 hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0,
NULL);
678 hr = IShellBrowser_SendControlMsg(psb, FCW_TREE, 0, 0, 0,
NULL);
681 hr = IShellBrowser_SendControlMsg(psb, FCW_PROGRESS, 0, 0, 0,
NULL);
686 hr = IShellBrowser_QueryActiveShellView(psb, (
IShellView**)&punk);
695 hr = IShellBrowser_GetWindow(psb, &retHwnd);
697 ok(
GetParent(retHwnd) ==
hwnd,
"The HWND returned is not our child.\n");
702 hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0,
NULL);
706 hr = IShellBrowser_SendControlMsg(psb, FCW_TOOLBAR, 0, 0, 0, &lres);
708 ok(lres == 0,
"lres was %ld\n", lres);
711 hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, &lres);
713 ok(lres == 0,
"lres was %ld\n", lres);
716 hr = IShellBrowser_SendControlMsg(psb, 1234, 0, 0, 0, &lres);
718 ok(lres == 0,
"lres was %ld\n", lres);
721 hr = IShellBrowser_SetStatusTextSB(psb,
NULL);
724 hr = IShellBrowser_ContextSensitiveHelp(psb,
FALSE);
727 hr = IShellBrowser_EnableModelessSB(psb,
TRUE);
730 hr = IShellBrowser_SetToolbarItems(psb,
NULL, 1, 1);
734 hr = IShellBrowser_QueryActiveShellView(psb, (
IShellView**)&punk);
737 IShellBrowser_Release(psb);
738 IExplorerBrowser_Destroy(peb);
739 IExplorerBrowser_Release(peb);
744 IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (
void**)&psb);
753 hr = IShellBrowser_QueryActiveShellView(psb, (
IShellView**)&punk);
757 IShellBrowser_Release(psb);
758 IExplorerBrowser_Destroy(peb);
759 ref = IExplorerBrowser_Release(peb);
784 hr = IExplorerBrowser_Initialize(peb,
NULL, &rc,
NULL);
787 hr = IExplorerBrowser_Initialize(peb,
hwnd, &rc,
NULL);
791 hr = IExplorerBrowser_Initialize(peb,
hwnd, &rc,
NULL);
794 hr = IExplorerBrowser_Destroy(peb);
798 hr = IExplorerBrowser_Initialize(peb,
hwnd, &rc,
NULL);
802 hr = IExplorerBrowser_Destroy(peb);
804 lres = IExplorerBrowser_Release(peb);
805 ok(lres == 0,
"Got %d\n", lres);
811 hr = IExplorerBrowser_Initialize(peb,
hwnd, &rc,
NULL);
813 hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (
void**)&psb);
820 static const RECT exp_rc = {0, 0, 48, 58};
822 hr = IShellBrowser_GetWindow(psb, &eb_hwnd);
834 ok(!
lstrcmpA(
buf,
"ExplorerBrowserControl"),
"Unexpected classname %s\n",
buf);
842 ok(
style == expected_style,
"Got exstyle 0x%08x, expected 0x%08x\n",
style, expected_style);
848 IExplorerBrowser_Destroy(peb);
851 IShellBrowser_Release(psb);
852 lres = IExplorerBrowser_Release(peb);
853 ok(lres == 0,
"Got refcount %d\n", lres);
857 skip(
"Skipping some tests.\n");
859 IExplorerBrowser_Destroy(peb);
860 lres = IExplorerBrowser_Release(peb);
861 ok(lres == 0,
"Got refcount %d\n", lres);
870 hr = IExplorerBrowser_Initialize(peb,
hwnd, &rc,
NULL);
873 hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (
void**)&psb);
876 hr = IShellBrowser_GetWindow(psb, &eb_hwnd);
882 IShellBrowser_Release(psb);
883 IExplorerBrowser_Destroy(peb);
884 IExplorerBrowser_Release(peb);
889 hr = IExplorerBrowser_Initialize(peb,
hwnd, &rc,
NULL);
891 IExplorerBrowser_Destroy(peb);
892 lres = IExplorerBrowser_Release(peb);
893 ok(lres == 0,
"Got refcount %d\n", lres);
897 hr = IExplorerBrowser_Initialize(peb,
hwnd, &rc,
NULL);
899 IExplorerBrowser_Destroy(peb);
900 lres = IExplorerBrowser_Release(peb);
901 ok(lres == 0,
"Got refcount %d\n", lres);
905 hr = IExplorerBrowser_Initialize(peb,
hwnd, &rc,
NULL);
907 IExplorerBrowser_Destroy(peb);
908 lres = IExplorerBrowser_Release(peb);
909 ok(lres == 0,
"Got refcount %d\n", lres);
913 hr = IExplorerBrowser_Initialize(peb,
hwnd, &rc,
NULL);
915 IExplorerBrowser_Destroy(peb);
916 lres = IExplorerBrowser_Release(peb);
917 ok(lres == 0,
"Got refcount %d\n", lres);
932 { &SID_STopLevelBrowser, &IID_ICommDlgBrowser2, 0, cdbimpl },
933 { &SID_STopLevelBrowser, &IID_IShellBrowserService, 0,
NULL },
934 { &SID_STopLevelBrowser, &IID_IShellBrowser, 0,
NULL },
935 { &SID_STopLevelBrowser, &IID_UnknownInterface8, 0,
NULL },
937 { &SID_STopLevelBrowser, &IID_IProfferService, 0,
NULL },
938 { &SID_STopLevelBrowser, &IID_UnknownInterface9, 0,
NULL },
939 { &SID_ExplorerPaneVisibility, &IID_IExplorerPaneVisibility, 0, epvimpl },
940 { &SID_SExplorerBrowserFrame, &IID_ICommDlgBrowser2, 0, cdbimpl },
941 { &SID_SExplorerBrowserFrame, &IID_ICommDlgBrowser3, 0, cdbimpl },
942 { &IID_IFileDialogPrivate, &IID_IFileDialogPrivate, 0,
NULL },
943 { &IID_IFileDialogPrivate, &IID_IFileDialog, 0,
NULL },
944 { &IID_IShellTaskScheduler, &IID_IShellTaskScheduler, 0,
NULL },
945 { &IID_IShellTaskScheduler, &IID_UnknownInterface2, 0,
NULL },
947 { &IID_IFolderView, &IID_IFolderView, 0,
NULL },
948 { &IID_ILayoutModifier, &IID_ILayoutModifier, 0,
NULL },
949 { &IID_IBrowserSettings, &IID_IBrowserSettings, 0,
NULL },
951 { &IID_UnknownInterface1, &IID_UnknownInterface1, 0,
NULL },
952 { &IID_UnknownInterface3, &IID_UnknownInterface3, 0,
NULL },
954 { &IID_UnknownInterface6, &IID_UnknownInterface7, 0,
NULL },
955 { &IID_IBrowserWithActivationNotification, &IID_IBrowserWithActivationNotification, 0,
NULL },
957 { &IID_ICommDlgBrowser, &IID_UnknownInterface11, 0,
NULL },
958 { &IID_ICommDlgBrowser, &IID_UnknownInterface12, 0,
NULL },
959 { &IID_ICommDlgBrowser, &IID_UnknownInterface20, 0,
NULL },
961 { &IID_UnknownInterface13, &IID_UnknownInterface13, 0,
NULL },
962 { &IID_UnknownInterface13, &IID_UnknownInterface18, 0,
NULL },
963 { &IID_UnknownInterface14, &IID_UnknownInterface14, 0,
NULL },
964 { &IID_UnknownInterface15, &IID_UnknownInterface15, 0,
NULL },
965 { &IID_UnknownInterface16, &IID_UnknownInterface16, 0,
NULL },
966 { &IID_UnknownInterface17, &IID_UnknownInterface17, 0,
NULL },
967 { &IID_UnknownInterface17, &IID_UnknownInterface19, 0,
NULL },
969 { &IID_UnknownInterface21, &IID_UnknownInterface21, 0,
NULL },
970 { &IID_UnknownInterface21, &IID_IFileDialog, 0,
NULL },
971 { &IID_UnknownInterface22, &IID_UnknownInterface22, 0,
NULL },
972 { &IID_UnknownInterface23, &IID_UnknownInterface23, 0,
NULL },
973 { &IID_UnknownInterface24, &IID_UnknownInterface24, 0,
NULL },
974 { &IID_UnknownInterface24, &IID_IFileDialog, 0,
NULL },
977 { &IID_IBrowserSettings_Vista, &IID_IBrowserSettings_Vista, 0,
NULL },
978 { &IID_IFolderTypeModifier, &IID_IFolderTypeModifier, 0,
NULL },
979 { &SID_STopLevelBrowser, &IID_IShellBrowserService_Vista, 0,
NULL },
980 { &IID_UnknownInterface5, &IID_UnknownInterface5, 0,
NULL },
981 { &IID_ICommDlgBrowser, &IID_ICommDlgBrowser, 0, cdbimpl },
982 { &IID_IFileDialogPrivate_Vista,&IID_IFileDialogPrivate_Vista, 0,
NULL},
983 { &IID_IFileDialogPrivate_Vista,&IID_IFileDialog, 0,
NULL},
984 { &IID_UnknownInterface10, &IID_IHTMLDocument2, 0,
NULL},
985 { &SID_SMenuBandParent, &IID_IOleCommandTarget, 0,
NULL},
986 { &SID_SMenuBandParent, &IID_IShellMenu, 0,
NULL},
988 { &SID_SMenuPopup, &IID_IOleCommandTarget, 0,
NULL},
1005 IObjectWithSite_Release(
pow);
1010 skip(
"Failed to set site.\n");
1015 IExplorerBrowser_Destroy(peb);
1016 ref = IExplorerBrowser_Release(peb);
1026 for(
i = 0;
i < 10;
i++)
1045 ok(epvimpl->
np,
"Got %d\n", epvimpl->
np);
1051 ok(!epvimpl->
qp,
"Got %d\n", epvimpl->
qp);
1052 ok(!epvimpl->
aqp,
"Got %d\n", epvimpl->
aqp);
1053 ok(!epvimpl->
unk,
"Got %d\n", epvimpl->
unk);
1066 hr = IObjectWithSite_SetSite(
pow,
NULL);
1080 IExplorerBrowser_Destroy(peb);
1086 IObjectWithSite_Release(
pow);
1087 ref = IExplorerBrowser_Release(peb);
1109 static const WCHAR winetest[] = {
'W',
'i',
'n',
'e',
'T',
'e',
's',
't',0};
1116 hr = IExplorerBrowser_SetRect(peb,
NULL, rc);
1119 SetRect(&rc, 100, 100, 10, 10);
1120 hr = IExplorerBrowser_SetRect(peb,
NULL, rc);
1126 hr = IExplorerBrowser_SetRect(peb, &hdwp, rc);
1129 ok(lres,
"EndDeferWindowPos failed.\n");
1132 hr = IExplorerBrowser_SetRect(peb, &hdwp, rc);
1134 ok(hdwp ==
NULL,
"got %p\n", hdwp);
1136 ok(!lres,
"EndDeferWindowPos succeeded unexpectedly.\n");
1140 hr = IExplorerBrowser_SetRect(peb,
NULL, rc);
1142 hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (
void**)&psb);
1148 static const RECT exp_rc = {11, 21, 49, 49};
1149 static const RECT exp_rc2 = {11, 21, 49, 24};
1151 hr = IShellBrowser_GetWindow(psb, &eb_hwnd);
1160 hdwp = (HDWP)0xdeadbeef;
1161 hr = IExplorerBrowser_SetRect(peb, &hdwp, rc);
1168 hr = IExplorerBrowser_SetRect(peb, &hdwp, rc);
1174 IShellBrowser_Release(psb);
1177 IExplorerBrowser_Destroy(peb);
1178 IExplorerBrowser_Release(peb);
1185 IExplorerBrowser_GetOptions(peb,
NULL);
1188 hr = IExplorerBrowser_GetOptions(peb, &
flags);
1193 hr = IExplorerBrowser_SetOptions(peb, 0xDEADBEEF);
1198 hr = IExplorerBrowser_GetOptions(peb, &
flags);
1202 IExplorerBrowser_Destroy(peb);
1203 IExplorerBrowser_Release(peb);
1209 hr = IExplorerBrowser_SetFolderSettings(peb,
NULL);
1211 fs.ViewMode = 0;
fs.fFlags = 0;
1212 hr = IExplorerBrowser_SetFolderSettings(peb, &
fs);
1216 hr = IExplorerBrowser_SetPropertyBag(peb,
NULL);
1218 hr = IExplorerBrowser_SetPropertyBag(peb,
winetest);
1223 IExplorerBrowser_Destroy(peb);
1224 lres = IExplorerBrowser_Release(peb);
1225 ok(lres == 0,
"Got %d\n", lres);
1231 IExplorerBrowserEvents *pebe;
1245 IExplorerBrowser_Advise(peb, pebe,
NULL);
1251 hr = IExplorerBrowser_Unadvise(peb, 11);
1255 for(
i = 0;
i < 5;
i++)
1257 hr = IExplorerBrowser_Advise(peb, pebe, &
cookies[
i]);
1264 for(
i = 5;
i < 10;
i++)
1266 hr = IExplorerBrowser_Advise(peb, pebe, &
cookies[
i]);
1278 for(
i = 4;
i < 8;
i++)
1280 hr = IExplorerBrowser_Unadvise(peb,
cookies[
i]);
1293 IExplorerBrowser_Unadvise(peb,
cookies[5]);
1297 for(
i = 0;
i < 10;
i++)
1301 hr = IExplorerBrowser_Unadvise(peb,
cookies[
i]);
1314 hr = IExplorerBrowser_Advise(peb, pebe, &
cookies[0]);
1318 hr = IExplorerBrowser_Destroy(peb);
1322 ref = IExplorerBrowser_Release(peb);
1337 if (lpszPath[-1] !=
'\\')
1354 hr = IExplorerBrowser_BrowseToIDList(peb, pidl,
uFlags);
1355 ok_(
file,
line) (
hr == hr_exp,
"BrowseToIDList returned 0x%08x\n",
hr);
1361 "Events occurred: %d, %d, %d, %d\n",
1364#define test_browse_pidl(peb, ebev, pidl, uFlags, hr, p, cr, f, co) \
1365 test_browse_pidl_(peb, ebev, pidl, uFlags, hr, p, cr, f, co, __FILE__, __LINE__)
1375 hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (
void**)&psb);
1381 hr = IShellBrowser_BrowseObject(psb, pidl,
uFlags);
1388 "Events occurred: %d, %d, %d, %d\n",
1391 IShellBrowser_Release(psb);
1394#define test_browse_pidl_sb(peb, ebev, pidl, uFlags, hr, p, cr, f, co) \
1395 test_browse_pidl_sb_(peb, ebev, pidl, uFlags, hr, p, cr, f, co, __FILE__, __LINE__)
1409 static const WCHAR testfolderW[] =
1410 {
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
'f',
'o',
'l',
'd',
'e',
'r',
'\0'};
1412 ok(pSHParseDisplayName !=
NULL,
"pSHParseDisplayName unexpectedly missing.\n");
1413 ok(pSHCreateShellItem !=
NULL,
"pSHCreateShellItem unexpectedly missing.\n");
1416 if(!current_path[0])
1418 skip(
"Failed to create test-directory.\n");
1422 lstrcpyW(child_path, current_path);
1428 pSHParseDisplayName(current_path,
NULL, &pidl_current, 0,
NULL);
1429 pSHParseDisplayName(child_path,
NULL, &pidl_child, 0,
NULL);
1481 hr = IExplorerBrowser_GetCurrentView(peb, &IID_IFolderView, (
void**)&pfv);
1487 hr = IFolderView_GetFolder(pfv, &IID_IShellFolder, (
void**)&psf);
1504 IShellFolder_Release(psf);
1505 IFolderView_Release(pfv);
1528 IExplorerBrowser_BrowseToIDList(peb,
NULL, SBSP_NEWBROWSER);
1531 hr = IExplorerBrowser_Unadvise(peb,
cookie);
1533 IExplorerBrowser_Destroy(peb);
1535 hr = IExplorerBrowser_Unadvise(peb2, cookie2);
1537 IExplorerBrowser_Destroy(peb2);
1544 lres = IExplorerBrowser_Release(peb);
1545 ok(lres == 0,
"Got lres %d\n", lres);
1546 lres = IExplorerBrowser_Release(peb2);
1547 ok(lres == 0,
"Got lres %d\n", lres);
1562 hr = IExplorerBrowser_SetOptions(peb, 0);
1575 hr = IExplorerBrowser_Unadvise(peb,
cookie);
1578 IExplorerBrowser_Destroy(peb);
1579 lres = IExplorerBrowser_Release(peb);
1580 ok(lres == 0,
"Got lres %d\n", lres);
1591 hr = IExplorerBrowser_BrowseToObject(peb, (
IUnknown*)psf, SBSP_DEFBROWSER);
1595 IShellFolder_Release(psf);
1599 hr = pSHCreateShellItem(
NULL,
NULL, pidl_current, &psi);
1603 hr = IExplorerBrowser_BrowseToObject(peb, (
IUnknown*)psi, SBSP_DEFBROWSER);
1607 IShellItem_Release(psi);
1610 IExplorerBrowser_Destroy(peb);
1611 lres = IExplorerBrowser_Release(peb);
1612 ok(lres == 0,
"Got lres %d\n", lres);
1632 IExplorerBrowser_GetCurrentView(peb,
NULL,
NULL);
1634 hr = IExplorerBrowser_GetCurrentView(peb,
NULL, (
void**)&punk);
1637#define test_gcv(iid, exp) \
1639 hr = IExplorerBrowser_GetCurrentView(peb, &iid, (void**)&punk); \
1640 ok(hr == exp, "(%s:)Expected (0x%08x), got: (0x%08x)\n", \
1642 if(SUCCEEDED(hr)) IUnknown_Release(punk); \
1672 IExplorerBrowser_Destroy(peb);
1673 IExplorerBrowser_Release(peb);
1684 WPARAM supported_key_accels_mode1[] = {
1688 WPARAM supported_key_accels_mode2[] = {
1702 hr = IExplorerBrowser_QueryInterface(peb, &IID_IInputObject, (
void**)&pio);
1706 win_skip(
"IInputObject not supported.\n");
1727 hr = IExplorerBrowser_Initialize(peb,
hwnd, &rc,
NULL);
1738 hr = IExplorerBrowser_BrowseToObject(peb, (
IUnknown*)psf, SBSP_DEFBROWSER);
1740 IShellFolder_Release(psf);
1756 key_accels = supported_key_accels_mode1;
1758 key_accels = supported_key_accels_mode2;
1760 for(
i = 0;
i < 0x100;
i++)
1764 for(
j = 0; key_accels[
j] != 0;
j++)
1765 if(key_accels[
j] ==
i)
1782 IExplorerBrowser_Destroy(peb);
1783 IExplorerBrowser_Release(peb);
1796 IExplorerBrowser_Release(peb);
1803 static const WCHAR ebtestW[] = {
'e',
'b',
't',
'e',
's',
't',0};
1812 ok(
hwnd !=
NULL,
"Failed to create window for tests.\n");
1821 win_skip(
"No ExplorerBrowser control..\n");
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
static const char * wine_dbgstr_rect(const RECT *prc)
BOOL WINAPI SHIM_OBJ_NAME() Notify(DWORD fdwReason, PVOID ptr)
#define GetCurrentDirectoryW(x, y)
#define GetProcAddress(x, y)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetTickCount(VOID)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
#define IShellFolder_ParseDisplayName
static const IServiceProviderVtbl spvtbl
static void process_msgs(void)
static HRESULT ebrowser_initialize(IExplorerBrowser *peb)
static IServiceProviderImpl * impl_from_IServiceProvider(IServiceProvider *iface)
static ULONG WINAPI IServiceProvider_fnRelease(IServiceProvider *iface)
static HRESULT WINAPI ICommDlgBrowser3_fnOnColumnClicked(ICommDlgBrowser3 *iface, IShellView *ppshv, int iColumn)
static void test_InputObject(void)
static void test_browse_pidl_(IExplorerBrowser *peb, IExplorerBrowserEventsImpl *ebev, LPITEMIDLIST pidl, UINT uFlags, HRESULT hr_exp, UINT pending, UINT created, UINT failed, UINT completed, const char *file, int line)
static HRESULT WINAPI IExplorerBrowserEvents_fnOnNavigationComplete(IExplorerBrowserEvents *iface, PCIDLIST_ABSOLUTE pidlFolder)
static HRESULT ebrowser_instantiate(IExplorerBrowser **peb)
static HRESULT WINAPI ICommDlgBrowser3_fnGetDefaultMenuText(ICommDlgBrowser3 *iface, IShellView *ppshv, LPWSTR pszText, int cchMax)
static ULONG WINAPI IExplorerBrowserEvents_fnRelease(IExplorerBrowserEvents *iface)
static HRESULT WINAPI IServiceProvider_fnQueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
static void setup_window(void)
static HRESULT WINAPI ICommDlgBrowser3_fnGetCurrentFilter(ICommDlgBrowser3 *iface, LPWSTR pszFileSpec, int cchFileSpec)
#define test_gcv(iid, exp)
static ULONG WINAPI IExplorerBrowserEvents_fnAddRef(IExplorerBrowserEvents *iface)
static IShellFolder IShellItem **static IBindCtx LPITEMIDLIST SFGAOF *static void init_function_pointers(void)
static HRESULT WINAPI IExplorerPaneVisibility_fnGetPaneState(IExplorerPaneVisibility *iface, REFEXPLORERPANE ep, EXPLORERPANESTATE *peps)
static void test_SB_misc(void)
static HRESULT WINAPI ICommDlgBrowser3_fnQueryInterface(ICommDlgBrowser3 *iface, REFIID riid, LPVOID *ppvObj)
static ULONG WINAPI ICommDlgBrowser3_fnAddRef(ICommDlgBrowser3 *iface)
static HRESULT WINAPI IServiceProvider_fnQueryInterface(IServiceProvider *iface, REFIID riid, LPVOID *ppvObj)
static IExplorerBrowserEventsImpl ebev
static IExplorerPaneVisibilityImpl * impl_from_IExplorerPaneVisibility(IExplorerPaneVisibility *iface)
static HRESULT WINAPI ICommDlgBrowser3_fnOnDefaultCommand(ICommDlgBrowser3 *iface, IShellView *shv)
static HRESULT WINAPI ICommDlgBrowser3_fnOnPreviewCreated(ICommDlgBrowser3 *iface, IShellView *ppshv)
static HRESULT WINAPI IExplorerPaneVisibility_fnQueryInterface(IExplorerPaneVisibility *iface, REFIID riid, LPVOID *ppvObj)
static ULONG WINAPI IServiceProvider_fnAddRef(IServiceProvider *iface)
static HRESULT WINAPI ICommDlgBrowser3_fnNotify(ICommDlgBrowser3 *iface, IShellView *ppshv, DWORD dwNotifyType)
static void test_initialization(void)
static LPWSTR myPathAddBackslashW(LPWSTR lpszPath)
static void test_SetSite(void)
static IShellFolder IShellItem **static IBindCtx LPITEMIDLIST SFGAOF
static ULONG WINAPI IExplorerPaneVisibility_fnRelease(IExplorerPaneVisibility *iface)
static IShellFolder LPCITEMIDLIST
static void test_navigation(void)
static HRESULT WINAPI IExplorerBrowserEvents_fnQueryInterface(IExplorerBrowserEvents *iface, REFIID riid, void **ppvObj)
static void test_QueryInterface(void)
static HRESULT WINAPI IExplorerBrowserEvents_fnOnNavigationPending(IExplorerBrowserEvents *iface, PCIDLIST_ABSOLUTE pidlFolder)
static HRESULT WINAPI IExplorerBrowserEvents_fnOnViewCreated(IExplorerBrowserEvents *iface, IShellView *psv)
static ULONG WINAPI IExplorerPaneVisibility_fnAddRef(IExplorerPaneVisibility *iface)
static IExplorerBrowserEventsImpl * impl_from_IExplorerBrowserEvents(IExplorerBrowserEvents *iface)
static HRESULT WINAPI ICommDlgBrowser3_fnIncludeObject(ICommDlgBrowser3 *iface, IShellView *shv, LPCITEMIDLIST pidl)
static HRESULT WINAPI ICommDlgBrowser3_fnGetViewFlags(ICommDlgBrowser3 *iface, DWORD *pdwFlags)
static ICommDlgBrowser3Impl * impl_from_ICommDlgBrowser3(ICommDlgBrowser3 *iface)
static const ICommDlgBrowser3Vtbl cdbvtbl
static void test_browse_pidl_sb_(IExplorerBrowser *peb, IExplorerBrowserEventsImpl *ebev, LPITEMIDLIST pidl, UINT uFlags, HRESULT hr_exp, UINT pending, UINT created, UINT failed, UINT completed, const char *file, int line)
static const IExplorerBrowserEventsVtbl ebevents
#define test_browse_pidl(peb, ebev, pidl, uFlags, hr, p, cr, f, co)
static ICommDlgBrowser3Impl * create_commdlgbrowser3(void)
static HRESULT ebrowser_browse_to_desktop(IExplorerBrowser *peb)
static const IExplorerPaneVisibilityVtbl epvvt
static IExplorerPaneVisibilityImpl * create_explorerpanevisibility(void)
static HRESULT WINAPI IExplorerBrowserEvents_fnOnNavigationFailed(IExplorerBrowserEvents *iface, PCIDLIST_ABSOLUTE pidlFolder)
static IServiceProviderImpl * create_serviceprovider(void)
#define test_qinterface(iid, exp)
static BOOL test_instantiate_control(void)
static void test_Advise(void)
static void test_basics(void)
static void test_GetCurrentView(void)
#define test_browse_pidl_sb(peb, ebev, pidl, uFlags, hr, p, cr, f, co)
static HRESULT WINAPI ICommDlgBrowser3_fnOnStateChange(ICommDlgBrowser3 *iface, IShellView *shv, ULONG uChange)
static ULONG WINAPI ICommDlgBrowser3_fnRelease(ICommDlgBrowser3 *iface)
double pow(double x, double y)
GLuint GLuint GLsizei count
GLenum GLuint GLenum GLsizei const GLchar * buf
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
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
static PEXPLICIT_ACCESSW *static HMODULE hmod
const IID IID_IObjectWithSite
static CookieInternal * cookies
const GUID IID_IViewObject
const GUID IID_IConnectionPointContainer
const GUID IID_IConnectionPoint
const GUID IID_IOleWindow
const GUID IID_IViewObject2
const GUID IID_IOleObject
void WINAPI ILFree(LPITEMIDLIST pidl)
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
#define IInputObject_TranslateAcceleratorIO(p, a)
#define IInputObject_HasFocusIO(p)
#define IInputObject_Release(p)
#define IInputObject_UIActivateIO(p, a, b)
enum tagEXPLORER_BROWSER_OPTIONS EXPLORER_BROWSER_OPTIONS
EXPLORERPANE * REFEXPLORERPANE
#define FCIDM_TB_SMALLICON
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
ICommDlgBrowser3 ICommDlgBrowser3_iface
IExplorerBrowserEvents IExplorerBrowserEvents_iface
IExplorerPaneVisibility IExplorerPaneVisibility_iface
IServiceProvider IServiceProvider_iface
struct IServiceProviderImpl::services * interfaces
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define CONTAINING_RECORD(address, type, field)
#define REGDB_E_CLASSNOTREG
#define HRESULT_FROM_WIN32(x)
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define GetWindowLongPtrW
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define WS_EX_CONTROLPARENT
int WINAPI GetClassNameA(_In_ HWND hWnd, _Out_writes_to_(nMaxCount, return) LPSTR lpClassName, _In_ int nMaxCount)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR 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 SetRectEmpty(_Out_ LPRECT)
HWND WINAPI GetParent(_In_ HWND)
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
HDWP WINAPI BeginDeferWindowPos(_In_ int)