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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "wine/debug.h"
25 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw
);
27 /**********************************************************************
28 * Implement the IWebBrowser interface
31 #define WEBBROWSER_THIS(iface) DEFINE_THIS(WebBrowser, WebBrowser2, iface)
33 static HRESULT WINAPI
WebBrowser_QueryInterface(IWebBrowser2
*iface
, REFIID riid
, LPVOID
*ppv
)
35 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
41 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
42 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
43 *ppv
= WEBBROWSER(This
);
44 }else if(IsEqualGUID(&IID_IDispatch
, riid
)) {
45 TRACE("(%p)->(IID_IDispatch %p)\n", This
, ppv
);
46 *ppv
= WEBBROWSER(This
);
47 }else if(IsEqualGUID(&IID_IWebBrowser
, riid
)) {
48 TRACE("(%p)->(IID_IWebBrowser %p)\n", This
, ppv
);
49 *ppv
= WEBBROWSER(This
);
50 }else if(IsEqualGUID(&IID_IWebBrowserApp
, riid
)) {
51 TRACE("(%p)->(IID_IWebBrowserApp %p)\n", This
, ppv
);
52 *ppv
= WEBBROWSER(This
);
53 }else if(IsEqualGUID(&IID_IWebBrowser2
, riid
)) {
54 TRACE("(%p)->(IID_IWebBrowser2 %p)\n", This
, ppv
);
55 *ppv
= WEBBROWSER(This
);
56 }else if(IsEqualGUID(&IID_IOleObject
, riid
)) {
57 TRACE("(%p)->(IID_IOleObject %p)\n", This
, ppv
);
59 }else if(IsEqualGUID(&IID_IOleWindow
, riid
)) {
60 TRACE("(%p)->(IID_IOleWindow %p)\n", This
, ppv
);
61 *ppv
= INPLACEOBJ(This
);
62 }else if(IsEqualGUID (&IID_IOleInPlaceObject
, riid
)) {
63 TRACE("(%p)->(IID_IOleInPlaceObject %p)\n", This
, ppv
);
64 *ppv
= INPLACEOBJ(This
);
65 }else if(IsEqualGUID(&IID_IOleControl
, riid
)) {
66 TRACE("(%p)->(IID_IOleControl %p)\n", This
, ppv
);
68 }else if(IsEqualGUID(&IID_IPersist
, riid
)) {
69 TRACE("(%p)->(IID_IPersist %p)\n", This
, ppv
);
70 *ppv
= PERSTORAGE(This
);
71 }else if(IsEqualGUID(&IID_IPersistStorage
, riid
)) {
72 TRACE("(%p)->(IID_IPersistStorage %p)\n", This
, ppv
);
73 *ppv
= PERSTORAGE(This
);
74 }else if(IsEqualGUID (&IID_IPersistStreamInit
, riid
)) {
75 TRACE("(%p)->(IID_IPersistStreamInit %p)\n", This
, ppv
);
76 *ppv
= PERSTRINIT(This
);
77 }else if(IsEqualGUID(&IID_IProvideClassInfo
, riid
)) {
78 TRACE("(%p)->(IID_IProvideClassInfo %p)\n", This
, ppv
);
79 *ppv
= CLASSINFO(This
);
80 }else if(IsEqualGUID(&IID_IProvideClassInfo2
, riid
)) {
81 TRACE("(%p)->(IID_IProvideClassInfo2 %p)\n", This
, ppv
);
82 *ppv
= CLASSINFO(This
);
83 }else if(IsEqualGUID(&IID_IConnectionPointContainer
, riid
)) {
84 TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This
, ppv
);
85 *ppv
= CONPTCONT(This
);
86 }else if(IsEqualGUID(&IID_IViewObject
, riid
)) {
87 TRACE("(%p)->(IID_IViewObject %p)\n", This
, ppv
);
89 }else if(IsEqualGUID(&IID_IViewObject2
, riid
)) {
90 TRACE("(%p)->(IID_IViewObject2 %p)\n", This
, ppv
);
91 *ppv
= VIEWOBJ2(This
);
92 }else if(IsEqualGUID(&IID_IOleInPlaceActiveObject
, riid
)) {
93 TRACE("(%p)->(IID_IOleInPlaceActiveObject %p)\n", This
, ppv
);
94 *ppv
= ACTIVEOBJ(This
);
95 }else if(IsEqualGUID(&IID_IOleCommandTarget
, riid
)) {
96 TRACE("(%p)->(IID_IOleCommandTarget %p)\n", This
, ppv
);
97 *ppv
= WBOLECMD(This
);
98 }else if(IsEqualGUID(&IID_IHlinkFrame
, riid
)) {
99 TRACE("(%p)->(IID_IHlinkFrame %p)\n", This
, ppv
);
100 *ppv
= HLINKFRAME(This
);
104 IUnknown_AddRef((IUnknown
*)*ppv
);
108 FIXME("(%p)->(%s %p) interface not supported\n", This
, debugstr_guid(riid
), ppv
);
109 return E_NOINTERFACE
;
112 static ULONG WINAPI
WebBrowser_AddRef(IWebBrowser2
*iface
)
114 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
115 LONG ref
= InterlockedIncrement(&This
->ref
);
116 TRACE("(%p) ref=%ld\n", This
, ref
);
120 static ULONG WINAPI
WebBrowser_Release(IWebBrowser2
*iface
)
122 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
123 LONG ref
= InterlockedDecrement(&This
->ref
);
125 TRACE("(%p) ref=%ld\n", This
, ref
);
129 IUnknown_Release(This
->document
);
131 WebBrowser_OleObject_Destroy(This
);
132 WebBrowser_Events_Destroy(This
);
133 WebBrowser_ClientSite_Destroy(This
);
135 SysFreeString(This
->url
);
136 HeapFree(GetProcessHeap(), 0, This
);
137 SHDOCVW_UnlockModule();
143 /* IDispatch methods */
144 static HRESULT WINAPI
WebBrowser_GetTypeInfoCount(IWebBrowser2
*iface
, UINT
*pctinfo
)
146 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
147 FIXME("(%p)->(%p)\n", This
, pctinfo
);
151 static HRESULT WINAPI
WebBrowser_GetTypeInfo(IWebBrowser2
*iface
, UINT iTInfo
, LCID lcid
,
154 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
155 FIXME("(%p)->(%d %ld %p)\n", This
, iTInfo
, lcid
, ppTInfo
);
159 static HRESULT WINAPI
WebBrowser_GetIDsOfNames(IWebBrowser2
*iface
, REFIID riid
,
160 LPOLESTR
*rgszNames
, UINT cNames
,
161 LCID lcid
, DISPID
*rgDispId
)
163 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
164 FIXME("(%p)->(%s %p %d %ld %p)\n", This
, debugstr_guid(riid
), rgszNames
, cNames
,
169 static HRESULT WINAPI
WebBrowser_Invoke(IWebBrowser2
*iface
, DISPID dispIdMember
,
170 REFIID riid
, LCID lcid
, WORD wFlags
,
171 DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
,
172 EXCEPINFO
*pExepInfo
, UINT
*puArgErr
)
174 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
175 FIXME("(%p)->(%ld %s %ld %08x %p %p %p %p)\n", This
, dispIdMember
, debugstr_guid(riid
),
176 lcid
, wFlags
, pDispParams
, pVarResult
, pExepInfo
, puArgErr
);
180 /* IWebBrowser methods */
181 static HRESULT WINAPI
WebBrowser_GoBack(IWebBrowser2
*iface
)
183 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
184 FIXME("(%p)\n", This
);
188 static HRESULT WINAPI
WebBrowser_GoForward(IWebBrowser2
*iface
)
190 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
191 FIXME("(%p)\n", This
);
195 static HRESULT WINAPI
WebBrowser_GoHome(IWebBrowser2
*iface
)
197 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
198 FIXME("(%p)\n", This
);
202 static HRESULT WINAPI
WebBrowser_GoSearch(IWebBrowser2
*iface
)
204 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
205 FIXME("(%p)\n", This
);
209 static HRESULT WINAPI
WebBrowser_Navigate(IWebBrowser2
*iface
, BSTR URL
,
210 VARIANT
*Flags
, VARIANT
*TargetFrameName
,
211 VARIANT
*PostData
, VARIANT
*Headers
)
213 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
214 FIXME("(%p)->(%s %p %p %p %p)\n", This
, debugstr_w(URL
), Flags
, TargetFrameName
,
219 static HRESULT WINAPI
WebBrowser_Refresh(IWebBrowser2
*iface
)
221 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
222 FIXME("(%p)\n", This
);
226 static HRESULT WINAPI
WebBrowser_Refresh2(IWebBrowser2
*iface
, VARIANT
*Level
)
228 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
229 FIXME("(%p)->(%p)\n", This
, Level
);
233 static HRESULT WINAPI
WebBrowser_Stop(IWebBrowser2
*iface
)
235 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
236 FIXME("(%p)\n", This
);
240 static HRESULT WINAPI
WebBrowser_get_Application(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
242 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
243 FIXME("(%p)->(%p)\n", This
, ppDisp
);
247 static HRESULT WINAPI
WebBrowser_get_Parent(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
249 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
250 FIXME("(%p)->(%p)\n", This
, ppDisp
);
254 static HRESULT WINAPI
WebBrowser_get_Container(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
256 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
257 FIXME("(%p)->(%p)\n", This
, ppDisp
);
261 static HRESULT WINAPI
WebBrowser_get_Document(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
263 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
265 TRACE("(%p)->(%p)\n", This
, ppDisp
);
269 IUnknown_QueryInterface(This
->document
, &IID_IDispatch
, (void**)ppDisp
);
274 static HRESULT WINAPI
WebBrowser_get_TopLevelContainer(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
276 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
277 FIXME("(%p)->(%p)\n", This
, pBool
);
281 static HRESULT WINAPI
WebBrowser_get_Type(IWebBrowser2
*iface
, BSTR
*Type
)
283 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
284 FIXME("(%p)->(%p)\n", This
, Type
);
288 static HRESULT WINAPI
WebBrowser_get_Left(IWebBrowser2
*iface
, long *pl
)
290 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
291 FIXME("(%p)->(%p)\n", This
, pl
);
295 static HRESULT WINAPI
WebBrowser_put_Left(IWebBrowser2
*iface
, long Left
)
297 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
298 FIXME("(%p)->(%ld)\n", This
, Left
);
302 static HRESULT WINAPI
WebBrowser_get_Top(IWebBrowser2
*iface
, long *pl
)
304 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
305 FIXME("(%p)->(%p)\n", This
, pl
);
309 static HRESULT WINAPI
WebBrowser_put_Top(IWebBrowser2
*iface
, long Top
)
311 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
312 FIXME("(%p)->(%ld)\n", This
, Top
);
316 static HRESULT WINAPI
WebBrowser_get_Width(IWebBrowser2
*iface
, long *pl
)
318 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
319 FIXME("(%p)->(%p)\n", This
, pl
);
323 static HRESULT WINAPI
WebBrowser_put_Width(IWebBrowser2
*iface
, long Width
)
325 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
326 FIXME("(%p)->(%ld)\n", This
, Width
);
330 static HRESULT WINAPI
WebBrowser_get_Height(IWebBrowser2
*iface
, long *pl
)
332 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
333 FIXME("(%p)->(%p)\n", This
, pl
);
337 static HRESULT WINAPI
WebBrowser_put_Height(IWebBrowser2
*iface
, long Height
)
339 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
340 FIXME("(%p)->(%ld)\n", This
, Height
);
344 static HRESULT WINAPI
WebBrowser_get_LocationName(IWebBrowser2
*iface
, BSTR
*LocationName
)
346 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
347 FIXME("(%p)->(%p)\n", This
, LocationName
);
351 static HRESULT WINAPI
WebBrowser_get_LocationURL(IWebBrowser2
*iface
, BSTR
*LocationURL
)
353 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
355 FIXME("(%p)->(%p)\n", This
, LocationURL
);
358 static const WCHAR null_char
= 0;
359 *LocationURL
= SysAllocString(&null_char
);
363 *LocationURL
= SysAllocString(This
->url
);
367 static HRESULT WINAPI
WebBrowser_get_Busy(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
369 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
370 FIXME("(%p)->(%p)\n", This
, pBool
);
374 static HRESULT WINAPI
WebBrowser_Quit(IWebBrowser2
*iface
)
376 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
377 FIXME("(%p)\n", This
);
381 static HRESULT WINAPI
WebBrowser_ClientToWindow(IWebBrowser2
*iface
, int *pcx
, int *pcy
)
383 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
384 FIXME("(%p)->(%p %p)\n", This
, pcx
, pcy
);
388 static HRESULT WINAPI
WebBrowser_PutProperty(IWebBrowser2
*iface
, BSTR szProperty
, VARIANT vtValue
)
390 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
391 FIXME("(%p)->(%s)\n", This
, debugstr_w(szProperty
));
395 static HRESULT WINAPI
WebBrowser_GetProperty(IWebBrowser2
*iface
, BSTR szProperty
, VARIANT
*pvtValue
)
397 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
398 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(szProperty
), pvtValue
);
402 static HRESULT WINAPI
WebBrowser_get_Name(IWebBrowser2
*iface
, BSTR
*Name
)
404 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
405 FIXME("(%p)->(%p)\n", This
, Name
);
409 static HRESULT WINAPI
WebBrowser_get_HWND(IWebBrowser2
*iface
, long *pHWND
)
411 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
412 FIXME("(%p)->(%p)\n", This
, pHWND
);
416 static HRESULT WINAPI
WebBrowser_get_FullName(IWebBrowser2
*iface
, BSTR
*FullName
)
418 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
419 FIXME("(%p)->(%p)\n", This
, FullName
);
423 static HRESULT WINAPI
WebBrowser_get_Path(IWebBrowser2
*iface
, BSTR
*Path
)
425 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
426 FIXME("(%p)->(%p)\n", This
, Path
);
430 static HRESULT WINAPI
WebBrowser_get_Visible(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
432 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
433 FIXME("(%p)->(%p)\n", This
, pBool
);
437 static HRESULT WINAPI
WebBrowser_put_Visible(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
439 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
440 FIXME("(%p)->(%x)\n", This
, Value
);
444 static HRESULT WINAPI
WebBrowser_get_StatusBar(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
446 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
447 FIXME("(%p)->(%p)\n", This
, pBool
);
451 static HRESULT WINAPI
WebBrowser_put_StatusBar(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
453 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
454 FIXME("(%p)->(%x)\n", This
, Value
);
458 static HRESULT WINAPI
WebBrowser_get_StatusText(IWebBrowser2
*iface
, BSTR
*StatusText
)
460 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
461 FIXME("(%p)->(%p)\n", This
, StatusText
);
465 static HRESULT WINAPI
WebBrowser_put_StatusText(IWebBrowser2
*iface
, BSTR StatusText
)
467 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
468 FIXME("(%p)->(%s)\n", This
, debugstr_w(StatusText
));
472 static HRESULT WINAPI
WebBrowser_get_ToolBar(IWebBrowser2
*iface
, int *Value
)
474 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
475 FIXME("(%p)->(%p)\n", This
, Value
);
479 static HRESULT WINAPI
WebBrowser_put_ToolBar(IWebBrowser2
*iface
, int Value
)
481 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
482 FIXME("(%p)->(%d)\n", This
, Value
);
486 static HRESULT WINAPI
WebBrowser_get_MenuBar(IWebBrowser2
*iface
, VARIANT_BOOL
*Value
)
488 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
489 FIXME("(%p)->(%p)\n", This
, Value
);
493 static HRESULT WINAPI
WebBrowser_put_MenuBar(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
495 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
496 FIXME("(%p)->(%x)\n", This
, Value
);
500 static HRESULT WINAPI
WebBrowser_get_FullScreen(IWebBrowser2
*iface
, VARIANT_BOOL
*pbFullScreen
)
502 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
503 FIXME("(%p)->(%p)\n", This
, pbFullScreen
);
507 static HRESULT WINAPI
WebBrowser_put_FullScreen(IWebBrowser2
*iface
, VARIANT_BOOL bFullScreen
)
509 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
510 FIXME("(%p)->(%x)\n", This
, bFullScreen
);
514 static HRESULT WINAPI
WebBrowser_Navigate2(IWebBrowser2
*iface
, VARIANT
*URL
, VARIANT
*Flags
,
515 VARIANT
*TargetFrameName
, VARIANT
*PostData
, VARIANT
*Headers
)
517 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
518 PBYTE post_data
= NULL
;
519 ULONG post_data_len
= 0;
520 LPWSTR headers
= NULL
;
523 TRACE("(%p)->(%p %p %p %p %p)\n", This
, URL
, Flags
, TargetFrameName
, PostData
, Headers
);
528 if((Flags
&& V_VT(Flags
) != VT_EMPTY
)
529 || (TargetFrameName
&& V_VT(TargetFrameName
) != VT_EMPTY
))
530 FIXME("Unsupported arguments\n");
536 if(V_VT(URL
) != VT_BSTR
)
539 if(PostData
&& V_VT(PostData
) != VT_EMPTY
) {
540 if(V_VT(PostData
) != (VT_ARRAY
| VT_UI1
)
541 || V_ARRAY(PostData
)->cDims
!= 1) {
542 WARN("Invalid PostData\n");
546 SafeArrayAccessData(V_ARRAY(PostData
), (void**)&post_data
);
547 post_data_len
= V_ARRAY(PostData
)->rgsabound
[0].cElements
;
550 if(Headers
&& V_VT(Headers
) != VT_EMPTY
) {
551 if(V_VT(Headers
) != VT_BSTR
)
554 headers
= V_BSTR(Headers
);
555 TRACE("Headers: %s\n", debugstr_w(headers
));
558 if(!This
->doc_view_hwnd
)
559 create_doc_view_hwnd(This
);
561 hres
= navigate_url(This
, V_BSTR(URL
), post_data
, post_data_len
, headers
);
564 SafeArrayUnaccessData(V_ARRAY(PostData
));
569 static HRESULT WINAPI
WebBrowser_QueryStatusWB(IWebBrowser2
*iface
, OLECMDID cmdID
, OLECMDF
*pcmdf
)
571 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
572 FIXME("(%p)->(%d %p)\n", This
, cmdID
, pcmdf
);
576 static HRESULT WINAPI
WebBrowser_ExecWB(IWebBrowser2
*iface
, OLECMDID cmdID
,
577 OLECMDEXECOPT cmdexecopt
, VARIANT
*pvaIn
, VARIANT
*pvaOut
)
579 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
580 FIXME("(%p)->(%d %d %p %p)\n", This
, cmdID
, cmdexecopt
, pvaIn
, pvaOut
);
584 static HRESULT WINAPI
WebBrowser_ShowBrowserBar(IWebBrowser2
*iface
, VARIANT
*pvaClsid
,
585 VARIANT
*pvarShow
, VARIANT
*pvarSize
)
587 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
588 FIXME("(%p)->(%p %p %p)\n", This
, pvaClsid
, pvarShow
, pvarSize
);
592 static HRESULT WINAPI
WebBrowser_get_ReadyState(IWebBrowser2
*iface
, READYSTATE
*lpReadyState
)
594 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
595 FIXME("(%p)->(%p)\n", This
, lpReadyState
);
599 static HRESULT WINAPI
WebBrowser_get_Offline(IWebBrowser2
*iface
, VARIANT_BOOL
*pbOffline
)
601 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
602 FIXME("(%p)->(%p)\n", This
, pbOffline
);
606 static HRESULT WINAPI
WebBrowser_put_Offline(IWebBrowser2
*iface
, VARIANT_BOOL bOffline
)
608 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
609 FIXME("(%p)->(%x)\n", This
, bOffline
);
613 static HRESULT WINAPI
WebBrowser_get_Silent(IWebBrowser2
*iface
, VARIANT_BOOL
*pbSilent
)
615 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
616 FIXME("(%p)->(%p)\n", This
, pbSilent
);
620 static HRESULT WINAPI
WebBrowser_put_Silent(IWebBrowser2
*iface
, VARIANT_BOOL bSilent
)
622 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
623 FIXME("(%p)->(%x)\n", This
, bSilent
);
627 static HRESULT WINAPI
WebBrowser_get_RegisterAsBrowser(IWebBrowser2
*iface
,
628 VARIANT_BOOL
*pbRegister
)
630 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
631 FIXME("(%p)->(%p)\n", This
, pbRegister
);
635 static HRESULT WINAPI
WebBrowser_put_RegisterAsBrowser(IWebBrowser2
*iface
,
636 VARIANT_BOOL bRegister
)
638 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
639 FIXME("(%p)->(%x)\n", This
, bRegister
);
643 static HRESULT WINAPI
WebBrowser_get_RegisterAsDropTarget(IWebBrowser2
*iface
,
644 VARIANT_BOOL
*pbRegister
)
646 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
647 FIXME("(%p)->(%p)\n", This
, pbRegister
);
651 static HRESULT WINAPI
WebBrowser_put_RegisterAsDropTarget(IWebBrowser2
*iface
,
652 VARIANT_BOOL bRegister
)
654 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
655 FIXME("(%p)->(%x)\n", This
, bRegister
);
659 static HRESULT WINAPI
WebBrowser_get_TheaterMode(IWebBrowser2
*iface
, VARIANT_BOOL
*pbRegister
)
661 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
662 FIXME("(%p)->(%p)\n", This
, pbRegister
);
666 static HRESULT WINAPI
WebBrowser_put_TheaterMode(IWebBrowser2
*iface
, VARIANT_BOOL bRegister
)
668 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
669 FIXME("(%p)->(%x)\n", This
, bRegister
);
673 static HRESULT WINAPI
WebBrowser_get_AddressBar(IWebBrowser2
*iface
, VARIANT_BOOL
*Value
)
675 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
676 FIXME("(%p)->(%p)\n", This
, Value
);
680 static HRESULT WINAPI
WebBrowser_put_AddressBar(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
682 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
683 FIXME("(%p)->(%x)\n", This
, Value
);
687 static HRESULT WINAPI
WebBrowser_get_Resizable(IWebBrowser2
*iface
, VARIANT_BOOL
*Value
)
689 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
690 FIXME("(%p)->(%p)\n", This
, Value
);
694 static HRESULT WINAPI
WebBrowser_put_Resizable(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
696 WebBrowser
*This
= WEBBROWSER_THIS(iface
);
697 FIXME("(%p)->(%x)\n", This
, Value
);
701 #undef WEBBROWSER_THIS
703 static const IWebBrowser2Vtbl WebBrowser2Vtbl
=
705 WebBrowser_QueryInterface
,
708 WebBrowser_GetTypeInfoCount
,
709 WebBrowser_GetTypeInfo
,
710 WebBrowser_GetIDsOfNames
,
713 WebBrowser_GoForward
,
720 WebBrowser_get_Application
,
721 WebBrowser_get_Parent
,
722 WebBrowser_get_Container
,
723 WebBrowser_get_Document
,
724 WebBrowser_get_TopLevelContainer
,
730 WebBrowser_get_Width
,
731 WebBrowser_put_Width
,
732 WebBrowser_get_Height
,
733 WebBrowser_put_Height
,
734 WebBrowser_get_LocationName
,
735 WebBrowser_get_LocationURL
,
738 WebBrowser_ClientToWindow
,
739 WebBrowser_PutProperty
,
740 WebBrowser_GetProperty
,
743 WebBrowser_get_FullName
,
745 WebBrowser_get_Visible
,
746 WebBrowser_put_Visible
,
747 WebBrowser_get_StatusBar
,
748 WebBrowser_put_StatusBar
,
749 WebBrowser_get_StatusText
,
750 WebBrowser_put_StatusText
,
751 WebBrowser_get_ToolBar
,
752 WebBrowser_put_ToolBar
,
753 WebBrowser_get_MenuBar
,
754 WebBrowser_put_MenuBar
,
755 WebBrowser_get_FullScreen
,
756 WebBrowser_put_FullScreen
,
757 WebBrowser_Navigate2
,
758 WebBrowser_QueryStatusWB
,
760 WebBrowser_ShowBrowserBar
,
761 WebBrowser_get_ReadyState
,
762 WebBrowser_get_Offline
,
763 WebBrowser_put_Offline
,
764 WebBrowser_get_Silent
,
765 WebBrowser_put_Silent
,
766 WebBrowser_get_RegisterAsBrowser
,
767 WebBrowser_put_RegisterAsBrowser
,
768 WebBrowser_get_RegisterAsDropTarget
,
769 WebBrowser_put_RegisterAsDropTarget
,
770 WebBrowser_get_TheaterMode
,
771 WebBrowser_put_TheaterMode
,
772 WebBrowser_get_AddressBar
,
773 WebBrowser_put_AddressBar
,
774 WebBrowser_get_Resizable
,
775 WebBrowser_put_Resizable
778 HRESULT
WebBrowser_Create(IUnknown
*pOuter
, REFIID riid
, void **ppv
)
783 TRACE("(%p %s %p)\n", pOuter
, debugstr_guid(riid
), ppv
);
785 ret
= HeapAlloc(GetProcessHeap(), 0, sizeof(WebBrowser
));
787 ret
->lpWebBrowser2Vtbl
= &WebBrowser2Vtbl
;
790 ret
->document
= NULL
;
793 WebBrowser_OleObject_Init(ret
);
794 WebBrowser_ViewObject_Init(ret
);
795 WebBrowser_Persist_Init(ret
);
796 WebBrowser_ClassInfo_Init(ret
);
797 WebBrowser_Events_Init(ret
);
798 WebBrowser_ClientSite_Init(ret
);
799 WebBrowser_DocHost_Init(ret
);
800 WebBrowser_Frame_Init(ret
);
801 WebBrowser_HlinkFrame_Init(ret
);
803 hres
= IWebBrowser_QueryInterface(WEBBROWSER(ret
), riid
, ppv
);
804 if(SUCCEEDED(hres
)) {
805 SHDOCVW_LockModule();
807 HeapFree(GetProcessHeap(), 0, ret
);