34 WCHAR five[] = {
'5',0};
35 WCHAR *found_name, *exp_name;
44 hres = IMoniker_GetDisplayName(
dummy, bindctx,
NULL, &exp_name);
48 ok(
hres ==
S_OK,
"HlinkCreateBrowseContext failed: 0x%08x\n",
hres);
60 hres = IHlinkBrowseContext_GetHlink(
bc, HLID_PREVIOUS, &found_hlink);
63 hres = IHlinkBrowseContext_GetHlink(
bc, HLID_NEXT, &found_hlink);
66 hres = IHlinkBrowseContext_GetHlink(
bc, HLID_CURRENT, &found_hlink);
69 hres = IHlink_GetMonikerReference(found_hlink, HLINKGETREF_DEFAULT, &found_moniker,
NULL);
72 hres = IMoniker_GetDisplayName(found_moniker, bindctx,
NULL, &found_name);
79 IBindCtx_Release(bindctx);
80 IMoniker_Release(found_moniker);
81 IHlink_Release(found_hlink);
82 IHlinkBrowseContext_Release(
bc);
83 IMoniker_Release(
dummy);
89 HLBWINFO bwinfo_set, bwinfo_get;
93 ok(
hres ==
S_OK,
"HlinkCreateBrowseContext failed: 0x%08x\n",
hres);
95 hres = IHlinkBrowseContext_GetBrowseWindowInfo(
bc,
NULL);
98 hres = IHlinkBrowseContext_SetBrowseWindowInfo(
bc,
NULL);
101 memset(&bwinfo_get, -1,
sizeof(HLBWINFO));
103 hres = IHlinkBrowseContext_GetBrowseWindowInfo(
bc, &bwinfo_get);
105 ok(bwinfo_get.cbSize == 0,
"Got wrong size: %x\n", bwinfo_get.cbSize);
107 bwinfo_set.cbSize =
sizeof(HLBWINFO);
108 bwinfo_set.grfHLBWIF = HLBWIF_WEBTOOLBARHIDDEN;
109 bwinfo_set.rcFramePos.left = 1;
110 bwinfo_set.rcFramePos.right = 2;
111 bwinfo_set.rcFramePos.top = 3;
112 bwinfo_set.rcFramePos.bottom = 4;
113 bwinfo_set.rcDocPos.left = 5;
114 bwinfo_set.rcDocPos.right = 6;
115 bwinfo_set.rcDocPos.top = 7;
116 bwinfo_set.rcDocPos.bottom = 8;
117 bwinfo_set.hltbinfo.uDockType = 4321;
118 bwinfo_set.hltbinfo.rcTbPos.left = 9;
119 bwinfo_set.hltbinfo.rcTbPos.right = 10;
120 bwinfo_set.hltbinfo.rcTbPos.top = 11;
121 bwinfo_set.hltbinfo.rcTbPos.bottom = 12;
122 hres = IHlinkBrowseContext_SetBrowseWindowInfo(
bc, &bwinfo_set);
125 memset(&bwinfo_get, 0,
sizeof(HLBWINFO));
127 hres = IHlinkBrowseContext_GetBrowseWindowInfo(
bc, &bwinfo_get);
129 ok(!
memcmp(&bwinfo_set, &bwinfo_get,
sizeof(HLBWINFO)),
"Set and Get differ\n");
131 IHlinkBrowseContext_Release(
bc);
170 WCHAR five[] = {
'5',0};
178 ok(
hres ==
S_OK,
"HlinkCreateBrowseContext() failed: 0x%08x\n",
hres);
188 ok(unk == &
Unknown,
"wrong object returned\n");
196 IHlinkBrowseContext_Release(
bc);
197 IMoniker_Release(
dummy);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI HlinkCreateBrowseContext(IUnknown *piunkOuter, REFIID riid, void **ppvObj)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
HRESULT WINAPI CreateItemMoniker(LPCOLESTR lpszDelim, LPCOLESTR lpszItem, IMoniker **ppmk)
static void test_GetObject(void)
static ULONG WINAPI Unknown_AddRef(IUnknown *iface)
static IUnknownVtbl UnknownVtbl
static void test_SetInitialHlink(void)
static HRESULT WINAPI Unknown_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
static void test_BrowseWindowInfo(void)
static ULONG WINAPI Unknown_Release(IUnknown *iface)
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC *ppbc)
#define IsEqualIID(riid1, riid2)
#define CO_E_ALREADYINITIALIZED