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
26 #include "shdeprecated.h"
28 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(ieframe
);
32 static inline WebBrowser
*impl_from_IWebBrowser2(IWebBrowser2
*iface
)
34 return CONTAINING_RECORD(iface
, WebBrowser
, IWebBrowser2_iface
);
37 static HRESULT WINAPI
WebBrowser_QueryInterface(IWebBrowser2
*iface
, REFIID riid
, LPVOID
*ppv
)
39 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
45 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
46 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
47 *ppv
= &This
->IWebBrowser2_iface
;
48 }else if(IsEqualGUID(&IID_IDispatch
, riid
)) {
49 TRACE("(%p)->(IID_IDispatch %p)\n", This
, ppv
);
50 *ppv
= &This
->IWebBrowser2_iface
;
51 }else if(IsEqualGUID(&IID_IWebBrowser
, riid
)) {
52 TRACE("(%p)->(IID_IWebBrowser %p)\n", This
, ppv
);
53 *ppv
= &This
->IWebBrowser2_iface
;
54 }else if(IsEqualGUID(&IID_IWebBrowserApp
, riid
)) {
55 TRACE("(%p)->(IID_IWebBrowserApp %p)\n", This
, ppv
);
56 *ppv
= &This
->IWebBrowser2_iface
;
57 }else if(IsEqualGUID(&IID_IWebBrowser2
, riid
)) {
58 TRACE("(%p)->(IID_IWebBrowser2 %p)\n", This
, ppv
);
59 *ppv
= &This
->IWebBrowser2_iface
;
60 }else if(IsEqualGUID(&IID_IOleObject
, riid
)) {
61 TRACE("(%p)->(IID_IOleObject %p)\n", This
, ppv
);
62 *ppv
= &This
->IOleObject_iface
;
63 }else if(IsEqualGUID(&IID_IOleWindow
, riid
)) {
64 TRACE("(%p)->(IID_IOleWindow %p)\n", This
, ppv
);
65 *ppv
= &This
->IOleInPlaceObject_iface
;
66 }else if(IsEqualGUID (&IID_IOleInPlaceObject
, riid
)) {
67 TRACE("(%p)->(IID_IOleInPlaceObject %p)\n", This
, ppv
);
68 *ppv
= &This
->IOleInPlaceObject_iface
;
69 }else if(IsEqualGUID(&IID_IOleControl
, riid
)) {
70 TRACE("(%p)->(IID_IOleControl %p)\n", This
, ppv
);
71 *ppv
= &This
->IOleControl_iface
;
72 }else if(IsEqualGUID(&IID_IPersist
, riid
)) {
73 TRACE("(%p)->(IID_IPersist %p)\n", This
, ppv
);
74 *ppv
= &This
->IPersistStorage_iface
;
75 }else if(IsEqualGUID(&IID_IPersistStorage
, riid
)) {
76 TRACE("(%p)->(IID_IPersistStorage %p)\n", This
, ppv
);
77 *ppv
= &This
->IPersistStorage_iface
;
78 }else if(IsEqualGUID(&IID_IPersistMemory
, riid
)) {
79 TRACE("(%p)->(IID_IPersistStorage %p)\n", This
, ppv
);
80 *ppv
= &This
->IPersistMemory_iface
;
81 }else if(IsEqualGUID (&IID_IPersistStreamInit
, riid
)) {
82 TRACE("(%p)->(IID_IPersistStreamInit %p)\n", This
, ppv
);
83 *ppv
= &This
->IPersistStreamInit_iface
;
84 }else if(IsEqualGUID(&IID_IProvideClassInfo
, riid
)) {
85 TRACE("(%p)->(IID_IProvideClassInfo %p)\n", This
, ppv
);
86 *ppv
= &This
->IProvideClassInfo2_iface
;
87 }else if(IsEqualGUID(&IID_IProvideClassInfo2
, riid
)) {
88 TRACE("(%p)->(IID_IProvideClassInfo2 %p)\n", This
, ppv
);
89 *ppv
= &This
->IProvideClassInfo2_iface
;
90 }else if(IsEqualGUID(&IID_IConnectionPointContainer
, riid
)) {
91 TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This
, ppv
);
92 *ppv
= &This
->doc_host
.cps
.IConnectionPointContainer_iface
;
93 }else if(IsEqualGUID(&IID_IViewObject
, riid
)) {
94 TRACE("(%p)->(IID_IViewObject %p)\n", This
, ppv
);
95 *ppv
= &This
->IViewObject2_iface
;
96 }else if(IsEqualGUID(&IID_IViewObject2
, riid
)) {
97 TRACE("(%p)->(IID_IViewObject2 %p)\n", This
, ppv
);
98 *ppv
= &This
->IViewObject2_iface
;
99 }else if(IsEqualGUID(&IID_IOleInPlaceActiveObject
, riid
)) {
100 TRACE("(%p)->(IID_IOleInPlaceActiveObject %p)\n", This
, ppv
);
101 *ppv
= &This
->IOleInPlaceActiveObject_iface
;
102 }else if(IsEqualGUID(&IID_IOleCommandTarget
, riid
)) {
103 TRACE("(%p)->(IID_IOleCommandTarget %p)\n", This
, ppv
);
104 *ppv
= &This
->IOleCommandTarget_iface
;
105 }else if(IsEqualGUID(&IID_IServiceProvider
, riid
)) {
106 *ppv
= &This
->IServiceProvider_iface
;
107 TRACE("(%p)->(IID_IServiceProvider %p)\n", This
, ppv
);
108 }else if(IsEqualGUID(&IID_IDataObject
, riid
)) {
109 *ppv
= &This
->IDataObject_iface
;
110 TRACE("(%p)->(IID_IDataObject %p)\n", This
, ppv
);
111 }else if(IsEqualGUID(&IID_IQuickActivate
, riid
)) {
112 TRACE("(%p)->(IID_IQuickActivate %p) returning NULL\n", This
, ppv
);
113 return E_NOINTERFACE
;
114 }else if(IsEqualGUID(&IID_IRunnableObject
, riid
)) {
115 TRACE("(%p)->(IID_IRunnableObject %p) returning NULL\n", This
, ppv
);
116 return E_NOINTERFACE
;
117 }else if(IsEqualGUID(&IID_IPerPropertyBrowsing
, riid
)) {
118 TRACE("(%p)->(IID_IPerPropertyBrowsing %p) returning NULL\n", This
, ppv
);
119 return E_NOINTERFACE
;
120 }else if(IsEqualGUID(&IID_IOleCache
, riid
)) {
121 TRACE("(%p)->(IID_IOleCache %p) returning NULL\n", This
, ppv
);
122 return E_NOINTERFACE
;
123 }else if(IsEqualGUID(&IID_IOleInPlaceSite
, riid
)) {
124 TRACE("(%p)->(IID_IOleInPlaceSite %p) returning NULL\n", This
, ppv
);
125 return E_NOINTERFACE
;
126 }else if(IsEqualGUID(&IID_IObjectWithSite
, riid
)) {
127 TRACE("(%p)->(IID_IObjectWithSite %p) returning NULL\n", This
, ppv
);
128 return E_NOINTERFACE
;
129 }else if(IsEqualGUID(&IID_IViewObjectEx
, riid
)) {
130 TRACE("(%p)->(IID_IViewObjectEx %p) returning NULL\n", This
, ppv
);
131 return E_NOINTERFACE
;
132 }else if(IsEqualGUID(&IID_IOleLink
, riid
)) {
133 TRACE("(%p)->(IID_IOleLink %p) returning NULL\n", This
, ppv
);
134 return E_NOINTERFACE
;
135 }else if(IsEqualGUID(&IID_IMarshal
, riid
)) {
136 TRACE("(%p)->(IID_IMarshal %p) returning NULL\n", This
, ppv
);
137 return E_NOINTERFACE
;
138 }else if(IsEqualGUID(&IID_IStdMarshalInfo
, riid
)) {
139 TRACE("(%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(IWebBrowser2
*iface
)
156 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
157 LONG ref
= InterlockedIncrement(&This
->ref
);
158 TRACE("(%p) ref=%d\n", This
, ref
);
162 static ULONG WINAPI
WebBrowser_Release(IWebBrowser2
*iface
)
164 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
165 LONG ref
= InterlockedDecrement(&This
->ref
);
167 TRACE("(%p) ref=%d\n", This
, ref
);
170 if(This
->doc_host
.document
)
171 IUnknown_Release(This
->doc_host
.document
);
173 DocHost_Release(&This
->doc_host
);
175 WebBrowser_OleObject_Destroy(This
);
184 /* IDispatch methods */
185 static HRESULT WINAPI
WebBrowser_GetTypeInfoCount(IWebBrowser2
*iface
, UINT
*pctinfo
)
187 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
189 TRACE("(%p)->(%p)\n", This
, pctinfo
);
195 static HRESULT WINAPI
WebBrowser_GetTypeInfo(IWebBrowser2
*iface
, UINT iTInfo
, LCID lcid
,
198 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
202 TRACE("(%p)->(%d %d %p)\n", This
, iTInfo
, lcid
, ppTInfo
);
204 hres
= get_typeinfo(&typeinfo
);
208 ITypeInfo_AddRef(typeinfo
);
213 static HRESULT WINAPI
WebBrowser_GetIDsOfNames(IWebBrowser2
*iface
, REFIID riid
,
214 LPOLESTR
*rgszNames
, UINT cNames
,
215 LCID lcid
, DISPID
*rgDispId
)
217 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
221 TRACE("(%p)->(%s %p %d %d %p)\n", This
, debugstr_guid(riid
), rgszNames
, cNames
,
224 hres
= get_typeinfo(&typeinfo
);
228 return ITypeInfo_GetIDsOfNames(typeinfo
, rgszNames
, cNames
, rgDispId
);
231 static HRESULT WINAPI
WebBrowser_Invoke(IWebBrowser2
*iface
, DISPID dispIdMember
,
232 REFIID riid
, LCID lcid
, WORD wFlags
,
233 DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
,
234 EXCEPINFO
*pExepInfo
, UINT
*puArgErr
)
236 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
240 TRACE("(%p)->(%d %s %d %08x %p %p %p %p)\n", This
, dispIdMember
, debugstr_guid(riid
),
241 lcid
, wFlags
, pDispParams
, pVarResult
, pExepInfo
, puArgErr
);
243 hres
= get_typeinfo(&typeinfo
);
247 return ITypeInfo_Invoke(typeinfo
, &This
->IWebBrowser2_iface
, dispIdMember
, wFlags
, pDispParams
,
248 pVarResult
, pExepInfo
, puArgErr
);
251 /* IWebBrowser methods */
252 static HRESULT WINAPI
WebBrowser_GoBack(IWebBrowser2
*iface
)
254 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
255 FIXME("(%p)\n", This
);
259 static HRESULT WINAPI
WebBrowser_GoForward(IWebBrowser2
*iface
)
261 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
262 FIXME("(%p)\n", This
);
266 static HRESULT WINAPI
WebBrowser_GoHome(IWebBrowser2
*iface
)
268 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
269 TRACE("(%p)\n", This
);
270 return go_home(&This
->doc_host
);
273 static HRESULT WINAPI
WebBrowser_GoSearch(IWebBrowser2
*iface
)
275 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
276 FIXME("(%p)\n", This
);
280 static HRESULT WINAPI
WebBrowser_Navigate(IWebBrowser2
*iface
, BSTR szUrl
,
281 VARIANT
*Flags
, VARIANT
*TargetFrameName
,
282 VARIANT
*PostData
, VARIANT
*Headers
)
284 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
286 TRACE("(%p)->(%s %s %s %s %s)\n", This
, debugstr_w(szUrl
), debugstr_variant(Flags
),
287 debugstr_variant(TargetFrameName
), debugstr_variant(PostData
),
288 debugstr_variant(Headers
));
290 return navigate_url(&This
->doc_host
, szUrl
, Flags
, TargetFrameName
, PostData
, Headers
);
293 static HRESULT WINAPI
WebBrowser_Refresh(IWebBrowser2
*iface
)
295 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
296 FIXME("(%p)\n", This
);
300 static HRESULT WINAPI
WebBrowser_Refresh2(IWebBrowser2
*iface
, VARIANT
*Level
)
302 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
303 FIXME("(%p)->(%s)\n", This
, debugstr_variant(Level
));
307 static HRESULT WINAPI
WebBrowser_Stop(IWebBrowser2
*iface
)
309 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
310 FIXME("(%p)\n", This
);
314 static HRESULT WINAPI
WebBrowser_get_Application(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
316 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
318 TRACE("(%p)->(%p)\n", This
, ppDisp
);
323 *ppDisp
= (IDispatch
*)&This
->IWebBrowser2_iface
;
324 IDispatch_AddRef(*ppDisp
);
328 static HRESULT WINAPI
WebBrowser_get_Parent(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
330 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
331 FIXME("(%p)->(%p)\n", This
, ppDisp
);
335 static HRESULT WINAPI
WebBrowser_get_Container(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
337 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
338 FIXME("(%p)->(%p)\n", This
, ppDisp
);
342 static HRESULT WINAPI
WebBrowser_get_Document(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
344 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
345 IDispatch
*disp
= NULL
;
347 TRACE("(%p)->(%p)\n", This
, ppDisp
);
349 if(This
->doc_host
.document
) {
352 hres
= IUnknown_QueryInterface(This
->doc_host
.document
, &IID_IDispatch
, (void**)&disp
);
353 if(SUCCEEDED(hres
)) {
356 /* Some broken apps cast returned IDispatch to IHTMLDocument2
357 * without QueryInterface call */
358 hres
= IDispatch_QueryInterface(disp
, &IID_IHTMLDocument2
, (void**)&html_doc
);
359 if(SUCCEEDED(hres
)) {
360 IDispatch_Release(disp
);
370 static HRESULT WINAPI
WebBrowser_get_TopLevelContainer(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
372 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
373 FIXME("(%p)->(%p)\n", This
, pBool
);
377 static HRESULT WINAPI
WebBrowser_get_Type(IWebBrowser2
*iface
, BSTR
*Type
)
379 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
380 FIXME("(%p)->(%p)\n", This
, Type
);
384 static HRESULT WINAPI
WebBrowser_get_Left(IWebBrowser2
*iface
, LONG
*pl
)
386 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
388 TRACE("(%p)->(%p)\n", This
, pl
);
390 *pl
= This
->pos_rect
.left
;
394 static HRESULT WINAPI
WebBrowser_put_Left(IWebBrowser2
*iface
, LONG Left
)
396 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
399 TRACE("(%p)->(%d)\n", This
, Left
);
404 rect
= This
->pos_rect
;
407 /* We don't really change the window position here.
408 * We just notify the embedder that he should do so. */
409 return IOleInPlaceSite_OnPosRectChange(This
->inplace
, &rect
);
412 static HRESULT WINAPI
WebBrowser_get_Top(IWebBrowser2
*iface
, LONG
*pl
)
414 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
416 TRACE("(%p)->(%p)\n", This
, pl
);
418 *pl
= This
->pos_rect
.top
;
422 static HRESULT WINAPI
WebBrowser_put_Top(IWebBrowser2
*iface
, LONG Top
)
424 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
427 TRACE("(%p)->(%d)\n", This
, Top
);
432 rect
= This
->pos_rect
;
435 /* We don't really change the window position here.
436 * We just notify the embedder that he should do so. */
437 return IOleInPlaceSite_OnPosRectChange(This
->inplace
, &rect
);
440 static HRESULT WINAPI
WebBrowser_get_Width(IWebBrowser2
*iface
, LONG
*pl
)
442 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
444 TRACE("(%p)->(%p)\n", This
, pl
);
446 *pl
= This
->pos_rect
.right
- This
->pos_rect
.left
;
450 static HRESULT WINAPI
WebBrowser_put_Width(IWebBrowser2
*iface
, LONG Width
)
452 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
455 TRACE("(%p)->(%d)\n", This
, Width
);
460 rect
= This
->pos_rect
;
461 rect
.right
= rect
.left
+Width
;
463 /* We don't really change the window size here.
464 * We just notify the embedder that he should do so. */
465 return IOleInPlaceSite_OnPosRectChange(This
->inplace
, &rect
);
468 static HRESULT WINAPI
WebBrowser_get_Height(IWebBrowser2
*iface
, LONG
*pl
)
470 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
472 TRACE("(%p)->(%p)\n", This
, pl
);
474 *pl
= This
->pos_rect
.bottom
- This
->pos_rect
.top
;
478 static HRESULT WINAPI
WebBrowser_put_Height(IWebBrowser2
*iface
, LONG Height
)
480 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
483 TRACE("(%p)->(%d)\n", This
, Height
);
488 rect
= This
->pos_rect
;
489 rect
.bottom
= rect
.top
+Height
;
491 /* We don't really change the window size here.
492 * We just notify the embedder that he should do so. */
493 return IOleInPlaceSite_OnPosRectChange(This
->inplace
, &rect
);
496 static HRESULT WINAPI
WebBrowser_get_LocationName(IWebBrowser2
*iface
, BSTR
*LocationName
)
498 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
499 FIXME("(%p)->(%p)\n", This
, LocationName
);
503 static HRESULT WINAPI
WebBrowser_get_LocationURL(IWebBrowser2
*iface
, BSTR
*LocationURL
)
505 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
507 TRACE("(%p)->(%p)\n", This
, LocationURL
);
509 return get_location_url(&This
->doc_host
, LocationURL
);
512 static HRESULT WINAPI
WebBrowser_get_Busy(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
514 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
516 TRACE("(%p)->(%p)\n", This
, pBool
);
518 *pBool
= This
->doc_host
.busy
;
522 static HRESULT WINAPI
WebBrowser_Quit(IWebBrowser2
*iface
)
524 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
526 TRACE("(%p)\n", This
);
528 /* It's a InternetExplorer specific method, we have nothing to do here. */
532 static HRESULT WINAPI
WebBrowser_ClientToWindow(IWebBrowser2
*iface
, int *pcx
, int *pcy
)
534 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
535 FIXME("(%p)->(%p %p)\n", This
, pcx
, pcy
);
539 static HRESULT WINAPI
WebBrowser_PutProperty(IWebBrowser2
*iface
, BSTR szProperty
, VARIANT vtValue
)
541 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
542 FIXME("(%p)->(%s %s)\n", This
, debugstr_w(szProperty
), debugstr_variant(&vtValue
));
546 static HRESULT WINAPI
WebBrowser_GetProperty(IWebBrowser2
*iface
, BSTR szProperty
, VARIANT
*pvtValue
)
548 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
549 FIXME("(%p)->(%s %s)\n", This
, debugstr_w(szProperty
), debugstr_variant(pvtValue
));
553 static HRESULT WINAPI
WebBrowser_get_Name(IWebBrowser2
*iface
, BSTR
*Name
)
555 static const WCHAR sName
[] = {'M','i','c','r','o','s','o','f','t',' ','W','e','b',
556 ' ','B','r','o','w','s','e','r',' ','C','o','n','t','r','o','l',0};
557 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
559 TRACE("(%p)->(%p)\n", This
, Name
);
561 *Name
= SysAllocString(sName
);
566 static HRESULT WINAPI
WebBrowser_get_HWND(IWebBrowser2
*iface
, LONG
*pHWND
)
568 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
570 TRACE("(%p)->(%p)\n", This
, pHWND
);
572 /* WebBrowser control never has a frame window (in opposition to InternetExplorer) */
577 static HRESULT WINAPI
WebBrowser_get_FullName(IWebBrowser2
*iface
, BSTR
*FullName
)
579 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
580 FIXME("(%p)->(%p)\n", This
, FullName
);
584 static HRESULT WINAPI
WebBrowser_get_Path(IWebBrowser2
*iface
, BSTR
*Path
)
586 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
587 FIXME("(%p)->(%p)\n", This
, Path
);
591 static HRESULT WINAPI
WebBrowser_get_Visible(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
593 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
595 TRACE("(%p)->(%p)\n", This
, pBool
);
597 *pBool
= This
->visible
;
601 static HRESULT WINAPI
WebBrowser_put_Visible(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
603 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
605 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
607 TRACE("(%p)->(%x)\n", This
, Value
);
609 This
->visible
= Value
;
611 V_VT(&arg
) = VT_BOOL
;
612 V_BOOL(&arg
) = Value
;
613 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONVISIBLE
, &dispparams
);
618 static HRESULT WINAPI
WebBrowser_get_StatusBar(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
620 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
622 TRACE("(%p)->(%p)\n", This
, pBool
);
624 *pBool
= This
->status_bar
;
628 static HRESULT WINAPI
WebBrowser_put_StatusBar(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
630 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
632 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
634 TRACE("(%p)->(%x)\n", This
, Value
);
636 This
->status_bar
= Value
? VARIANT_TRUE
: VARIANT_FALSE
;
638 /* In opposition to InternetExplorer, all we should do here is
639 * inform the embedder about the status bar change. */
641 V_VT(&arg
) = VT_BOOL
;
642 V_BOOL(&arg
) = Value
;
643 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONSTATUSBAR
, &dispparams
);
648 static HRESULT WINAPI
WebBrowser_get_StatusText(IWebBrowser2
*iface
, BSTR
*StatusText
)
650 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
651 FIXME("(%p)->(%p)\n", This
, StatusText
);
655 static HRESULT WINAPI
WebBrowser_put_StatusText(IWebBrowser2
*iface
, BSTR StatusText
)
657 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
658 FIXME("(%p)->(%s)\n", This
, debugstr_w(StatusText
));
662 static HRESULT WINAPI
WebBrowser_get_ToolBar(IWebBrowser2
*iface
, int *Value
)
664 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
666 TRACE("(%p)->(%p)\n", This
, Value
);
668 *Value
= This
->tool_bar
;
672 static HRESULT WINAPI
WebBrowser_put_ToolBar(IWebBrowser2
*iface
, int Value
)
674 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
676 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
678 TRACE("(%p)->(%x)\n", This
, Value
);
680 This
->tool_bar
= Value
? VARIANT_TRUE
: VARIANT_FALSE
;
682 /* In opposition to InternetExplorer, all we should do here is
683 * inform the embedder about the tool bar change. */
685 V_VT(&arg
) = VT_BOOL
;
686 V_BOOL(&arg
) = This
->tool_bar
;
687 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONTOOLBAR
, &dispparams
);
692 static HRESULT WINAPI
WebBrowser_get_MenuBar(IWebBrowser2
*iface
, VARIANT_BOOL
*Value
)
694 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
696 TRACE("(%p)->(%p)\n", This
, Value
);
698 *Value
= This
->menu_bar
;
702 static HRESULT WINAPI
WebBrowser_put_MenuBar(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
704 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
706 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
708 TRACE("(%p)->(%x)\n", This
, Value
);
710 This
->menu_bar
= Value
? VARIANT_TRUE
: VARIANT_FALSE
;
712 /* In opposition to InternetExplorer, all we should do here is
713 * inform the embedder about the menu bar change. */
715 V_VT(&arg
) = VT_BOOL
;
716 V_BOOL(&arg
) = Value
;
717 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONMENUBAR
, &dispparams
);
722 static HRESULT WINAPI
WebBrowser_get_FullScreen(IWebBrowser2
*iface
, VARIANT_BOOL
*pbFullScreen
)
724 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
726 TRACE("(%p)->(%p)\n", This
, pbFullScreen
);
728 *pbFullScreen
= This
->full_screen
;
732 static HRESULT WINAPI
WebBrowser_put_FullScreen(IWebBrowser2
*iface
, VARIANT_BOOL bFullScreen
)
734 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
736 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
738 /* In opposition to InternetExplorer, all we should do here is
739 * inform the embedder about the fullscreen change. */
741 TRACE("(%p)->(%x)\n", This
, bFullScreen
);
743 This
->full_screen
= bFullScreen
? VARIANT_TRUE
: VARIANT_FALSE
;
745 V_VT(&arg
) = VT_BOOL
;
746 V_BOOL(&arg
) = bFullScreen
;
747 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONFULLSCREEN
, &dispparams
);
752 static HRESULT WINAPI
WebBrowser_Navigate2(IWebBrowser2
*iface
, VARIANT
*URL
, VARIANT
*Flags
,
753 VARIANT
*TargetFrameName
, VARIANT
*PostData
, VARIANT
*Headers
)
755 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
758 TRACE("(%p)->(%s %s %s %s %s)\n", This
, debugstr_variant(URL
), debugstr_variant(Flags
),
759 debugstr_variant(TargetFrameName
), debugstr_variant(PostData
), debugstr_variant(Headers
));
772 case VT_BSTR
|VT_BYREF
:
773 url
= *V_BSTRREF(URL
);
776 FIXME("Unsupported V_VT(URL) %d\n", V_VT(URL
));
780 return navigate_url(&This
->doc_host
, url
, Flags
, TargetFrameName
, PostData
, Headers
);
783 static HRESULT WINAPI
WebBrowser_QueryStatusWB(IWebBrowser2
*iface
, OLECMDID cmdID
, OLECMDF
*pcmdf
)
785 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
786 IOleCommandTarget
*target
= NULL
;
787 OLECMD ole_command
[1];
790 TRACE("(%p)->(%d %p)\n", This
, cmdID
, pcmdf
);
794 ole_command
[0].cmdID
= cmdID
;
795 ole_command
[0].cmdf
= *pcmdf
;
799 hres
= IOleContainer_QueryInterface(This
->container
, &IID_IOleCommandTarget
, (LPVOID
*)&target
);
803 if (!target
&& This
->doc_host
.document
)
805 hres
= IOleContainer_QueryInterface(This
->doc_host
.document
, &IID_IOleCommandTarget
, (LPVOID
*)&target
);
813 hres
= IOleCommandTarget_QueryStatus(target
, NULL
, 1, ole_command
, NULL
);
815 *pcmdf
= ole_command
[0].cmdf
;
816 if (hres
== OLECMDERR_E_NOTSUPPORTED
)
821 IOleCommandTarget_Release(target
);
826 static HRESULT WINAPI
WebBrowser_ExecWB(IWebBrowser2
*iface
, OLECMDID cmdID
,
827 OLECMDEXECOPT cmdexecopt
, VARIANT
*pvaIn
, VARIANT
*pvaOut
)
829 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
830 IOleCommandTarget
*target
= NULL
;
833 TRACE("(%p)->(%d %d %s %p)\n", This
, cmdID
, cmdexecopt
, debugstr_variant(pvaIn
), pvaOut
);
837 hres
= IOleContainer_QueryInterface(This
->container
, &IID_IOleCommandTarget
, (LPVOID
*)&target
);
841 if(!target
&& This
->doc_host
.document
)
843 hres
= IOleContainer_QueryInterface(This
->doc_host
.document
, &IID_IOleCommandTarget
, (LPVOID
*)&target
);
851 hres
= IOleCommandTarget_Exec(target
, NULL
, cmdID
, cmdexecopt
, pvaIn
, pvaOut
);
852 IOleCommandTarget_Release(target
);
857 static HRESULT WINAPI
WebBrowser_ShowBrowserBar(IWebBrowser2
*iface
, VARIANT
*pvaClsid
,
858 VARIANT
*pvarShow
, VARIANT
*pvarSize
)
860 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
861 FIXME("(%p)->(%s %s %s)\n", This
, debugstr_variant(pvaClsid
), debugstr_variant(pvarShow
),
862 debugstr_variant(pvarSize
));
866 static HRESULT WINAPI
WebBrowser_get_ReadyState(IWebBrowser2
*iface
, READYSTATE
*lpReadyState
)
868 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
870 TRACE("(%p)->(%p)\n", This
, lpReadyState
);
872 *lpReadyState
= This
->doc_host
.ready_state
;
876 static HRESULT WINAPI
WebBrowser_get_Offline(IWebBrowser2
*iface
, VARIANT_BOOL
*pbOffline
)
878 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
880 TRACE("(%p)->(%p)\n", This
, pbOffline
);
882 *pbOffline
= This
->doc_host
.offline
;
886 static HRESULT WINAPI
WebBrowser_put_Offline(IWebBrowser2
*iface
, VARIANT_BOOL bOffline
)
888 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
890 TRACE("(%p)->(%x)\n", This
, bOffline
);
892 This
->doc_host
.offline
= bOffline
? VARIANT_TRUE
: VARIANT_FALSE
;
896 static HRESULT WINAPI
WebBrowser_get_Silent(IWebBrowser2
*iface
, VARIANT_BOOL
*pbSilent
)
898 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
900 TRACE("(%p)->(%p)\n", This
, pbSilent
);
902 *pbSilent
= This
->doc_host
.silent
;
906 static HRESULT WINAPI
WebBrowser_put_Silent(IWebBrowser2
*iface
, VARIANT_BOOL bSilent
)
908 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
910 TRACE("(%p)->(%x)\n", This
, bSilent
);
912 This
->doc_host
.silent
= bSilent
? VARIANT_TRUE
: VARIANT_FALSE
;
916 static HRESULT WINAPI
WebBrowser_get_RegisterAsBrowser(IWebBrowser2
*iface
,
917 VARIANT_BOOL
*pbRegister
)
919 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
921 FIXME("(%p)->(%p)\n", This
, pbRegister
);
923 *pbRegister
= This
->register_browser
;
927 static HRESULT WINAPI
WebBrowser_put_RegisterAsBrowser(IWebBrowser2
*iface
,
928 VARIANT_BOOL bRegister
)
930 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
932 FIXME("(%p)->(%x)\n", This
, bRegister
);
934 This
->register_browser
= bRegister
? VARIANT_TRUE
: VARIANT_FALSE
;
938 static HRESULT WINAPI
WebBrowser_get_RegisterAsDropTarget(IWebBrowser2
*iface
,
939 VARIANT_BOOL
*pbRegister
)
941 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
942 FIXME("(%p)->(%p)\n", This
, pbRegister
);
947 static HRESULT WINAPI
WebBrowser_put_RegisterAsDropTarget(IWebBrowser2
*iface
,
948 VARIANT_BOOL bRegister
)
950 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
951 FIXME("(%p)->(%x)\n", This
, bRegister
);
955 static HRESULT WINAPI
WebBrowser_get_TheaterMode(IWebBrowser2
*iface
, VARIANT_BOOL
*pbRegister
)
957 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
959 TRACE("(%p)->(%p)\n", This
, pbRegister
);
961 *pbRegister
= This
->theater_mode
;
965 static HRESULT WINAPI
WebBrowser_put_TheaterMode(IWebBrowser2
*iface
, VARIANT_BOOL bRegister
)
967 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
969 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
971 TRACE("(%p)->(%x)\n", This
, bRegister
);
973 This
->theater_mode
= bRegister
? VARIANT_TRUE
: VARIANT_FALSE
;
975 /* In opposition to InternetExplorer, all we should do here is
976 * inform the embedder about the theater mode change. */
978 V_VT(&arg
) = VT_BOOL
;
979 V_BOOL(&arg
) = bRegister
;
980 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONTHEATERMODE
, &dispparams
);
985 static HRESULT WINAPI
WebBrowser_get_AddressBar(IWebBrowser2
*iface
, VARIANT_BOOL
*Value
)
987 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
989 TRACE("(%p)->(%p)\n", This
, Value
);
991 *Value
= This
->address_bar
;
995 static HRESULT WINAPI
WebBrowser_put_AddressBar(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
997 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
999 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
1001 TRACE("(%p)->(%x)\n", This
, Value
);
1003 This
->address_bar
= Value
? VARIANT_TRUE
: VARIANT_FALSE
;
1005 /* In opposition to InternetExplorer, all we should do here is
1006 * inform the embedder about the address bar change. */
1008 V_VT(&arg
) = VT_BOOL
;
1009 V_BOOL(&arg
) = Value
;
1010 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_ONADDRESSBAR
, &dispparams
);
1015 static HRESULT WINAPI
WebBrowser_get_Resizable(IWebBrowser2
*iface
, VARIANT_BOOL
*Value
)
1017 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
1019 TRACE("(%p)->(%p)\n", This
, Value
);
1021 /* It's InternetExplorer object's method. We have nothing to do here. */
1025 static HRESULT WINAPI
WebBrowser_put_Resizable(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
1027 WebBrowser
*This
= impl_from_IWebBrowser2(iface
);
1029 DISPPARAMS dispparams
= {&arg
, NULL
, 1, 0};
1031 TRACE("(%p)->(%x)\n", This
, Value
);
1033 /* In opposition to InternetExplorer, all we should do here is
1034 * inform the embedder about the resizable change. */
1036 V_VT(&arg
) = VT_BOOL
;
1037 V_BOOL(&arg
) = Value
;
1038 call_sink(This
->doc_host
.cps
.wbe2
, DISPID_WINDOWSETRESIZABLE
, &dispparams
);
1043 static const IWebBrowser2Vtbl WebBrowser2Vtbl
=
1045 WebBrowser_QueryInterface
,
1048 WebBrowser_GetTypeInfoCount
,
1049 WebBrowser_GetTypeInfo
,
1050 WebBrowser_GetIDsOfNames
,
1053 WebBrowser_GoForward
,
1055 WebBrowser_GoSearch
,
1056 WebBrowser_Navigate
,
1058 WebBrowser_Refresh2
,
1060 WebBrowser_get_Application
,
1061 WebBrowser_get_Parent
,
1062 WebBrowser_get_Container
,
1063 WebBrowser_get_Document
,
1064 WebBrowser_get_TopLevelContainer
,
1065 WebBrowser_get_Type
,
1066 WebBrowser_get_Left
,
1067 WebBrowser_put_Left
,
1070 WebBrowser_get_Width
,
1071 WebBrowser_put_Width
,
1072 WebBrowser_get_Height
,
1073 WebBrowser_put_Height
,
1074 WebBrowser_get_LocationName
,
1075 WebBrowser_get_LocationURL
,
1076 WebBrowser_get_Busy
,
1078 WebBrowser_ClientToWindow
,
1079 WebBrowser_PutProperty
,
1080 WebBrowser_GetProperty
,
1081 WebBrowser_get_Name
,
1082 WebBrowser_get_HWND
,
1083 WebBrowser_get_FullName
,
1084 WebBrowser_get_Path
,
1085 WebBrowser_get_Visible
,
1086 WebBrowser_put_Visible
,
1087 WebBrowser_get_StatusBar
,
1088 WebBrowser_put_StatusBar
,
1089 WebBrowser_get_StatusText
,
1090 WebBrowser_put_StatusText
,
1091 WebBrowser_get_ToolBar
,
1092 WebBrowser_put_ToolBar
,
1093 WebBrowser_get_MenuBar
,
1094 WebBrowser_put_MenuBar
,
1095 WebBrowser_get_FullScreen
,
1096 WebBrowser_put_FullScreen
,
1097 WebBrowser_Navigate2
,
1098 WebBrowser_QueryStatusWB
,
1100 WebBrowser_ShowBrowserBar
,
1101 WebBrowser_get_ReadyState
,
1102 WebBrowser_get_Offline
,
1103 WebBrowser_put_Offline
,
1104 WebBrowser_get_Silent
,
1105 WebBrowser_put_Silent
,
1106 WebBrowser_get_RegisterAsBrowser
,
1107 WebBrowser_put_RegisterAsBrowser
,
1108 WebBrowser_get_RegisterAsDropTarget
,
1109 WebBrowser_put_RegisterAsDropTarget
,
1110 WebBrowser_get_TheaterMode
,
1111 WebBrowser_put_TheaterMode
,
1112 WebBrowser_get_AddressBar
,
1113 WebBrowser_put_AddressBar
,
1114 WebBrowser_get_Resizable
,
1115 WebBrowser_put_Resizable
1118 static inline WebBrowser
*impl_from_IServiceProvider(IServiceProvider
*iface
)
1120 return CONTAINING_RECORD(iface
, WebBrowser
, IServiceProvider_iface
);
1123 static HRESULT WINAPI
WBServiceProvider_QueryInterface(IServiceProvider
*iface
,
1124 REFIID riid
, LPVOID
*ppv
)
1126 WebBrowser
*This
= impl_from_IServiceProvider(iface
);
1127 return IWebBrowser_QueryInterface(&This
->IWebBrowser2_iface
, riid
, ppv
);
1130 static ULONG WINAPI
WBServiceProvider_AddRef(IServiceProvider
*iface
)
1132 WebBrowser
*This
= impl_from_IServiceProvider(iface
);
1133 return IWebBrowser_AddRef(&This
->IWebBrowser2_iface
);
1136 static ULONG WINAPI
WBServiceProvider_Release(IServiceProvider
*iface
)
1138 WebBrowser
*This
= impl_from_IServiceProvider(iface
);
1139 return IWebBrowser_Release(&This
->IWebBrowser2_iface
);
1142 static HRESULT STDMETHODCALLTYPE
WBServiceProvider_QueryService(IServiceProvider
*iface
,
1143 REFGUID guidService
, REFIID riid
, void **ppv
)
1145 WebBrowser
*This
= impl_from_IServiceProvider(iface
);
1150 if(IsEqualGUID(&IID_IBrowserService2
, riid
)) {
1151 TRACE("(%p)->(IID_IBrowserService2 return E_FAIL)\n", This
);
1155 FIXME("(%p)->(%s, %s %p)\n", This
, debugstr_guid(guidService
), debugstr_guid(riid
), ppv
);
1157 return E_NOINTERFACE
;
1160 static const IServiceProviderVtbl ServiceProviderVtbl
=
1162 WBServiceProvider_QueryInterface
,
1163 WBServiceProvider_AddRef
,
1164 WBServiceProvider_Release
,
1165 WBServiceProvider_QueryService
1168 static inline WebBrowser
*impl_from_DocHost(DocHost
*iface
)
1170 return CONTAINING_RECORD(iface
, WebBrowser
, doc_host
);
1173 static ULONG
WebBrowser_addref(DocHost
*iface
)
1175 WebBrowser
*This
= impl_from_DocHost(iface
);
1176 return IWebBrowser2_AddRef(&This
->IWebBrowser2_iface
);
1179 static ULONG
WebBrowser_release(DocHost
*iface
)
1181 WebBrowser
*This
= impl_from_DocHost(iface
);
1182 return IWebBrowser2_Release(&This
->IWebBrowser2_iface
);
1185 static void WINAPI
DocHostContainer_GetDocObjRect(DocHost
* This
, RECT
* rc
)
1187 GetClientRect(This
->frame_hwnd
, rc
);
1190 static HRESULT WINAPI
DocHostContainer_SetStatusText(DocHost
* This
, LPCWSTR text
)
1195 static void WINAPI
DocHostContainer_SetURL(DocHost
* This
, LPCWSTR url
)
1200 static HRESULT
DocHostContainer_exec(DocHost
*doc_host
, const GUID
*cmd_group
, DWORD cmdid
, DWORD execopt
, VARIANT
*in
,
1203 WebBrowser
*This
= impl_from_DocHost(doc_host
);
1204 IOleCommandTarget
*cmdtrg
= NULL
;
1208 hres
= IOleClientSite_QueryInterface(This
->client
, &IID_IOleCommandTarget
, (void**)&cmdtrg
);
1213 if(!cmdtrg
&& This
->container
) {
1214 hres
= IOleContainer_QueryInterface(This
->container
, &IID_IOleCommandTarget
, (void**)&cmdtrg
);
1222 hres
= IOleCommandTarget_Exec(cmdtrg
, cmd_group
, cmdid
, execopt
, in
, out
);
1223 IOleCommandTarget_Release(cmdtrg
);
1225 FIXME("Exec failed\n");
1230 static const IDocHostContainerVtbl DocHostContainerVtbl
= {
1233 DocHostContainer_GetDocObjRect
,
1234 DocHostContainer_SetStatusText
,
1235 DocHostContainer_SetURL
,
1236 DocHostContainer_exec
1239 static HRESULT
create_webbrowser(int version
, IUnknown
*outer
, REFIID riid
, void **ppv
)
1244 TRACE("(%p %s %p) version=%d\n", outer
, debugstr_guid(riid
), ppv
, version
);
1246 ret
= heap_alloc_zero(sizeof(WebBrowser
));
1248 ret
->IWebBrowser2_iface
.lpVtbl
= &WebBrowser2Vtbl
;
1249 ret
->IServiceProvider_iface
.lpVtbl
= &ServiceProviderVtbl
;
1251 ret
->version
= version
;
1253 DocHost_Init(&ret
->doc_host
, (IDispatch
*)&ret
->IWebBrowser2_iface
, &DocHostContainerVtbl
);
1255 ret
->visible
= VARIANT_TRUE
;
1256 ret
->menu_bar
= VARIANT_TRUE
;
1257 ret
->address_bar
= VARIANT_TRUE
;
1258 ret
->status_bar
= VARIANT_TRUE
;
1259 ret
->tool_bar
= VARIANT_TRUE
;
1261 WebBrowser_OleObject_Init(ret
);
1262 WebBrowser_ViewObject_Init(ret
);
1263 WebBrowser_Persist_Init(ret
);
1264 WebBrowser_ClassInfo_Init(ret
);
1266 HlinkFrame_Init(&ret
->hlink_frame
, (IUnknown
*)&ret
->IWebBrowser2_iface
, &ret
->doc_host
);
1270 hres
= IWebBrowser_QueryInterface(&ret
->IWebBrowser2_iface
, riid
, ppv
);
1272 IWebBrowser2_Release(&ret
->IWebBrowser2_iface
);
1276 HRESULT WINAPI
WebBrowserV1_Create(IClassFactory
*iface
, IUnknown
*pOuter
, REFIID riid
, void **ppv
)
1278 return create_webbrowser(1, pOuter
, riid
, ppv
);
1281 HRESULT WINAPI
WebBrowser_Create(IClassFactory
*iface
, IUnknown
*pOuter
, REFIID riid
, void **ppv
)
1283 return create_webbrowser(2, pOuter
, riid
, ppv
);