2 * Implementation of IWebBrowser interface for WebBrowser control
4 * Copyright 2001 John R. Sheets (for CodeWeavers)
5 * Copyright 2005 Jacek Caban
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
27 #include "wine/debug.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(ieframe
);
31 static inline WebBrowser
*impl_from_IUnknown(IUnknown
*iface
)
33 return CONTAINING_RECORD(iface
, WebBrowser
, IUnknown_inner
);
36 static HRESULT WINAPI
WebBrowser_QueryInterface(IUnknown
*iface
, REFIID riid
, void **ppv
)
38 WebBrowser
*This
= impl_from_IUnknown(iface
);
44 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
45 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
46 *ppv
= &This
->IUnknown_inner
;
47 }else if(IsEqualGUID(&IID_IDispatch
, riid
)) {
48 TRACE("(%p)->(IID_IDispatch %p)\n", This
, ppv
);
49 *ppv
= &This
->IWebBrowser2_iface
;
50 }else if(IsEqualGUID(&IID_IWebBrowser
, riid
)) {
51 TRACE("(%p)->(IID_IWebBrowser %p)\n", This
, ppv
);
52 *ppv
= &This
->IWebBrowser2_iface
;
53 }else if(IsEqualGUID(&IID_IWebBrowserApp
, riid
)) {
54 TRACE("(%p)->(IID_IWebBrowserApp %p)\n", This
, ppv
);
55 *ppv
= &This
->IWebBrowser2_iface
;
56 }else if(IsEqualGUID(&IID_IWebBrowser2
, riid
)) {
57 TRACE("(%p)->(IID_IWebBrowser2 %p)\n", This
, ppv
);
58 *ppv
= &This
->IWebBrowser2_iface
;
59 }else if(IsEqualGUID(&IID_IOleObject
, riid
)) {
60 TRACE("(%p)->(IID_IOleObject %p)\n", This
, ppv
);
61 *ppv
= &This
->IOleObject_iface
;
62 }else if(IsEqualGUID(&IID_IOleWindow
, riid
)) {
63 TRACE("(%p)->(IID_IOleWindow %p)\n", This
, ppv
);
64 *ppv
= &This
->IOleInPlaceObject_iface
;
65 }else if(IsEqualGUID (&IID_IOleInPlaceObject
, riid
)) {
66 TRACE("(%p)->(IID_IOleInPlaceObject %p)\n", This
, ppv
);
67 *ppv
= &This
->IOleInPlaceObject_iface
;
68 }else if(IsEqualGUID(&IID_IOleControl
, riid
)) {
69 TRACE("(%p)->(IID_IOleControl %p)\n", This
, ppv
);
70 *ppv
= &This
->IOleControl_iface
;
71 }else if(IsEqualGUID(&IID_IPersist
, riid
)) {
72 TRACE("(%p)->(IID_IPersist %p)\n", This
, ppv
);
73 *ppv
= &This
->IPersistStorage_iface
;
74 }else if(IsEqualGUID(&IID_IPersistStorage
, riid
)) {
75 TRACE("(%p)->(IID_IPersistStorage %p)\n", This
, ppv
);
76 *ppv
= &This
->IPersistStorage_iface
;
77 }else if(IsEqualGUID(&IID_IPersistMemory
, riid
)) {
78 TRACE("(%p)->(IID_IPersistStorage %p)\n", This
, ppv
);
79 *ppv
= &This
->IPersistMemory_iface
;
80 }else if(IsEqualGUID (&IID_IPersistStreamInit
, riid
)) {
81 TRACE("(%p)->(IID_IPersistStreamInit %p)\n", This
, ppv
);
82 *ppv
= &This
->IPersistStreamInit_iface
;
83 }else if(IsEqualGUID(&IID_IProvideClassInfo
, riid
)) {
84 TRACE("(%p)->(IID_IProvideClassInfo %p)\n", This
, ppv
);
85 *ppv
= &This
->IProvideClassInfo2_iface
;
86 }else if(IsEqualGUID(&IID_IProvideClassInfo2
, riid
)) {
87 TRACE("(%p)->(IID_IProvideClassInfo2 %p)\n", This
, ppv
);
88 *ppv
= &This
->IProvideClassInfo2_iface
;
89 }else if(IsEqualGUID(&IID_IConnectionPointContainer
, riid
)) {
90 TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This
, ppv
);
91 *ppv
= &This
->doc_host
.cps
.IConnectionPointContainer_iface
;
92 }else if(IsEqualGUID(&IID_IViewObject
, riid
)) {
93 TRACE("(%p)->(IID_IViewObject %p)\n", This
, ppv
);
94 *ppv
= &This
->IViewObject2_iface
;
95 }else if(IsEqualGUID(&IID_IViewObject2
, riid
)) {
96 TRACE("(%p)->(IID_IViewObject2 %p)\n", This
, ppv
);
97 *ppv
= &This
->IViewObject2_iface
;
98 }else if(IsEqualGUID(&IID_IOleInPlaceActiveObject
, riid
)) {
99 TRACE("(%p)->(IID_IOleInPlaceActiveObject %p)\n", This
, ppv
);
100 *ppv
= &This
->IOleInPlaceActiveObject_iface
;
101 }else if(IsEqualGUID(&IID_IOleCommandTarget
, riid
)) {
102 TRACE("(%p)->(IID_IOleCommandTarget %p)\n", This
, ppv
);
103 *ppv
= &This
->IOleCommandTarget_iface
;
104 }else if(IsEqualGUID(&IID_IServiceProvider
, riid
)) {
105 *ppv
= &This
->IServiceProvider_iface
;
106 TRACE("(%p)->(IID_IServiceProvider %p)\n", This
, ppv
);
107 }else if(IsEqualGUID(&IID_IDataObject
, riid
)) {
108 *ppv
= &This
->IDataObject_iface
;
109 TRACE("(%p)->(IID_IDataObject %p)\n", This
, ppv
);
110 }else if(IsEqualGUID(&IID_IQuickActivate
, riid
)) {
111 TRACE("(%p)->(IID_IQuickActivate %p) returning NULL\n", This
, ppv
);
112 return E_NOINTERFACE
;
113 }else if(IsEqualGUID(&IID_IRunnableObject
, riid
)) {
114 TRACE("(%p)->(IID_IRunnableObject %p) returning NULL\n", This
, ppv
);
115 return E_NOINTERFACE
;
116 }else if(IsEqualGUID(&IID_IPerPropertyBrowsing
, riid
)) {
117 TRACE("(%p)->(IID_IPerPropertyBrowsing %p) returning NULL\n", This
, ppv
);
118 return E_NOINTERFACE
;
119 }else if(IsEqualGUID(&IID_IOleCache
, riid
)) {
120 TRACE("(%p)->(IID_IOleCache %p) returning NULL\n", This
, ppv
);
121 return E_NOINTERFACE
;
122 }else if(IsEqualGUID(&IID_IOleInPlaceSite
, riid
)) {
123 TRACE("(%p)->(IID_IOleInPlaceSite %p) returning NULL\n", This
, ppv
);
124 return E_NOINTERFACE
;
125 }else if(IsEqualGUID(&IID_IObjectWithSite
, riid
)) {
126 TRACE("(%p)->(IID_IObjectWithSite %p) returning NULL\n", This
, ppv
);
127 return E_NOINTERFACE
;
128 }else if(IsEqualGUID(&IID_IViewObjectEx
, riid
)) {
129 TRACE("(%p)->(IID_IViewObjectEx %p) returning NULL\n", This
, ppv
);
130 return E_NOINTERFACE
;
131 }else if(IsEqualGUID(&IID_IOleLink
, riid
)) {
132 TRACE("(%p)->(IID_IOleLink %p) returning NULL\n", This
, ppv
);
133 return E_NOINTERFACE
;
134 }else if(IsEqualGUID(&IID_IMarshal
, riid
)) {
135 TRACE("(%p)->(IID_IMarshal %p) returning NULL\n", This
, ppv
);
136 return E_NOINTERFACE
;
137 }else if(IsEqualGUID(&IID_IStdMarshalInfo
, riid
)) {
138 /* This is implemented since IE10 */
139 WARN("(%p)->(IID_IStdMarshalInfo %p) returning NULL\n", This
, ppv
);
140 return E_NOINTERFACE
;
141 }else if(HlinkFrame_QI(&This
->hlink_frame
, riid
, ppv
)) {
146 IUnknown_AddRef((IUnknown
*)*ppv
);
150 FIXME("(%p)->(%s %p) interface not supported\n", This
, debugstr_guid(riid
), ppv
);
151 return E_NOINTERFACE
;
154 static ULONG WINAPI
WebBrowser_AddRef(IUnknown
*iface
)
156 WebBrowser
*This
= impl_from_IUnknown(iface
);
157 LONG ref
= InterlockedIncrement(&This
->ref
);
158 TRACE("(%p) ref=%d\n", This
, ref
);
162 static ULONG WINAPI
WebBrowser_Release(IUnknown
*iface
)
164 WebBrowser
*This
= impl_from_IUnknown(iface
);
165 LONG ref
= InterlockedDecrement(&This
->ref
);
167 TRACE("(%p) ref=%d\n", This
, ref
);
171 IAdviseSink_Release(This
->sink
);
173 if(This
->advise_holder
)
174 IOleAdviseHolder_Release(This
->advise_holder
);
176 if(This
->doc_host
.document
)
177 IUnknown_Release(This
->doc_host
.document
);
179 DocHost_Release(&This
->doc_host
);
181 WebBrowser_OleObject_Destroy(This
);
190 static const struct IUnknownVtbl internal_unk_vtbl
=
192 WebBrowser_QueryInterface
,
197 static inline WebBrowser
*impl_from_IWebBrowser2(IWebBrowser2
*iface
)
199 return CONTAINING_RECORD(iface
, WebBrowser
, IWebBrowser2_iface
);
202 static HRESULT WINAPI
WebBrowser2_QueryInterface(IWebBrowser2
*iface
, REFIID riid
, LPVOID
*ppv
)
204 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
206 return IUnknown_QueryInterface(This
->hlink_frame
.outer
, riid
, ppv
);
209 static ULONG WINAPI
WebBrowser2_AddRef(IWebBrowser2
*iface
)
211 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
213 return IUnknown_AddRef(This
->hlink_frame
.outer
);
216 static ULONG WINAPI
WebBrowser2_Release(IWebBrowser2
*iface
)
218 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
220 return IUnknown_Release(This
->hlink_frame
.outer
);
223 /* IDispatch methods */
224 static HRESULT WINAPI
WebBrowser_GetTypeInfoCount(IWebBrowser2
*iface
, UINT
*pctinfo
)
226 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
228 TRACE("(%p)->(%p)\n", This
, pctinfo
);
234 static HRESULT WINAPI
WebBrowser_GetTypeInfo(IWebBrowser2
*iface
, UINT iTInfo
, LCID lcid
,
237 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
241 TRACE("(%p)->(%d %d %p)\n", This
, iTInfo
, lcid
, ppTInfo
);
243 hres
= get_typeinfo(IWebBrowser2_tid
, &typeinfo
);
247 ITypeInfo_AddRef(typeinfo
);
252 static HRESULT WINAPI
WebBrowser_GetIDsOfNames(IWebBrowser2
*iface
, REFIID riid
,
253 LPOLESTR
*rgszNames
, UINT cNames
,
254 LCID lcid
, DISPID
*rgDispId
)
256 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
260 TRACE("(%p)->(%s %p %d %d %p)\n", This
, debugstr_guid(riid
), rgszNames
, cNames
,
263 hres
= get_typeinfo(IWebBrowser2_tid
, &typeinfo
);
267 return ITypeInfo_GetIDsOfNames(typeinfo
, rgszNames
, cNames
, rgDispId
);
270 static HRESULT WINAPI
WebBrowser_Invoke(IWebBrowser2
*iface
, DISPID dispIdMember
,
271 REFIID riid
, LCID lcid
, WORD wFlags
,
272 DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
,
273 EXCEPINFO
*pExepInfo
, UINT
*puArgErr
)
275 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
279 TRACE("(%p)->(%d %s %d %08x %p %p %p %p)\n", This
, dispIdMember
, debugstr_guid(riid
),
280 lcid
, wFlags
, pDispParams
, pVarResult
, pExepInfo
, puArgErr
);
282 hres
= get_typeinfo(IWebBrowser2_tid
, &typeinfo
);
286 return ITypeInfo_Invoke(typeinfo
, &This
->IWebBrowser2_iface
, dispIdMember
, wFlags
, pDispParams
,
287 pVarResult
, pExepInfo
, puArgErr
);
290 /* IWebBrowser methods */
291 static HRESULT WINAPI
WebBrowser_GoBack(IWebBrowser2
*iface
)
293 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
294 TRACE("(%p)\n", This
);
295 return go_back(&This
->doc_host
);
298 static HRESULT WINAPI
WebBrowser_GoForward(IWebBrowser2
*iface
)
300 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
301 TRACE("(%p)\n", This
);
302 return go_forward(&This
->doc_host
);
305 static HRESULT WINAPI
WebBrowser_GoHome(IWebBrowser2
*iface
)
307 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
308 TRACE("(%p)\n", This
);
309 return go_home(&This
->doc_host
);
312 static HRESULT WINAPI
WebBrowser_GoSearch(IWebBrowser2
*iface
)
314 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
315 FIXME("(%p)\n", This
);
319 static HRESULT WINAPI
WebBrowser_Navigate(IWebBrowser2
*iface
, BSTR szUrl
,
320 VARIANT
*Flags
, VARIANT
*TargetFrameName
,
321 VARIANT
*PostData
, VARIANT
*Headers
)
323 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
325 TRACE("(%p)->(%s %s %s %s %s)\n", This
, debugstr_w(szUrl
), debugstr_variant(Flags
),
326 debugstr_variant(TargetFrameName
), debugstr_variant(PostData
),
327 debugstr_variant(Headers
));
329 return navigate_url(&This
->doc_host
, szUrl
, Flags
, TargetFrameName
, PostData
, Headers
);
332 static HRESULT WINAPI
WebBrowser_Refresh(IWebBrowser2
*iface
)
334 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
336 TRACE("(%p)\n", This
);
338 return refresh_document(&This
->doc_host
, NULL
);
341 static HRESULT WINAPI
WebBrowser_Refresh2(IWebBrowser2
*iface
, VARIANT
*Level
)
343 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
345 TRACE("(%p)->(%s)\n", This
, debugstr_variant(Level
));
347 return refresh_document(&This
->doc_host
, Level
);
350 static HRESULT WINAPI
WebBrowser_Stop(IWebBrowser2
*iface
)
352 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
353 FIXME("(%p)\n", This
);
357 static HRESULT WINAPI
WebBrowser_get_Application(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
359 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
361 TRACE("(%p)->(%p)\n", This
, ppDisp
);
366 *ppDisp
= (IDispatch
*)&This
->IWebBrowser2_iface
;
367 IDispatch_AddRef(*ppDisp
);
371 static HRESULT WINAPI
WebBrowser_get_Parent(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
373 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
374 FIXME("(%p)->(%p)\n", This
, ppDisp
);
378 static HRESULT WINAPI
WebBrowser_get_Container(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
380 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
381 FIXME("(%p)->(%p)\n", This
, ppDisp
);
385 static HRESULT WINAPI
WebBrowser_get_Document(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
387 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
388 IDispatch
*disp
= NULL
;
390 TRACE("(%p)->(%p)\n", This
, ppDisp
);
392 if(This
->doc_host
.document
) {
395 hres
= IUnknown_QueryInterface(This
->doc_host
.document
, &IID_IDispatch
, (void**)&disp
);
396 if(SUCCEEDED(hres
)) {
399 /* Some broken apps cast returned IDispatch to IHTMLDocument2
400 * without QueryInterface call */
401 hres
= IDispatch_QueryInterface(disp
, &IID_IHTMLDocument2
, (void**)&html_doc
);
402 if(SUCCEEDED(hres
)) {
403 IDispatch_Release(disp
);
410 return disp
? S_OK
: S_FALSE
;
413 static HRESULT WINAPI
WebBrowser_get_TopLevelContainer(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
415 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
416 FIXME("(%p)->(%p)\n", This
, pBool
);
420 static HRESULT WINAPI
WebBrowser_get_Type(IWebBrowser2
*iface
, BSTR
*Type
)
422 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
423 FIXME("(%p)->(%p)\n", This
, Type
);
427 static HRESULT WINAPI
WebBrowser_get_Left(IWebBrowser2
*iface
, LONG
*pl
)
429 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
431 TRACE("(%p)->(%p)\n", This
, pl
);
433 *pl
= This
->pos_rect
.left
;
437 static HRESULT WINAPI
WebBrowser_put_Left(IWebBrowser2
*iface
, LONG Left
)
439 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
442 TRACE("(%p)->(%d)\n", This
, Left
);
447 rect
= This
->pos_rect
;
450 /* We don't really change the window position here.
451 * We just notify the embedder that he should do so. */
452 return IOleInPlaceSiteEx_OnPosRectChange(This
->inplace
, &rect
);
455 static HRESULT WINAPI
WebBrowser_get_Top(IWebBrowser2
*iface
, LONG
*pl
)
457 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
459 TRACE("(%p)->(%p)\n", This
, pl
);
461 *pl
= This
->pos_rect
.top
;
465 static HRESULT WINAPI
WebBrowser_put_Top(IWebBrowser2
*iface
, LONG Top
)
467 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
470 TRACE("(%p)->(%d)\n", This
, Top
);
475 rect
= This
->pos_rect
;
478 /* We don't really change the window position here.
479 * We just notify the embedder that he should do so. */
480 return IOleInPlaceSiteEx_OnPosRectChange(This
->inplace
, &rect
);
483 static HRESULT WINAPI
WebBrowser_get_Width(IWebBrowser2
*iface
, LONG
*pl
)
485 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
487 TRACE("(%p)->(%p)\n", This
, pl
);
489 *pl
= This
->pos_rect
.right
- This
->pos_rect
.left
;
493 static HRESULT WINAPI
WebBrowser_put_Width(IWebBrowser2
*iface
, LONG Width
)
495 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
498 TRACE("(%p)->(%d)\n", This
, Width
);
503 rect
= This
->pos_rect
;
504 rect
.right
= rect
.left
+Width
;
506 /* We don't really change the window size here.
507 * We just notify the embedder that he should do so. */
508 return IOleInPlaceSiteEx_OnPosRectChange(This
->inplace
, &rect
);
511 static HRESULT WINAPI
WebBrowser_get_Height(IWebBrowser2
*iface
, LONG
*pl
)
513 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
515 TRACE("(%p)->(%p)\n", This
, pl
);
517 *pl
= This
->pos_rect
.bottom
- This
->pos_rect
.top
;
521 static HRESULT WINAPI
WebBrowser_put_Height(IWebBrowser2
*iface
, LONG Height
)
523 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
526 TRACE("(%p)->(%d)\n", This
, Height
);
531 rect
= This
->pos_rect
;
532 rect
.bottom
= rect
.top
+Height
;
534 /* We don't really change the window size here.
535 * We just notify the embedder that he should do so. */
536 return IOleInPlaceSiteEx_OnPosRectChange(This
->inplace
, &rect
);
539 static HRESULT WINAPI
WebBrowser_get_LocationName(IWebBrowser2
*iface
, BSTR
*LocationName
)
541 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
542 FIXME("(%p)->(%p)\n", This
, LocationName
);
546 static HRESULT WINAPI
WebBrowser_get_LocationURL(IWebBrowser2
*iface
, BSTR
*LocationURL
)
548 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
550 TRACE("(%p)->(%p)\n", This
, LocationURL
);
552 return get_location_url(&This
->doc_host
, LocationURL
);
555 static HRESULT WINAPI
WebBrowser_get_Busy(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
557 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
559 TRACE("(%p)->(%p)\n", This
, pBool
);
561 *pBool
= This
->doc_host
.busy
;
565 static HRESULT WINAPI
WebBrowser_Quit(IWebBrowser2
*iface
)
567 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
569 TRACE("(%p)\n", This
);
571 /* It's a InternetExplorer specific method, we have nothing to do here. */
575 static HRESULT WINAPI
WebBrowser_ClientToWindow(IWebBrowser2
*iface
, int *pcx
, int *pcy
)
577 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
578 FIXME("(%p)->(%p %p)\n", This
, pcx
, pcy
);
582 static HRESULT WINAPI
WebBrowser_PutProperty(IWebBrowser2
*iface
, BSTR szProperty
, VARIANT vtValue
)
584 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
585 FIXME("(%p)->(%s %s)\n", This
, debugstr_w(szProperty
), debugstr_variant(&vtValue
));
589 static HRESULT WINAPI
WebBrowser_GetProperty(IWebBrowser2
*iface
, BSTR szProperty
, VARIANT
*pvtValue
)
591 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
592 FIXME("(%p)->(%s %s)\n", This
, debugstr_w(szProperty
), debugstr_variant(pvtValue
));
596 static HRESULT WINAPI
WebBrowser_get_Name(IWebBrowser2
*iface
, BSTR
*Name
)
598 static const WCHAR sName
[] = {'M','i','c','r','o','s','o','f','t',' ','W','e','b',
599 ' ','B','r','o','w','s','e','r',' ','C','o','n','t','r','o','l',0};
600 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
602 TRACE("(%p)->(%p)\n", This
, Name
);
604 *Name
= SysAllocString(sName
);
609 static HRESULT WINAPI
WebBrowser_get_HWND(IWebBrowser2
*iface
, SHANDLE_PTR
*pHWND
)
611 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
613 TRACE("(%p)->(%p)\n", This
, pHWND
);
615 /* WebBrowser control never has a frame window (in opposition to InternetExplorer) */
620 static HRESULT WINAPI
WebBrowser_get_FullName(IWebBrowser2
*iface
, BSTR
*FullName
)
622 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
623 FIXME("(%p)->(%p)\n", This
, FullName
);
627 static HRESULT WINAPI
WebBrowser_get_Path(IWebBrowser2
*iface
, BSTR
*Path
)
629 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
630 FIXME("(%p)->(%p)\n", This
, Path
);
634 static HRESULT WINAPI
WebBrowser_get_Visible(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
636 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
638 TRACE("(%p)->(%p)\n", This
, pBool
);
640 *pBool
= This
->visible
;
644 static HRESULT WINAPI
WebBrowser_put_Visible(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
646 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
648 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
650 TRACE("(%p)->(%x)\n", This
, Value
);
652 This
->visible
= Value
;
654 V_VT(&arg
) = VT_BOOL
;
655 V_BOOL(&arg
) = Value
;
656 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONVISIBLE
, &dispparams
);
661 static HRESULT WINAPI
WebBrowser_get_StatusBar(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
663 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
665 TRACE("(%p)->(%p)\n", This
, pBool
);
667 *pBool
= This
->status_bar
;
671 static HRESULT WINAPI
WebBrowser_put_StatusBar(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
673 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
675 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
677 TRACE("(%p)->(%x)\n", This
, Value
);
679 This
->status_bar
= Value
? VARIANT_TRUE
: VARIANT_FALSE
;
681 /* In opposition to InternetExplorer, all we should do here is
682 * inform the embedder about the status bar change. */
684 V_VT(&arg
) = VT_BOOL
;
685 V_BOOL(&arg
) = Value
;
686 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONSTATUSBAR
, &dispparams
);
691 static HRESULT WINAPI
WebBrowser_get_StatusText(IWebBrowser2
*iface
, BSTR
*StatusText
)
693 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
694 FIXME("(%p)->(%p)\n", This
, StatusText
);
698 static HRESULT WINAPI
WebBrowser_put_StatusText(IWebBrowser2
*iface
, BSTR StatusText
)
700 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
701 FIXME("(%p)->(%s)\n", This
, debugstr_w(StatusText
));
705 static HRESULT WINAPI
WebBrowser_get_ToolBar(IWebBrowser2
*iface
, int *Value
)
707 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
709 TRACE("(%p)->(%p)\n", This
, Value
);
711 *Value
= This
->tool_bar
;
715 static HRESULT WINAPI
WebBrowser_put_ToolBar(IWebBrowser2
*iface
, int Value
)
717 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
719 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
721 TRACE("(%p)->(%x)\n", This
, Value
);
723 This
->tool_bar
= Value
? VARIANT_TRUE
: VARIANT_FALSE
;
725 /* In opposition to InternetExplorer, all we should do here is
726 * inform the embedder about the tool bar change. */
728 V_VT(&arg
) = VT_BOOL
;
729 V_BOOL(&arg
) = This
->tool_bar
;
730 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONTOOLBAR
, &dispparams
);
735 static HRESULT WINAPI
WebBrowser_get_MenuBar(IWebBrowser2
*iface
, VARIANT_BOOL
*Value
)
737 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
739 TRACE("(%p)->(%p)\n", This
, Value
);
741 *Value
= This
->menu_bar
;
745 static HRESULT WINAPI
WebBrowser_put_MenuBar(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
747 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
749 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
751 TRACE("(%p)->(%x)\n", This
, Value
);
753 This
->menu_bar
= Value
? VARIANT_TRUE
: VARIANT_FALSE
;
755 /* In opposition to InternetExplorer, all we should do here is
756 * inform the embedder about the menu bar change. */
758 V_VT(&arg
) = VT_BOOL
;
759 V_BOOL(&arg
) = Value
;
760 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONMENUBAR
, &dispparams
);
765 static HRESULT WINAPI
WebBrowser_get_FullScreen(IWebBrowser2
*iface
, VARIANT_BOOL
*pbFullScreen
)
767 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
769 TRACE("(%p)->(%p)\n", This
, pbFullScreen
);
771 *pbFullScreen
= This
->full_screen
;
775 static HRESULT WINAPI
WebBrowser_put_FullScreen(IWebBrowser2
*iface
, VARIANT_BOOL bFullScreen
)
777 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
779 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
781 /* In opposition to InternetExplorer, all we should do here is
782 * inform the embedder about the fullscreen change. */
784 TRACE("(%p)->(%x)\n", This
, bFullScreen
);
786 This
->full_screen
= bFullScreen
? VARIANT_TRUE
: VARIANT_FALSE
;
788 V_VT(&arg
) = VT_BOOL
;
789 V_BOOL(&arg
) = bFullScreen
;
790 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONFULLSCREEN
, &dispparams
);
795 static HRESULT WINAPI
WebBrowser_Navigate2(IWebBrowser2
*iface
, VARIANT
*URL
, VARIANT
*Flags
,
796 VARIANT
*TargetFrameName
, VARIANT
*PostData
, VARIANT
*Headers
)
798 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
801 TRACE("(%p)->(%s %s %s %s %s)\n", This
, debugstr_variant(URL
), debugstr_variant(Flags
),
802 debugstr_variant(TargetFrameName
), debugstr_variant(PostData
), debugstr_variant(Headers
));
815 case VT_BSTR
|VT_BYREF
:
816 url
= *V_BSTRREF(URL
);
819 FIXME("Unsupported V_VT(URL) %d\n", V_VT(URL
));
823 return navigate_url(&This
->doc_host
, url
, Flags
, TargetFrameName
, PostData
, Headers
);
826 static HRESULT WINAPI
WebBrowser_QueryStatusWB(IWebBrowser2
*iface
, OLECMDID cmdID
, OLECMDF
*pcmdf
)
828 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
829 IOleCommandTarget
*target
= NULL
;
830 OLECMD ole_command
[1];
833 TRACE("(%p)->(%d %p)\n", This
, cmdID
, pcmdf
);
837 ole_command
[0].cmdID
= cmdID
;
838 ole_command
[0].cmdf
= *pcmdf
;
842 hres
= IOleContainer_QueryInterface(This
->container
, &IID_IOleCommandTarget
, (LPVOID
*)&target
);
846 if (!target
&& This
->doc_host
.document
)
848 hres
= IUnknown_QueryInterface(This
->doc_host
.document
, &IID_IOleCommandTarget
, (LPVOID
*)&target
);
856 hres
= IOleCommandTarget_QueryStatus(target
, NULL
, 1, ole_command
, NULL
);
858 *pcmdf
= ole_command
[0].cmdf
;
859 if (hres
== OLECMDERR_E_NOTSUPPORTED
)
864 IOleCommandTarget_Release(target
);
869 static HRESULT WINAPI
WebBrowser_ExecWB(IWebBrowser2
*iface
, OLECMDID cmdID
,
870 OLECMDEXECOPT cmdexecopt
, VARIANT
*pvaIn
, VARIANT
*pvaOut
)
872 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
873 IOleCommandTarget
*target
= NULL
;
876 TRACE("(%p)->(%d %d %s %p)\n", This
, cmdID
, cmdexecopt
, debugstr_variant(pvaIn
), pvaOut
);
880 hres
= IOleContainer_QueryInterface(This
->container
, &IID_IOleCommandTarget
, (LPVOID
*)&target
);
884 if(!target
&& This
->doc_host
.document
)
886 hres
= IUnknown_QueryInterface(This
->doc_host
.document
, &IID_IOleCommandTarget
, (LPVOID
*)&target
);
894 hres
= IOleCommandTarget_Exec(target
, NULL
, cmdID
, cmdexecopt
, pvaIn
, pvaOut
);
895 IOleCommandTarget_Release(target
);
900 static HRESULT WINAPI
WebBrowser_ShowBrowserBar(IWebBrowser2
*iface
, VARIANT
*pvaClsid
,
901 VARIANT
*pvarShow
, VARIANT
*pvarSize
)
903 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
904 FIXME("(%p)->(%s %s %s)\n", This
, debugstr_variant(pvaClsid
), debugstr_variant(pvarShow
),
905 debugstr_variant(pvarSize
));
909 static HRESULT WINAPI
WebBrowser_get_ReadyState(IWebBrowser2
*iface
, READYSTATE
*lpReadyState
)
911 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
913 TRACE("(%p)->(%p)\n", This
, lpReadyState
);
915 *lpReadyState
= This
->doc_host
.ready_state
;
919 static HRESULT WINAPI
WebBrowser_get_Offline(IWebBrowser2
*iface
, VARIANT_BOOL
*pbOffline
)
921 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
923 TRACE("(%p)->(%p)\n", This
, pbOffline
);
925 *pbOffline
= This
->doc_host
.offline
;
929 static HRESULT WINAPI
WebBrowser_put_Offline(IWebBrowser2
*iface
, VARIANT_BOOL bOffline
)
931 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
933 TRACE("(%p)->(%x)\n", This
, bOffline
);
935 This
->doc_host
.offline
= bOffline
? VARIANT_TRUE
: VARIANT_FALSE
;
939 static HRESULT WINAPI
WebBrowser_get_Silent(IWebBrowser2
*iface
, VARIANT_BOOL
*pbSilent
)
941 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
943 TRACE("(%p)->(%p)\n", This
, pbSilent
);
945 *pbSilent
= This
->doc_host
.silent
;
949 static HRESULT WINAPI
WebBrowser_put_Silent(IWebBrowser2
*iface
, VARIANT_BOOL bSilent
)
951 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
953 TRACE("(%p)->(%x)\n", This
, bSilent
);
955 This
->doc_host
.silent
= bSilent
? VARIANT_TRUE
: VARIANT_FALSE
;
959 static HRESULT WINAPI
WebBrowser_get_RegisterAsBrowser(IWebBrowser2
*iface
,
960 VARIANT_BOOL
*pbRegister
)
962 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
964 FIXME("(%p)->(%p)\n", This
, pbRegister
);
966 *pbRegister
= This
->register_browser
;
970 static HRESULT WINAPI
WebBrowser_put_RegisterAsBrowser(IWebBrowser2
*iface
,
971 VARIANT_BOOL bRegister
)
973 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
975 FIXME("(%p)->(%x)\n", This
, bRegister
);
977 This
->register_browser
= bRegister
? VARIANT_TRUE
: VARIANT_FALSE
;
981 static HRESULT WINAPI
WebBrowser_get_RegisterAsDropTarget(IWebBrowser2
*iface
,
982 VARIANT_BOOL
*pbRegister
)
984 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
986 FIXME("(%p)->(%p)\n", This
, pbRegister
);
995 static HRESULT WINAPI
WebBrowser_put_RegisterAsDropTarget(IWebBrowser2
*iface
,
996 VARIANT_BOOL bRegister
)
998 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
999 FIXME("(%p)->(%x)\n", This
, bRegister
);
1003 static HRESULT WINAPI
WebBrowser_get_TheaterMode(IWebBrowser2
*iface
, VARIANT_BOOL
*pbRegister
)
1005 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
1007 TRACE("(%p)->(%p)\n", This
, pbRegister
);
1009 *pbRegister
= This
->theater_mode
;
1013 static HRESULT WINAPI
WebBrowser_put_TheaterMode(IWebBrowser2
*iface
, VARIANT_BOOL bRegister
)
1015 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
1017 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
1019 TRACE("(%p)->(%x)\n", This
, bRegister
);
1021 This
->theater_mode
= bRegister
? VARIANT_TRUE
: VARIANT_FALSE
;
1023 /* In opposition to InternetExplorer, all we should do here is
1024 * inform the embedder about the theater mode change. */
1026 V_VT(&arg
) = VT_BOOL
;
1027 V_BOOL(&arg
) = bRegister
;
1028 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONTHEATERMODE
, &dispparams
);
1033 static HRESULT WINAPI
WebBrowser_get_AddressBar(IWebBrowser2
*iface
, VARIANT_BOOL
*Value
)
1035 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
1037 TRACE("(%p)->(%p)\n", This
, Value
);
1039 *Value
= This
->address_bar
;
1043 static HRESULT WINAPI
WebBrowser_put_AddressBar(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
1045 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
1047 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
1049 TRACE("(%p)->(%x)\n", This
, Value
);
1051 This
->address_bar
= Value
? VARIANT_TRUE
: VARIANT_FALSE
;
1053 /* In opposition to InternetExplorer, all we should do here is
1054 * inform the embedder about the address bar change. */
1056 V_VT(&arg
) = VT_BOOL
;
1057 V_BOOL(&arg
) = Value
;
1058 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONADDRESSBAR
, &dispparams
);
1063 static HRESULT WINAPI
WebBrowser_get_Resizable(IWebBrowser2
*iface
, VARIANT_BOOL
*Value
)
1065 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
1067 TRACE("(%p)->(%p)\n", This
, Value
);
1069 /* It's InternetExplorer object's method. We have nothing to do here. */
1073 static HRESULT WINAPI
WebBrowser_put_Resizable(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
1075 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
1077 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
1079 TRACE("(%p)->(%x)\n", This
, Value
);
1081 /* In opposition to InternetExplorer, all we should do here is
1082 * inform the embedder about the resizable change. */
1084 V_VT(&arg
) = VT_BOOL
;
1085 V_BOOL(&arg
) = Value
;
1086 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_WINDOWSETRESIZABLE
, &dispparams
);
1091 static const IWebBrowser2Vtbl WebBrowser2Vtbl
=
1093 WebBrowser2_QueryInterface
,
1095 WebBrowser2_Release
,
1096 WebBrowser_GetTypeInfoCount
,
1097 WebBrowser_GetTypeInfo
,
1098 WebBrowser_GetIDsOfNames
,
1101 WebBrowser_GoForward
,
1103 WebBrowser_GoSearch
,
1104 WebBrowser_Navigate
,
1106 WebBrowser_Refresh2
,
1108 WebBrowser_get_Application
,
1109 WebBrowser_get_Parent
,
1110 WebBrowser_get_Container
,
1111 WebBrowser_get_Document
,
1112 WebBrowser_get_TopLevelContainer
,
1113 WebBrowser_get_Type
,
1114 WebBrowser_get_Left
,
1115 WebBrowser_put_Left
,
1118 WebBrowser_get_Width
,
1119 WebBrowser_put_Width
,
1120 WebBrowser_get_Height
,
1121 WebBrowser_put_Height
,
1122 WebBrowser_get_LocationName
,
1123 WebBrowser_get_LocationURL
,
1124 WebBrowser_get_Busy
,
1126 WebBrowser_ClientToWindow
,
1127 WebBrowser_PutProperty
,
1128 WebBrowser_GetProperty
,
1129 WebBrowser_get_Name
,
1130 WebBrowser_get_HWND
,
1131 WebBrowser_get_FullName
,
1132 WebBrowser_get_Path
,
1133 WebBrowser_get_Visible
,
1134 WebBrowser_put_Visible
,
1135 WebBrowser_get_StatusBar
,
1136 WebBrowser_put_StatusBar
,
1137 WebBrowser_get_StatusText
,
1138 WebBrowser_put_StatusText
,
1139 WebBrowser_get_ToolBar
,
1140 WebBrowser_put_ToolBar
,
1141 WebBrowser_get_MenuBar
,
1142 WebBrowser_put_MenuBar
,
1143 WebBrowser_get_FullScreen
,
1144 WebBrowser_put_FullScreen
,
1145 WebBrowser_Navigate2
,
1146 WebBrowser_QueryStatusWB
,
1148 WebBrowser_ShowBrowserBar
,
1149 WebBrowser_get_ReadyState
,
1150 WebBrowser_get_Offline
,
1151 WebBrowser_put_Offline
,
1152 WebBrowser_get_Silent
,
1153 WebBrowser_put_Silent
,
1154 WebBrowser_get_RegisterAsBrowser
,
1155 WebBrowser_put_RegisterAsBrowser
,
1156 WebBrowser_get_RegisterAsDropTarget
,
1157 WebBrowser_put_RegisterAsDropTarget
,
1158 WebBrowser_get_TheaterMode
,
1159 WebBrowser_put_TheaterMode
,
1160 WebBrowser_get_AddressBar
,
1161 WebBrowser_put_AddressBar
,
1162 WebBrowser_get_Resizable
,
1163 WebBrowser_put_Resizable
1166 static inline WebBrowser
*impl_from_IServiceProvider(IServiceProvider
*iface
)
1168 return CONTAINING_RECORD(iface
, WebBrowser
, IServiceProvider_iface
);
1171 static HRESULT WINAPI
WBServiceProvider_QueryInterface(IServiceProvider
*iface
,
1172 REFIID riid
, LPVOID
*ppv
)
1174 WebBrowser
*This
= impl_from_IServiceProvider(iface
);
1175 return IUnknown_QueryInterface(This
->hlink_frame
.outer
, riid
, ppv
);
1178 static ULONG WINAPI
WBServiceProvider_AddRef(IServiceProvider
*iface
)
1180 WebBrowser
*This
= impl_from_IServiceProvider(iface
);
1181 return IUnknown_AddRef(This
->hlink_frame
.outer
);
1184 static ULONG WINAPI
WBServiceProvider_Release(IServiceProvider
*iface
)
1186 WebBrowser
*This
= impl_from_IServiceProvider(iface
);
1187 return IUnknown_Release(This
->hlink_frame
.outer
);
1190 static HRESULT STDMETHODCALLTYPE
WBServiceProvider_QueryService(IServiceProvider
*iface
,
1191 REFGUID guidService
, REFIID riid
, void **ppv
)
1193 WebBrowser
*This
= impl_from_IServiceProvider(iface
);
1195 if(IsEqualGUID(&SID_SHTMLWindow
, riid
)) {
1196 TRACE("(%p)->(SID_SHTMLWindow)\n", This
);
1197 return IHTMLWindow2_QueryInterface(&This
->doc_host
.html_window
.IHTMLWindow2_iface
, riid
, ppv
);
1200 if(IsEqualGUID(&IID_IBrowserService2
, riid
)) {
1201 TRACE("(%p)->(IID_IBrowserService2 return E_FAIL)\n", This
);
1206 FIXME("(%p)->(%s, %s %p)\n", This
, debugstr_guid(guidService
), debugstr_guid(riid
), ppv
);
1208 return E_NOINTERFACE
;
1211 static const IServiceProviderVtbl ServiceProviderVtbl
=
1213 WBServiceProvider_QueryInterface
,
1214 WBServiceProvider_AddRef
,
1215 WBServiceProvider_Release
,
1216 WBServiceProvider_QueryService
1219 static inline WebBrowser
*impl_from_DocHost(DocHost
*iface
)
1221 return CONTAINING_RECORD(iface
, WebBrowser
, doc_host
);
1224 static ULONG
WebBrowser_addref(DocHost
*iface
)
1226 WebBrowser
*This
= impl_from_DocHost(iface
);
1227 return IUnknown_AddRef(This
->hlink_frame
.outer
);
1230 static ULONG
WebBrowser_release(DocHost
*iface
)
1232 WebBrowser
*This
= impl_from_DocHost(iface
);
1233 return IUnknown_Release(This
->hlink_frame
.outer
);
1236 static void DocHostContainer_get_docobj_rect(DocHost
*This
, RECT
*rc
)
1238 GetClientRect(This
->frame_hwnd
, rc
);
1241 static HRESULT
DocHostContainer_set_status_text(DocHost
*This
, const WCHAR
*text
)
1246 static void DocHostContainer_on_command_state_change(DocHost
*This
, LONG command
, BOOL enable
)
1250 static void DocHostContainer_set_url(DocHost
*This
, const WCHAR
*url
)
1254 static const IDocHostContainerVtbl DocHostContainerVtbl
= {
1257 DocHostContainer_get_docobj_rect
,
1258 DocHostContainer_set_status_text
,
1259 DocHostContainer_on_command_state_change
,
1260 DocHostContainer_set_url
1263 static HRESULT
create_webbrowser(int version
, IUnknown
*outer
, REFIID riid
, void **ppv
)
1268 TRACE("(%p %s %p) version=%d\n", outer
, debugstr_guid(riid
), ppv
, version
);
1270 if (outer
&& !IsEqualIID(riid
, &IID_IUnknown
))
1271 return CLASS_E_NOAGGREGATION
;
1273 ret
= heap_alloc_zero(sizeof(WebBrowser
));
1275 ret
->IUnknown_inner
.lpVtbl
= &internal_unk_vtbl
;
1276 ret
->IWebBrowser2_iface
.lpVtbl
= &WebBrowser2Vtbl
;
1277 ret
->IServiceProvider_iface
.lpVtbl
= &ServiceProviderVtbl
;
1279 ret
->version
= version
;
1281 HlinkFrame_Init(&ret
->hlink_frame
, outer
? outer
: &ret
->IUnknown_inner
, &ret
->doc_host
);
1282 DocHost_Init(&ret
->doc_host
, &ret
->IWebBrowser2_iface
, &DocHostContainerVtbl
);
1284 ret
->visible
= VARIANT_TRUE
;
1285 ret
->menu_bar
= VARIANT_TRUE
;
1286 ret
->address_bar
= VARIANT_TRUE
;
1287 ret
->status_bar
= VARIANT_TRUE
;
1288 ret
->tool_bar
= VARIANT_TRUE
;
1290 WebBrowser_OleObject_Init(ret
);
1291 WebBrowser_ViewObject_Init(ret
);
1292 WebBrowser_Persist_Init(ret
);
1293 WebBrowser_ClassInfo_Init(ret
);
1297 hres
= IUnknown_QueryInterface(&ret
->IUnknown_inner
, riid
, ppv
);
1299 IUnknown_Release(&ret
->IUnknown_inner
);
1303 HRESULT WINAPI
WebBrowserV1_Create(IClassFactory
*iface
, IUnknown
*pOuter
, REFIID riid
, void **ppv
)
1305 return create_webbrowser(1, pOuter
, riid
, ppv
);
1308 HRESULT WINAPI
WebBrowser_Create(IClassFactory
*iface
, IUnknown
*pOuter
, REFIID riid
, void **ppv
)
1310 return create_webbrowser(2, pOuter
, riid
, ppv
);