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
22 #include "wine/debug.h"
27 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw
);
29 static inline WebBrowser
*impl_from_IWebBrowser2(IWebBrowser2
*iface
)
31 return CONTAINING_RECORD(iface
, WebBrowser
, IWebBrowser2_iface
);
34 static HRESULT WINAPI
WebBrowser_QueryInterface(IWebBrowser2
*iface
, REFIID riid
, LPVOID
*ppv
)
36 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
42 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
43 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
44 *ppv
= &This
->IWebBrowser2_iface
;
45 }else if(IsEqualGUID(&IID_IDispatch
, riid
)) {
46 TRACE("(%p)->(IID_IDispatch %p)\n", This
, ppv
);
47 *ppv
= &This
->IWebBrowser2_iface
;
48 }else if(IsEqualGUID(&IID_IWebBrowser
, riid
)) {
49 TRACE("(%p)->(IID_IWebBrowser %p)\n", This
, ppv
);
50 *ppv
= &This
->IWebBrowser2_iface
;
51 }else if(IsEqualGUID(&IID_IWebBrowserApp
, riid
)) {
52 TRACE("(%p)->(IID_IWebBrowserApp %p)\n", This
, ppv
);
53 *ppv
= &This
->IWebBrowser2_iface
;
54 }else if(IsEqualGUID(&IID_IWebBrowser2
, riid
)) {
55 TRACE("(%p)->(IID_IWebBrowser2 %p)\n", This
, ppv
);
56 *ppv
= &This
->IWebBrowser2_iface
;
57 }else if(IsEqualGUID(&IID_IOleObject
, riid
)) {
58 TRACE("(%p)->(IID_IOleObject %p)\n", This
, ppv
);
59 *ppv
= &This
->IOleObject_iface
;
60 }else if(IsEqualGUID(&IID_IOleWindow
, riid
)) {
61 TRACE("(%p)->(IID_IOleWindow %p)\n", This
, ppv
);
62 *ppv
= &This
->IOleInPlaceObject_iface
;
63 }else if(IsEqualGUID (&IID_IOleInPlaceObject
, riid
)) {
64 TRACE("(%p)->(IID_IOleInPlaceObject %p)\n", This
, ppv
);
65 *ppv
= &This
->IOleInPlaceObject_iface
;
66 }else if(IsEqualGUID(&IID_IOleControl
, riid
)) {
67 TRACE("(%p)->(IID_IOleControl %p)\n", This
, ppv
);
68 *ppv
= &This
->IOleControl_iface
;
69 }else if(IsEqualGUID(&IID_IPersist
, riid
)) {
70 TRACE("(%p)->(IID_IPersist %p)\n", This
, ppv
);
71 *ppv
= &This
->IPersistStorage_iface
;
72 }else if(IsEqualGUID(&IID_IPersistStorage
, riid
)) {
73 TRACE("(%p)->(IID_IPersistStorage %p)\n", This
, ppv
);
74 *ppv
= &This
->IPersistStorage_iface
;
75 }else if(IsEqualGUID(&IID_IPersistMemory
, riid
)) {
76 TRACE("(%p)->(IID_IPersistStorage %p)\n", This
, ppv
);
77 *ppv
= &This
->IPersistMemory_iface
;
78 }else if(IsEqualGUID (&IID_IPersistStreamInit
, riid
)) {
79 TRACE("(%p)->(IID_IPersistStreamInit %p)\n", This
, ppv
);
80 *ppv
= &This
->IPersistStreamInit_iface
;
81 }else if(IsEqualGUID(&IID_IProvideClassInfo
, riid
)) {
82 TRACE("(%p)->(IID_IProvideClassInfo %p)\n", This
, ppv
);
83 *ppv
= &This
->IProvideClassInfo2_iface
;
84 }else if(IsEqualGUID(&IID_IProvideClassInfo2
, riid
)) {
85 TRACE("(%p)->(IID_IProvideClassInfo2 %p)\n", This
, ppv
);
86 *ppv
= &This
->IProvideClassInfo2_iface
;
87 }else if(IsEqualGUID(&IID_IConnectionPointContainer
, riid
)) {
88 TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This
, ppv
);
89 *ppv
= &This
->doc_host
.cps
.IConnectionPointContainer_iface
;
90 }else if(IsEqualGUID(&IID_IViewObject
, riid
)) {
91 TRACE("(%p)->(IID_IViewObject %p)\n", This
, ppv
);
92 *ppv
= &This
->IViewObject2_iface
;
93 }else if(IsEqualGUID(&IID_IViewObject2
, riid
)) {
94 TRACE("(%p)->(IID_IViewObject2 %p)\n", This
, ppv
);
95 *ppv
= &This
->IViewObject2_iface
;
96 }else if(IsEqualGUID(&IID_IOleInPlaceActiveObject
, riid
)) {
97 TRACE("(%p)->(IID_IOleInPlaceActiveObject %p)\n", This
, ppv
);
98 *ppv
= &This
->IOleInPlaceActiveObject_iface
;
99 }else if(IsEqualGUID(&IID_IOleCommandTarget
, riid
)) {
100 TRACE("(%p)->(IID_IOleCommandTarget %p)\n", This
, ppv
);
101 *ppv
= &This
->IOleCommandTarget_iface
;
102 }else if(IsEqualGUID(&IID_IServiceProvider
, riid
)) {
103 *ppv
= &This
->IServiceProvider_iface
;
104 TRACE("(%p)->(IID_IServiceProvider %p)\n", This
, ppv
);
105 }else if(IsEqualGUID(&IID_IDataObject
, riid
)) {
106 *ppv
= &This
->IDataObject_iface
;
107 TRACE("(%p)->(IID_IDataObject %p)\n", This
, ppv
);
108 }else if(IsEqualGUID(&IID_IQuickActivate
, riid
)) {
109 TRACE("(%p)->(IID_IQuickActivate %p) returning NULL\n", This
, ppv
);
110 return E_NOINTERFACE
;
111 }else if(IsEqualGUID(&IID_IRunnableObject
, riid
)) {
112 TRACE("(%p)->(IID_IRunnableObject %p) returning NULL\n", This
, ppv
);
113 return E_NOINTERFACE
;
114 }else if(IsEqualGUID(&IID_IPerPropertyBrowsing
, riid
)) {
115 TRACE("(%p)->(IID_IPerPropertyBrowsing %p) returning NULL\n", This
, ppv
);
116 return E_NOINTERFACE
;
117 }else if(IsEqualGUID(&IID_IOleCache
, riid
)) {
118 TRACE("(%p)->(IID_IOleCache %p) returning NULL\n", This
, ppv
);
119 return E_NOINTERFACE
;
120 }else if(IsEqualGUID(&IID_IOleInPlaceSite
, riid
)) {
121 TRACE("(%p)->(IID_IOleInPlaceSite %p) returning NULL\n", This
, ppv
);
122 return E_NOINTERFACE
;
123 }else if(IsEqualGUID(&IID_IObjectWithSite
, riid
)) {
124 TRACE("(%p)->(IID_IObjectWithSite %p) returning NULL\n", This
, ppv
);
125 return E_NOINTERFACE
;
126 }else if(IsEqualGUID(&IID_IViewObjectEx
, riid
)) {
127 TRACE("(%p)->(IID_IViewObjectEx %p) returning NULL\n", This
, ppv
);
128 return E_NOINTERFACE
;
129 }else if(IsEqualGUID(&IID_IOleLink
, riid
)) {
130 TRACE("(%p)->(IID_IOleLink %p) returning NULL\n", This
, ppv
);
131 return E_NOINTERFACE
;
132 }else if(IsEqualGUID(&IID_IMarshal
, riid
)) {
133 TRACE("(%p)->(IID_IMarshal %p) returning NULL\n", This
, ppv
);
134 return E_NOINTERFACE
;
135 }else if(IsEqualGUID(&IID_IStdMarshalInfo
, riid
)) {
136 TRACE("(%p)->(IID_IStdMarshalInfo %p) returning NULL\n", This
, ppv
);
137 return E_NOINTERFACE
;
138 }else if(HlinkFrame_QI(&This
->hlink_frame
, riid
, ppv
)) {
143 IUnknown_AddRef((IUnknown
*)*ppv
);
147 FIXME("(%p)->(%s %p) interface not supported\n", This
, debugstr_guid(riid
), ppv
);
148 return E_NOINTERFACE
;
151 static ULONG WINAPI
WebBrowser_AddRef(IWebBrowser2
*iface
)
153 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
154 LONG ref
= InterlockedIncrement(&This
->ref
);
155 TRACE("(%p) ref=%d\n", This
, ref
);
159 static ULONG WINAPI
WebBrowser_Release(IWebBrowser2
*iface
)
161 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
162 LONG ref
= InterlockedDecrement(&This
->ref
);
164 TRACE("(%p) ref=%d\n", This
, ref
);
167 if(This
->doc_host
.document
)
168 IUnknown_Release(This
->doc_host
.document
);
170 DocHost_Release(&This
->doc_host
);
172 WebBrowser_OleObject_Destroy(This
);
175 SHDOCVW_UnlockModule();
181 /* IDispatch methods */
182 static HRESULT WINAPI
WebBrowser_GetTypeInfoCount(IWebBrowser2
*iface
, UINT
*pctinfo
)
184 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
186 TRACE("(%p)->(%p)\n", This
, pctinfo
);
192 static HRESULT WINAPI
WebBrowser_GetTypeInfo(IWebBrowser2
*iface
, UINT iTInfo
, LCID lcid
,
195 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
199 TRACE("(%p)->(%d %d %p)\n", This
, iTInfo
, lcid
, ppTInfo
);
201 hres
= get_typeinfo(&typeinfo
);
205 ITypeInfo_AddRef(typeinfo
);
210 static HRESULT WINAPI
WebBrowser_GetIDsOfNames(IWebBrowser2
*iface
, REFIID riid
,
211 LPOLESTR
*rgszNames
, UINT cNames
,
212 LCID lcid
, DISPID
*rgDispId
)
214 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
218 TRACE("(%p)->(%s %p %d %d %p)\n", This
, debugstr_guid(riid
), rgszNames
, cNames
,
221 hres
= get_typeinfo(&typeinfo
);
225 return ITypeInfo_GetIDsOfNames(typeinfo
, rgszNames
, cNames
, rgDispId
);
228 static HRESULT WINAPI
WebBrowser_Invoke(IWebBrowser2
*iface
, DISPID dispIdMember
,
229 REFIID riid
, LCID lcid
, WORD wFlags
,
230 DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
,
231 EXCEPINFO
*pExepInfo
, UINT
*puArgErr
)
233 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
237 TRACE("(%p)->(%d %s %d %08x %p %p %p %p)\n", This
, dispIdMember
, debugstr_guid(riid
),
238 lcid
, wFlags
, pDispParams
, pVarResult
, pExepInfo
, puArgErr
);
240 hres
= get_typeinfo(&typeinfo
);
244 return ITypeInfo_Invoke(typeinfo
, &This
->IWebBrowser2_iface
, dispIdMember
, wFlags
, pDispParams
,
245 pVarResult
, pExepInfo
, puArgErr
);
248 /* IWebBrowser methods */
249 static HRESULT WINAPI
WebBrowser_GoBack(IWebBrowser2
*iface
)
251 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
252 FIXME("(%p)\n", This
);
256 static HRESULT WINAPI
WebBrowser_GoForward(IWebBrowser2
*iface
)
258 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
259 FIXME("(%p)\n", This
);
263 static HRESULT WINAPI
WebBrowser_GoHome(IWebBrowser2
*iface
)
265 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
266 TRACE("(%p)\n", This
);
267 return go_home(&This
->doc_host
);
270 static HRESULT WINAPI
WebBrowser_GoSearch(IWebBrowser2
*iface
)
272 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
273 FIXME("(%p)\n", This
);
277 static HRESULT WINAPI
WebBrowser_Navigate(IWebBrowser2
*iface
, BSTR szUrl
,
278 VARIANT
*Flags
, VARIANT
*TargetFrameName
,
279 VARIANT
*PostData
, VARIANT
*Headers
)
281 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
283 TRACE("(%p)->(%s %s %s %s %s)\n", This
, debugstr_w(szUrl
), debugstr_variant(Flags
),
284 debugstr_variant(TargetFrameName
), debugstr_variant(PostData
),
285 debugstr_variant(Headers
));
287 return navigate_url(&This
->doc_host
, szUrl
, Flags
, TargetFrameName
, PostData
, Headers
);
290 static HRESULT WINAPI
WebBrowser_Refresh(IWebBrowser2
*iface
)
292 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
293 FIXME("(%p)\n", This
);
297 static HRESULT WINAPI
WebBrowser_Refresh2(IWebBrowser2
*iface
, VARIANT
*Level
)
299 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
300 FIXME("(%p)->(%s)\n", This
, debugstr_variant(Level
));
304 static HRESULT WINAPI
WebBrowser_Stop(IWebBrowser2
*iface
)
306 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
307 FIXME("(%p)\n", This
);
311 static HRESULT WINAPI
WebBrowser_get_Application(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
313 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
315 TRACE("(%p)->(%p)\n", This
, ppDisp
);
320 *ppDisp
= (IDispatch
*)&This
->IWebBrowser2_iface
;
321 IDispatch_AddRef(*ppDisp
);
325 static HRESULT WINAPI
WebBrowser_get_Parent(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
327 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
328 FIXME("(%p)->(%p)\n", This
, ppDisp
);
332 static HRESULT WINAPI
WebBrowser_get_Container(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
334 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
335 FIXME("(%p)->(%p)\n", This
, ppDisp
);
339 static HRESULT WINAPI
WebBrowser_get_Document(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
341 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
342 IDispatch
*disp
= NULL
;
344 TRACE("(%p)->(%p)\n", This
, ppDisp
);
346 if(This
->doc_host
.document
) {
349 hres
= IUnknown_QueryInterface(This
->doc_host
.document
, &IID_IDispatch
, (void**)&disp
);
350 if(SUCCEEDED(hres
)) {
353 /* Some broken apps cast returned IDispatch to IHTMLDocument2
354 * without QueryInterface call */
355 hres
= IDispatch_QueryInterface(disp
, &IID_IHTMLDocument2
, (void**)&html_doc
);
356 if(SUCCEEDED(hres
)) {
357 IDispatch_Release(disp
);
367 static HRESULT WINAPI
WebBrowser_get_TopLevelContainer(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
369 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
370 FIXME("(%p)->(%p)\n", This
, pBool
);
374 static HRESULT WINAPI
WebBrowser_get_Type(IWebBrowser2
*iface
, BSTR
*Type
)
376 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
377 FIXME("(%p)->(%p)\n", This
, Type
);
381 static HRESULT WINAPI
WebBrowser_get_Left(IWebBrowser2
*iface
, LONG
*pl
)
383 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
385 TRACE("(%p)->(%p)\n", This
, pl
);
387 *pl
= This
->pos_rect
.left
;
391 static HRESULT WINAPI
WebBrowser_put_Left(IWebBrowser2
*iface
, LONG Left
)
393 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
396 TRACE("(%p)->(%d)\n", This
, Left
);
401 rect
= This
->pos_rect
;
404 /* We don't really change the window position here.
405 * We just notify the embedder that he should do so. */
406 return IOleInPlaceSite_OnPosRectChange(This
->inplace
, &rect
);
409 static HRESULT WINAPI
WebBrowser_get_Top(IWebBrowser2
*iface
, LONG
*pl
)
411 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
413 TRACE("(%p)->(%p)\n", This
, pl
);
415 *pl
= This
->pos_rect
.top
;
419 static HRESULT WINAPI
WebBrowser_put_Top(IWebBrowser2
*iface
, LONG Top
)
421 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
424 TRACE("(%p)->(%d)\n", This
, Top
);
429 rect
= This
->pos_rect
;
432 /* We don't really change the window position here.
433 * We just notify the embedder that he should do so. */
434 return IOleInPlaceSite_OnPosRectChange(This
->inplace
, &rect
);
437 static HRESULT WINAPI
WebBrowser_get_Width(IWebBrowser2
*iface
, LONG
*pl
)
439 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
441 TRACE("(%p)->(%p)\n", This
, pl
);
443 *pl
= This
->pos_rect
.right
- This
->pos_rect
.left
;
447 static HRESULT WINAPI
WebBrowser_put_Width(IWebBrowser2
*iface
, LONG Width
)
449 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
452 TRACE("(%p)->(%d)\n", This
, Width
);
457 rect
= This
->pos_rect
;
458 rect
.right
= rect
.left
+Width
;
460 /* We don't really change the window size here.
461 * We just notify the embedder that he should do so. */
462 return IOleInPlaceSite_OnPosRectChange(This
->inplace
, &rect
);
465 static HRESULT WINAPI
WebBrowser_get_Height(IWebBrowser2
*iface
, LONG
*pl
)
467 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
469 TRACE("(%p)->(%p)\n", This
, pl
);
471 *pl
= This
->pos_rect
.bottom
- This
->pos_rect
.top
;
475 static HRESULT WINAPI
WebBrowser_put_Height(IWebBrowser2
*iface
, LONG Height
)
477 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
480 TRACE("(%p)->(%d)\n", This
, Height
);
485 rect
= This
->pos_rect
;
486 rect
.bottom
= rect
.top
+Height
;
488 /* We don't really change the window size here.
489 * We just notify the embedder that he should do so. */
490 return IOleInPlaceSite_OnPosRectChange(This
->inplace
, &rect
);
493 static HRESULT WINAPI
WebBrowser_get_LocationName(IWebBrowser2
*iface
, BSTR
*LocationName
)
495 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
496 FIXME("(%p)->(%p)\n", This
, LocationName
);
500 static HRESULT WINAPI
WebBrowser_get_LocationURL(IWebBrowser2
*iface
, BSTR
*LocationURL
)
502 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
504 TRACE("(%p)->(%p)\n", This
, LocationURL
);
506 return get_location_url(&This
->doc_host
, LocationURL
);
509 static HRESULT WINAPI
WebBrowser_get_Busy(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
511 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
513 TRACE("(%p)->(%p)\n", This
, pBool
);
515 *pBool
= This
->doc_host
.busy
;
519 static HRESULT WINAPI
WebBrowser_Quit(IWebBrowser2
*iface
)
521 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
523 TRACE("(%p)\n", This
);
525 /* It's a InternetExplorer specific method, we have nothing to do here. */
529 static HRESULT WINAPI
WebBrowser_ClientToWindow(IWebBrowser2
*iface
, int *pcx
, int *pcy
)
531 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
532 FIXME("(%p)->(%p %p)\n", This
, pcx
, pcy
);
536 static HRESULT WINAPI
WebBrowser_PutProperty(IWebBrowser2
*iface
, BSTR szProperty
, VARIANT vtValue
)
538 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
539 FIXME("(%p)->(%s %s)\n", This
, debugstr_w(szProperty
), debugstr_variant(&vtValue
));
543 static HRESULT WINAPI
WebBrowser_GetProperty(IWebBrowser2
*iface
, BSTR szProperty
, VARIANT
*pvtValue
)
545 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
546 FIXME("(%p)->(%s %s)\n", This
, debugstr_w(szProperty
), debugstr_variant(pvtValue
));
550 static HRESULT WINAPI
WebBrowser_get_Name(IWebBrowser2
*iface
, BSTR
*Name
)
552 static const WCHAR sName
[] = {'M','i','c','r','o','s','o','f','t',' ','W','e','b',
553 ' ','B','r','o','w','s','e','r',' ','C','o','n','t','r','o','l',0};
554 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
556 TRACE("(%p)->(%p)\n", This
, Name
);
558 *Name
= SysAllocString(sName
);
563 static HRESULT WINAPI
WebBrowser_get_HWND(IWebBrowser2
*iface
, LONG
*pHWND
)
565 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
567 TRACE("(%p)->(%p)\n", This
, pHWND
);
569 /* WebBrowser control never has a frame window (in opposition to InternetExplorer) */
574 static HRESULT WINAPI
WebBrowser_get_FullName(IWebBrowser2
*iface
, BSTR
*FullName
)
576 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
577 FIXME("(%p)->(%p)\n", This
, FullName
);
581 static HRESULT WINAPI
WebBrowser_get_Path(IWebBrowser2
*iface
, BSTR
*Path
)
583 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
584 FIXME("(%p)->(%p)\n", This
, Path
);
588 static HRESULT WINAPI
WebBrowser_get_Visible(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
590 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
592 TRACE("(%p)->(%p)\n", This
, pBool
);
594 *pBool
= This
->visible
;
598 static HRESULT WINAPI
WebBrowser_put_Visible(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
600 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
602 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
604 TRACE("(%p)->(%x)\n", This
, Value
);
606 This
->visible
= Value
;
608 V_VT(&arg
) = VT_BOOL
;
609 V_BOOL(&arg
) = Value
;
610 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONVISIBLE
, &dispparams
);
615 static HRESULT WINAPI
WebBrowser_get_StatusBar(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
617 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
619 TRACE("(%p)->(%p)\n", This
, pBool
);
621 *pBool
= This
->status_bar
;
625 static HRESULT WINAPI
WebBrowser_put_StatusBar(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
627 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
629 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
631 TRACE("(%p)->(%x)\n", This
, Value
);
633 This
->status_bar
= Value
? VARIANT_TRUE
: VARIANT_FALSE
;
635 /* In opposition to InternetExplorer, all we should do here is
636 * inform the embedder about the status bar change. */
638 V_VT(&arg
) = VT_BOOL
;
639 V_BOOL(&arg
) = Value
;
640 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONSTATUSBAR
, &dispparams
);
645 static HRESULT WINAPI
WebBrowser_get_StatusText(IWebBrowser2
*iface
, BSTR
*StatusText
)
647 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
648 FIXME("(%p)->(%p)\n", This
, StatusText
);
652 static HRESULT WINAPI
WebBrowser_put_StatusText(IWebBrowser2
*iface
, BSTR StatusText
)
654 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
655 FIXME("(%p)->(%s)\n", This
, debugstr_w(StatusText
));
659 static HRESULT WINAPI
WebBrowser_get_ToolBar(IWebBrowser2
*iface
, int *Value
)
661 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
663 TRACE("(%p)->(%p)\n", This
, Value
);
665 *Value
= This
->tool_bar
;
669 static HRESULT WINAPI
WebBrowser_put_ToolBar(IWebBrowser2
*iface
, int Value
)
671 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
673 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
675 TRACE("(%p)->(%x)\n", This
, Value
);
677 This
->tool_bar
= Value
? VARIANT_TRUE
: VARIANT_FALSE
;
679 /* In opposition to InternetExplorer, all we should do here is
680 * inform the embedder about the tool bar change. */
682 V_VT(&arg
) = VT_BOOL
;
683 V_BOOL(&arg
) = This
->tool_bar
;
684 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONTOOLBAR
, &dispparams
);
689 static HRESULT WINAPI
WebBrowser_get_MenuBar(IWebBrowser2
*iface
, VARIANT_BOOL
*Value
)
691 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
693 TRACE("(%p)->(%p)\n", This
, Value
);
695 *Value
= This
->menu_bar
;
699 static HRESULT WINAPI
WebBrowser_put_MenuBar(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
701 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
703 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
705 TRACE("(%p)->(%x)\n", This
, Value
);
707 This
->menu_bar
= Value
? VARIANT_TRUE
: VARIANT_FALSE
;
709 /* In opposition to InternetExplorer, all we should do here is
710 * inform the embedder about the menu bar change. */
712 V_VT(&arg
) = VT_BOOL
;
713 V_BOOL(&arg
) = Value
;
714 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONMENUBAR
, &dispparams
);
719 static HRESULT WINAPI
WebBrowser_get_FullScreen(IWebBrowser2
*iface
, VARIANT_BOOL
*pbFullScreen
)
721 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
723 TRACE("(%p)->(%p)\n", This
, pbFullScreen
);
725 *pbFullScreen
= This
->full_screen
;
729 static HRESULT WINAPI
WebBrowser_put_FullScreen(IWebBrowser2
*iface
, VARIANT_BOOL bFullScreen
)
731 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
733 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
735 /* In opposition to InternetExplorer, all we should do here is
736 * inform the embedder about the fullscreen change. */
738 TRACE("(%p)->(%x)\n", This
, bFullScreen
);
740 This
->full_screen
= bFullScreen
? VARIANT_TRUE
: VARIANT_FALSE
;
742 V_VT(&arg
) = VT_BOOL
;
743 V_BOOL(&arg
) = bFullScreen
;
744 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONFULLSCREEN
, &dispparams
);
749 static HRESULT WINAPI
WebBrowser_Navigate2(IWebBrowser2
*iface
, VARIANT
*URL
, VARIANT
*Flags
,
750 VARIANT
*TargetFrameName
, VARIANT
*PostData
, VARIANT
*Headers
)
752 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
755 TRACE("(%p)->(%s %s %s %s %s)\n", This
, debugstr_variant(URL
), debugstr_variant(Flags
),
756 debugstr_variant(TargetFrameName
), debugstr_variant(PostData
), debugstr_variant(Headers
));
769 case VT_BSTR
|VT_BYREF
:
770 url
= *V_BSTRREF(URL
);
773 FIXME("Unsupported V_VT(URL) %d\n", V_VT(URL
));
777 return navigate_url(&This
->doc_host
, url
, Flags
, TargetFrameName
, PostData
, Headers
);
780 static HRESULT WINAPI
WebBrowser_QueryStatusWB(IWebBrowser2
*iface
, OLECMDID cmdID
, OLECMDF
*pcmdf
)
782 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
783 IOleCommandTarget
*target
= NULL
;
784 OLECMD ole_command
[1];
787 TRACE("(%p)->(%d %p)\n", This
, cmdID
, pcmdf
);
791 ole_command
[0].cmdID
= cmdID
;
792 ole_command
[0].cmdf
= *pcmdf
;
796 hres
= IOleContainer_QueryInterface(This
->container
, &IID_IOleCommandTarget
, (LPVOID
*)&target
);
800 if (!target
&& This
->doc_host
.document
)
802 hres
= IOleContainer_QueryInterface(This
->doc_host
.document
, &IID_IOleCommandTarget
, (LPVOID
*)&target
);
810 hres
= IOleCommandTarget_QueryStatus(target
, NULL
, 1, ole_command
, NULL
);
812 *pcmdf
= ole_command
[0].cmdf
;
813 if (hres
== OLECMDERR_E_NOTSUPPORTED
)
818 IOleCommandTarget_Release(target
);
823 static HRESULT WINAPI
WebBrowser_ExecWB(IWebBrowser2
*iface
, OLECMDID cmdID
,
824 OLECMDEXECOPT cmdexecopt
, VARIANT
*pvaIn
, VARIANT
*pvaOut
)
826 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
827 IOleCommandTarget
*target
= NULL
;
830 TRACE("(%p)->(%d %d %s %p)\n", This
, cmdID
, cmdexecopt
, debugstr_variant(pvaIn
), pvaOut
);
834 hres
= IOleContainer_QueryInterface(This
->container
, &IID_IOleCommandTarget
, (LPVOID
*)&target
);
838 if(!target
&& This
->doc_host
.document
)
840 hres
= IOleContainer_QueryInterface(This
->doc_host
.document
, &IID_IOleCommandTarget
, (LPVOID
*)&target
);
848 hres
= IOleCommandTarget_Exec(target
, NULL
, cmdID
, cmdexecopt
, pvaIn
, pvaOut
);
849 IOleCommandTarget_Release(target
);
854 static HRESULT WINAPI
WebBrowser_ShowBrowserBar(IWebBrowser2
*iface
, VARIANT
*pvaClsid
,
855 VARIANT
*pvarShow
, VARIANT
*pvarSize
)
857 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
858 FIXME("(%p)->(%s %s %s)\n", This
, debugstr_variant(pvaClsid
), debugstr_variant(pvarShow
),
859 debugstr_variant(pvarSize
));
863 static HRESULT WINAPI
WebBrowser_get_ReadyState(IWebBrowser2
*iface
, READYSTATE
*lpReadyState
)
865 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
867 TRACE("(%p)->(%p)\n", This
, lpReadyState
);
869 *lpReadyState
= This
->doc_host
.ready_state
;
873 static HRESULT WINAPI
WebBrowser_get_Offline(IWebBrowser2
*iface
, VARIANT_BOOL
*pbOffline
)
875 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
877 TRACE("(%p)->(%p)\n", This
, pbOffline
);
879 *pbOffline
= This
->doc_host
.offline
;
883 static HRESULT WINAPI
WebBrowser_put_Offline(IWebBrowser2
*iface
, VARIANT_BOOL bOffline
)
885 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
887 TRACE("(%p)->(%x)\n", This
, bOffline
);
889 This
->doc_host
.offline
= bOffline
? VARIANT_TRUE
: VARIANT_FALSE
;
893 static HRESULT WINAPI
WebBrowser_get_Silent(IWebBrowser2
*iface
, VARIANT_BOOL
*pbSilent
)
895 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
897 TRACE("(%p)->(%p)\n", This
, pbSilent
);
899 *pbSilent
= This
->doc_host
.silent
;
903 static HRESULT WINAPI
WebBrowser_put_Silent(IWebBrowser2
*iface
, VARIANT_BOOL bSilent
)
905 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
907 TRACE("(%p)->(%x)\n", This
, bSilent
);
909 This
->doc_host
.silent
= bSilent
? VARIANT_TRUE
: VARIANT_FALSE
;
913 static HRESULT WINAPI
WebBrowser_get_RegisterAsBrowser(IWebBrowser2
*iface
,
914 VARIANT_BOOL
*pbRegister
)
916 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
918 FIXME("(%p)->(%p)\n", This
, pbRegister
);
920 *pbRegister
= This
->register_browser
;
924 static HRESULT WINAPI
WebBrowser_put_RegisterAsBrowser(IWebBrowser2
*iface
,
925 VARIANT_BOOL bRegister
)
927 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
929 FIXME("(%p)->(%x)\n", This
, bRegister
);
931 This
->register_browser
= bRegister
? VARIANT_TRUE
: VARIANT_FALSE
;
935 static HRESULT WINAPI
WebBrowser_get_RegisterAsDropTarget(IWebBrowser2
*iface
,
936 VARIANT_BOOL
*pbRegister
)
938 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
939 FIXME("(%p)->(%p)\n", This
, pbRegister
);
944 static HRESULT WINAPI
WebBrowser_put_RegisterAsDropTarget(IWebBrowser2
*iface
,
945 VARIANT_BOOL bRegister
)
947 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
948 FIXME("(%p)->(%x)\n", This
, bRegister
);
952 static HRESULT WINAPI
WebBrowser_get_TheaterMode(IWebBrowser2
*iface
, VARIANT_BOOL
*pbRegister
)
954 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
956 TRACE("(%p)->(%p)\n", This
, pbRegister
);
958 *pbRegister
= This
->theater_mode
;
962 static HRESULT WINAPI
WebBrowser_put_TheaterMode(IWebBrowser2
*iface
, VARIANT_BOOL bRegister
)
964 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
966 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
968 TRACE("(%p)->(%x)\n", This
, bRegister
);
970 This
->theater_mode
= bRegister
? VARIANT_TRUE
: VARIANT_FALSE
;
972 /* In opposition to InternetExplorer, all we should do here is
973 * inform the embedder about the theater mode change. */
975 V_VT(&arg
) = VT_BOOL
;
976 V_BOOL(&arg
) = bRegister
;
977 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONTHEATERMODE
, &dispparams
);
982 static HRESULT WINAPI
WebBrowser_get_AddressBar(IWebBrowser2
*iface
, VARIANT_BOOL
*Value
)
984 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
986 TRACE("(%p)->(%p)\n", This
, Value
);
988 *Value
= This
->address_bar
;
992 static HRESULT WINAPI
WebBrowser_put_AddressBar(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
994 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
996 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
998 TRACE("(%p)->(%x)\n", This
, Value
);
1000 This
->address_bar
= Value
? VARIANT_TRUE
: VARIANT_FALSE
;
1002 /* In opposition to InternetExplorer, all we should do here is
1003 * inform the embedder about the address bar change. */
1005 V_VT(&arg
) = VT_BOOL
;
1006 V_BOOL(&arg
) = Value
;
1007 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONADDRESSBAR
, &dispparams
);
1012 static HRESULT WINAPI
WebBrowser_get_Resizable(IWebBrowser2
*iface
, VARIANT_BOOL
*Value
)
1014 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
1016 TRACE("(%p)->(%p)\n", This
, Value
);
1018 /* It's InternetExplorer object's method. We have nothing to do here. */
1022 static HRESULT WINAPI
WebBrowser_put_Resizable(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
1024 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
1026 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
1028 TRACE("(%p)->(%x)\n", This
, Value
);
1030 /* In opposition to InternetExplorer, all we should do here is
1031 * inform the embedder about the resizable change. */
1033 V_VT(&arg
) = VT_BOOL
;
1034 V_BOOL(&arg
) = Value
;
1035 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_WINDOWSETRESIZABLE
, &dispparams
);
1040 static const IWebBrowser2Vtbl WebBrowser2Vtbl
=
1042 WebBrowser_QueryInterface
,
1045 WebBrowser_GetTypeInfoCount
,
1046 WebBrowser_GetTypeInfo
,
1047 WebBrowser_GetIDsOfNames
,
1050 WebBrowser_GoForward
,
1052 WebBrowser_GoSearch
,
1053 WebBrowser_Navigate
,
1055 WebBrowser_Refresh2
,
1057 WebBrowser_get_Application
,
1058 WebBrowser_get_Parent
,
1059 WebBrowser_get_Container
,
1060 WebBrowser_get_Document
,
1061 WebBrowser_get_TopLevelContainer
,
1062 WebBrowser_get_Type
,
1063 WebBrowser_get_Left
,
1064 WebBrowser_put_Left
,
1067 WebBrowser_get_Width
,
1068 WebBrowser_put_Width
,
1069 WebBrowser_get_Height
,
1070 WebBrowser_put_Height
,
1071 WebBrowser_get_LocationName
,
1072 WebBrowser_get_LocationURL
,
1073 WebBrowser_get_Busy
,
1075 WebBrowser_ClientToWindow
,
1076 WebBrowser_PutProperty
,
1077 WebBrowser_GetProperty
,
1078 WebBrowser_get_Name
,
1079 WebBrowser_get_HWND
,
1080 WebBrowser_get_FullName
,
1081 WebBrowser_get_Path
,
1082 WebBrowser_get_Visible
,
1083 WebBrowser_put_Visible
,
1084 WebBrowser_get_StatusBar
,
1085 WebBrowser_put_StatusBar
,
1086 WebBrowser_get_StatusText
,
1087 WebBrowser_put_StatusText
,
1088 WebBrowser_get_ToolBar
,
1089 WebBrowser_put_ToolBar
,
1090 WebBrowser_get_MenuBar
,
1091 WebBrowser_put_MenuBar
,
1092 WebBrowser_get_FullScreen
,
1093 WebBrowser_put_FullScreen
,
1094 WebBrowser_Navigate2
,
1095 WebBrowser_QueryStatusWB
,
1097 WebBrowser_ShowBrowserBar
,
1098 WebBrowser_get_ReadyState
,
1099 WebBrowser_get_Offline
,
1100 WebBrowser_put_Offline
,
1101 WebBrowser_get_Silent
,
1102 WebBrowser_put_Silent
,
1103 WebBrowser_get_RegisterAsBrowser
,
1104 WebBrowser_put_RegisterAsBrowser
,
1105 WebBrowser_get_RegisterAsDropTarget
,
1106 WebBrowser_put_RegisterAsDropTarget
,
1107 WebBrowser_get_TheaterMode
,
1108 WebBrowser_put_TheaterMode
,
1109 WebBrowser_get_AddressBar
,
1110 WebBrowser_put_AddressBar
,
1111 WebBrowser_get_Resizable
,
1112 WebBrowser_put_Resizable
1115 static inline WebBrowser
*impl_from_IServiceProvider(IServiceProvider
*iface
)
1117 return CONTAINING_RECORD(iface
, WebBrowser
, IServiceProvider_iface
);
1120 static HRESULT WINAPI
WBServiceProvider_QueryInterface(IServiceProvider
*iface
,
1121 REFIID riid
, LPVOID
*ppv
)
1123 WebBrowser
*This
= impl_from_IServiceProvider(iface
);
1124 return IWebBrowser_QueryInterface(&This
->IWebBrowser2_iface
, riid
, ppv
);
1127 static ULONG WINAPI
WBServiceProvider_AddRef(IServiceProvider
*iface
)
1129 WebBrowser
*This
= impl_from_IServiceProvider(iface
);
1130 return IWebBrowser_AddRef(&This
->IWebBrowser2_iface
);
1133 static ULONG WINAPI
WBServiceProvider_Release(IServiceProvider
*iface
)
1135 WebBrowser
*This
= impl_from_IServiceProvider(iface
);
1136 return IWebBrowser_Release(&This
->IWebBrowser2_iface
);
1139 static HRESULT STDMETHODCALLTYPE
WBServiceProvider_QueryService(IServiceProvider
*iface
,
1140 REFGUID guidService
, REFIID riid
, void **ppv
)
1142 WebBrowser
*This
= impl_from_IServiceProvider(iface
);
1143 static const IID IID_IBrowserService2
=
1144 {0x68BD21CC,0x438B,0x11d2,{0xA5,0x60,0x00,0xA0,0xC,0x2D,0xBF,0xE8}};
1149 if(IsEqualGUID(&IID_IBrowserService2
, riid
)) {
1150 TRACE("(%p)->(IID_IBrowserService2 return E_FAIL)\n", This
);
1154 FIXME("(%p)->(%s, %s %p)\n", This
, debugstr_guid(guidService
), debugstr_guid(riid
), ppv
);
1156 return E_NOINTERFACE
;
1159 static const IServiceProviderVtbl ServiceProviderVtbl
=
1161 WBServiceProvider_QueryInterface
,
1162 WBServiceProvider_AddRef
,
1163 WBServiceProvider_Release
,
1164 WBServiceProvider_QueryService
1167 static inline WebBrowser
*impl_from_DocHost(DocHost
*iface
)
1169 return CONTAINING_RECORD(iface
, WebBrowser
, doc_host
);
1172 static ULONG
WebBrowser_addref(DocHost
*iface
)
1174 WebBrowser
*This
= impl_from_DocHost(iface
);
1175 return IWebBrowser2_AddRef(&This
->IWebBrowser2_iface
);
1178 static ULONG
WebBrowser_release(DocHost
*iface
)
1180 WebBrowser
*This
= impl_from_DocHost(iface
);
1181 return IWebBrowser2_Release(&This
->IWebBrowser2_iface
);
1184 static void WINAPI
DocHostContainer_GetDocObjRect(DocHost
* This
, RECT
* rc
)
1186 GetClientRect(This
->frame_hwnd
, rc
);
1189 static HRESULT WINAPI
DocHostContainer_SetStatusText(DocHost
* This
, LPCWSTR text
)
1194 static void WINAPI
DocHostContainer_SetURL(DocHost
* This
, LPCWSTR url
)
1199 static HRESULT
DocHostContainer_exec(DocHost
*doc_host
, const GUID
*cmd_group
, DWORD cmdid
, DWORD execopt
, VARIANT
*in
,
1202 WebBrowser
*This
= impl_from_DocHost(doc_host
);
1203 IOleCommandTarget
*cmdtrg
= NULL
;
1207 hres
= IOleClientSite_QueryInterface(This
->client
, &IID_IOleCommandTarget
, (void**)&cmdtrg
);
1212 if(!cmdtrg
&& This
->container
) {
1213 hres
= IOleContainer_QueryInterface(This
->container
, &IID_IOleCommandTarget
, (void**)&cmdtrg
);
1221 hres
= IOleCommandTarget_Exec(cmdtrg
, cmd_group
, cmdid
, execopt
, in
, out
);
1222 IOleCommandTarget_Release(cmdtrg
);
1224 FIXME("Exec failed\n");
1229 static const IDocHostContainerVtbl DocHostContainerVtbl
= {
1232 DocHostContainer_GetDocObjRect
,
1233 DocHostContainer_SetStatusText
,
1234 DocHostContainer_SetURL
,
1235 DocHostContainer_exec
1238 static HRESULT
WebBrowser_Create(INT version
, IUnknown
*pOuter
, REFIID riid
, void **ppv
)
1243 TRACE("(%p %s %p) version=%d\n", pOuter
, debugstr_guid(riid
), ppv
, version
);
1245 ret
= heap_alloc_zero(sizeof(WebBrowser
));
1247 ret
->IWebBrowser2_iface
.lpVtbl
= &WebBrowser2Vtbl
;
1248 ret
->IServiceProvider_iface
.lpVtbl
= &ServiceProviderVtbl
;
1250 ret
->version
= version
;
1252 DocHost_Init(&ret
->doc_host
, (IDispatch
*)&ret
->IWebBrowser2_iface
, &DocHostContainerVtbl
);
1254 ret
->visible
= VARIANT_TRUE
;
1255 ret
->menu_bar
= VARIANT_TRUE
;
1256 ret
->address_bar
= VARIANT_TRUE
;
1257 ret
->status_bar
= VARIANT_TRUE
;
1258 ret
->tool_bar
= VARIANT_TRUE
;
1260 WebBrowser_OleObject_Init(ret
);
1261 WebBrowser_ViewObject_Init(ret
);
1262 WebBrowser_Persist_Init(ret
);
1263 WebBrowser_ClassInfo_Init(ret
);
1265 HlinkFrame_Init(&ret
->hlink_frame
, (IUnknown
*)&ret
->IWebBrowser2_iface
, &ret
->doc_host
);
1267 SHDOCVW_LockModule();
1269 hres
= IWebBrowser_QueryInterface(&ret
->IWebBrowser2_iface
, riid
, ppv
);
1271 IWebBrowser2_Release(&ret
->IWebBrowser2_iface
);
1275 HRESULT
WebBrowserV1_Create(IUnknown
*pOuter
, REFIID riid
, void **ppv
)
1277 return WebBrowser_Create(1, pOuter
, riid
, ppv
);
1280 HRESULT
WebBrowserV2_Create(IUnknown
*pOuter
, REFIID riid
, void **ppv
)
1282 return WebBrowser_Create(2, pOuter
, riid
, ppv
);