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);
128 if(This->doc_host.document)
129 IUnknown_Release(This->doc_host.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 szUrl,
210 VARIANT *Flags, VARIANT *TargetFrameName,
211 VARIANT *PostData, VARIANT *Headers)
213 WebBrowser *This = WEBBROWSER_THIS(iface);
217 FIXME("(%p)->(%s %p %p %p %p)\n", This, debugstr_w(szUrl), Flags, TargetFrameName,
220 V_VT(&url) = VT_BSTR;
221 V_BSTR(&url) = szUrl;
222 r = IWebBrowser2_Navigate2(iface, &url, Flags,
223 TargetFrameName, PostData, Headers);
228 static HRESULT WINAPI WebBrowser_Refresh(IWebBrowser2 *iface)
230 WebBrowser *This = WEBBROWSER_THIS(iface);
231 FIXME("(%p)\n", This);
235 static HRESULT WINAPI WebBrowser_Refresh2(IWebBrowser2 *iface, VARIANT *Level)
237 WebBrowser *This = WEBBROWSER_THIS(iface);
238 FIXME("(%p)->(%p)\n", This, Level);
242 static HRESULT WINAPI WebBrowser_Stop(IWebBrowser2 *iface)
244 WebBrowser *This = WEBBROWSER_THIS(iface);
245 FIXME("(%p)\n", This);
249 static HRESULT WINAPI WebBrowser_get_Application(IWebBrowser2 *iface, IDispatch **ppDisp)
251 WebBrowser *This = WEBBROWSER_THIS(iface);
252 FIXME("(%p)->(%p)\n", This, ppDisp);
256 static HRESULT WINAPI WebBrowser_get_Parent(IWebBrowser2 *iface, IDispatch **ppDisp)
258 WebBrowser *This = WEBBROWSER_THIS(iface);
259 FIXME("(%p)->(%p)\n", This, ppDisp);
263 static HRESULT WINAPI WebBrowser_get_Container(IWebBrowser2 *iface, IDispatch **ppDisp)
265 WebBrowser *This = WEBBROWSER_THIS(iface);
266 FIXME("(%p)->(%p)\n", This, ppDisp);
270 static HRESULT WINAPI WebBrowser_get_Document(IWebBrowser2 *iface, IDispatch **ppDisp)
272 WebBrowser *This = WEBBROWSER_THIS(iface);
274 TRACE("(%p)->(%p)\n", This, ppDisp);
277 if(This->doc_host.document)
278 IUnknown_QueryInterface(This->doc_host.document, &IID_IDispatch, (void**)ppDisp);
283 static HRESULT WINAPI WebBrowser_get_TopLevelContainer(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
285 WebBrowser *This = WEBBROWSER_THIS(iface);
286 FIXME("(%p)->(%p)\n", This, pBool);
290 static HRESULT WINAPI WebBrowser_get_Type(IWebBrowser2 *iface, BSTR *Type)
292 WebBrowser *This = WEBBROWSER_THIS(iface);
293 FIXME("(%p)->(%p)\n", This, Type);
297 static HRESULT WINAPI WebBrowser_get_Left(IWebBrowser2 *iface, long *pl)
299 WebBrowser *This = WEBBROWSER_THIS(iface);
301 TRACE("(%p)->(%p)\n", This, pl);
303 *pl = This->pos_rect.left;
307 static HRESULT WINAPI WebBrowser_put_Left(IWebBrowser2 *iface, long Left)
309 WebBrowser *This = WEBBROWSER_THIS(iface);
312 TRACE("(%p)->(%ld)\n", This, Left);
317 memcpy(&rect, &This->pos_rect, sizeof(RECT));
320 return IOleInPlaceSite_OnPosRectChange(This->inplace, &rect);
323 static HRESULT WINAPI WebBrowser_get_Top(IWebBrowser2 *iface, long *pl)
325 WebBrowser *This = WEBBROWSER_THIS(iface);
327 TRACE("(%p)->(%p)\n", This, pl);
329 *pl = This->pos_rect.top;
333 static HRESULT WINAPI WebBrowser_put_Top(IWebBrowser2 *iface, long Top)
335 WebBrowser *This = WEBBROWSER_THIS(iface);
338 TRACE("(%p)->(%ld)\n", This, Top);
343 memcpy(&rect, &This->pos_rect, sizeof(RECT));
346 return IOleInPlaceSite_OnPosRectChange(This->inplace, &rect);
349 static HRESULT WINAPI WebBrowser_get_Width(IWebBrowser2 *iface, long *pl)
351 WebBrowser *This = WEBBROWSER_THIS(iface);
353 TRACE("(%p)->(%p)\n", This, pl);
355 *pl = This->pos_rect.right - This->pos_rect.left;
359 static HRESULT WINAPI WebBrowser_put_Width(IWebBrowser2 *iface, long Width)
361 WebBrowser *This = WEBBROWSER_THIS(iface);
364 TRACE("(%p)->(%ld)\n", This, Width);
369 memcpy(&rect, &This->pos_rect, sizeof(RECT));
370 rect.right = rect.left+Width;
372 return IOleInPlaceSite_OnPosRectChange(This->inplace, &rect);
375 static HRESULT WINAPI WebBrowser_get_Height(IWebBrowser2 *iface, long *pl)
377 WebBrowser *This = WEBBROWSER_THIS(iface);
379 TRACE("(%p)->(%p)\n", This, pl);
381 *pl = This->pos_rect.bottom - This->pos_rect.top;
385 static HRESULT WINAPI WebBrowser_put_Height(IWebBrowser2 *iface, long Height)
387 WebBrowser *This = WEBBROWSER_THIS(iface);
390 TRACE("(%p)->(%ld)\n", This, Height);
395 memcpy(&rect, &This->pos_rect, sizeof(RECT));
396 rect.bottom = rect.top+Height;
398 return IOleInPlaceSite_OnPosRectChange(This->inplace, &rect);
401 static HRESULT WINAPI WebBrowser_get_LocationName(IWebBrowser2 *iface, BSTR *LocationName)
403 WebBrowser *This = WEBBROWSER_THIS(iface);
404 FIXME("(%p)->(%p)\n", This, LocationName);
408 static HRESULT WINAPI WebBrowser_get_LocationURL(IWebBrowser2 *iface, BSTR *LocationURL)
410 WebBrowser *This = WEBBROWSER_THIS(iface);
412 FIXME("(%p)->(%p)\n", This, LocationURL);
415 static const WCHAR null_char = 0;
416 *LocationURL = SysAllocString(&null_char);
420 *LocationURL = SysAllocString(This->url);
424 static HRESULT WINAPI WebBrowser_get_Busy(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
426 WebBrowser *This = WEBBROWSER_THIS(iface);
427 FIXME("(%p)->(%p)\n", This, pBool);
431 static HRESULT WINAPI WebBrowser_Quit(IWebBrowser2 *iface)
433 WebBrowser *This = WEBBROWSER_THIS(iface);
434 FIXME("(%p)\n", This);
438 static HRESULT WINAPI WebBrowser_ClientToWindow(IWebBrowser2 *iface, int *pcx, int *pcy)
440 WebBrowser *This = WEBBROWSER_THIS(iface);
441 FIXME("(%p)->(%p %p)\n", This, pcx, pcy);
445 static HRESULT WINAPI WebBrowser_PutProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT vtValue)
447 WebBrowser *This = WEBBROWSER_THIS(iface);
448 FIXME("(%p)->(%s)\n", This, debugstr_w(szProperty));
452 static HRESULT WINAPI WebBrowser_GetProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT *pvtValue)
454 WebBrowser *This = WEBBROWSER_THIS(iface);
455 FIXME("(%p)->(%s %p)\n", This, debugstr_w(szProperty), pvtValue);
459 static HRESULT WINAPI WebBrowser_get_Name(IWebBrowser2 *iface, BSTR *Name)
461 WebBrowser *This = WEBBROWSER_THIS(iface);
462 FIXME("(%p)->(%p)\n", This, Name);
466 static HRESULT WINAPI WebBrowser_get_HWND(IWebBrowser2 *iface, long *pHWND)
468 WebBrowser *This = WEBBROWSER_THIS(iface);
469 FIXME("(%p)->(%p)\n", This, pHWND);
473 static HRESULT WINAPI WebBrowser_get_FullName(IWebBrowser2 *iface, BSTR *FullName)
475 WebBrowser *This = WEBBROWSER_THIS(iface);
476 FIXME("(%p)->(%p)\n", This, FullName);
480 static HRESULT WINAPI WebBrowser_get_Path(IWebBrowser2 *iface, BSTR *Path)
482 WebBrowser *This = WEBBROWSER_THIS(iface);
483 FIXME("(%p)->(%p)\n", This, Path);
487 static HRESULT WINAPI WebBrowser_get_Visible(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
489 WebBrowser *This = WEBBROWSER_THIS(iface);
490 FIXME("(%p)->(%p)\n", This, pBool);
494 static HRESULT WINAPI WebBrowser_put_Visible(IWebBrowser2 *iface, VARIANT_BOOL Value)
496 WebBrowser *This = WEBBROWSER_THIS(iface);
497 FIXME("(%p)->(%x)\n", This, Value);
501 static HRESULT WINAPI WebBrowser_get_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
503 WebBrowser *This = WEBBROWSER_THIS(iface);
504 FIXME("(%p)->(%p)\n", This, pBool);
508 static HRESULT WINAPI WebBrowser_put_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
510 WebBrowser *This = WEBBROWSER_THIS(iface);
511 FIXME("(%p)->(%x)\n", This, Value);
515 static HRESULT WINAPI WebBrowser_get_StatusText(IWebBrowser2 *iface, BSTR *StatusText)
517 WebBrowser *This = WEBBROWSER_THIS(iface);
518 FIXME("(%p)->(%p)\n", This, StatusText);
522 static HRESULT WINAPI WebBrowser_put_StatusText(IWebBrowser2 *iface, BSTR StatusText)
524 WebBrowser *This = WEBBROWSER_THIS(iface);
525 FIXME("(%p)->(%s)\n", This, debugstr_w(StatusText));
529 static HRESULT WINAPI WebBrowser_get_ToolBar(IWebBrowser2 *iface, int *Value)
531 WebBrowser *This = WEBBROWSER_THIS(iface);
532 FIXME("(%p)->(%p)\n", This, Value);
536 static HRESULT WINAPI WebBrowser_put_ToolBar(IWebBrowser2 *iface, int Value)
538 WebBrowser *This = WEBBROWSER_THIS(iface);
539 FIXME("(%p)->(%d)\n", This, Value);
543 static HRESULT WINAPI WebBrowser_get_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL *Value)
545 WebBrowser *This = WEBBROWSER_THIS(iface);
546 FIXME("(%p)->(%p)\n", This, Value);
550 static HRESULT WINAPI WebBrowser_put_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
552 WebBrowser *This = WEBBROWSER_THIS(iface);
553 FIXME("(%p)->(%x)\n", This, Value);
557 static HRESULT WINAPI WebBrowser_get_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL *pbFullScreen)
559 WebBrowser *This = WEBBROWSER_THIS(iface);
560 FIXME("(%p)->(%p)\n", This, pbFullScreen);
564 static HRESULT WINAPI WebBrowser_put_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL bFullScreen)
566 WebBrowser *This = WEBBROWSER_THIS(iface);
567 FIXME("(%p)->(%x)\n", This, bFullScreen);
571 static HRESULT WINAPI WebBrowser_Navigate2(IWebBrowser2 *iface, VARIANT *URL, VARIANT *Flags,
572 VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers)
574 WebBrowser *This = WEBBROWSER_THIS(iface);
575 PBYTE post_data = NULL;
576 ULONG post_data_len = 0;
577 LPWSTR headers = NULL;
580 TRACE("(%p)->(%p %p %p %p %p)\n", This, URL, Flags, TargetFrameName, PostData, Headers);
585 if((Flags && V_VT(Flags) != VT_EMPTY)
586 || (TargetFrameName && V_VT(TargetFrameName) != VT_EMPTY))
587 FIXME("Unsupported arguments\n");
593 if(V_VT(URL) != VT_BSTR)
596 if(PostData && V_VT(PostData) != VT_EMPTY) {
597 if(V_VT(PostData) != (VT_ARRAY | VT_UI1)
598 || V_ARRAY(PostData)->cDims != 1) {
599 WARN("Invalid PostData\n");
603 SafeArrayAccessData(V_ARRAY(PostData), (void**)&post_data);
604 post_data_len = V_ARRAY(PostData)->rgsabound[0].cElements;
607 if(Headers && V_VT(Headers) != VT_EMPTY) {
608 if(V_VT(Headers) != VT_BSTR)
611 headers = V_BSTR(Headers);
612 TRACE("Headers: %s\n", debugstr_w(headers));
615 if(!This->doc_host.hwnd)
616 create_doc_view_hwnd(This);
618 hres = navigate_url(This, V_BSTR(URL), post_data, post_data_len, headers);
621 SafeArrayUnaccessData(V_ARRAY(PostData));
626 static HRESULT WINAPI WebBrowser_QueryStatusWB(IWebBrowser2 *iface, OLECMDID cmdID, OLECMDF *pcmdf)
628 WebBrowser *This = WEBBROWSER_THIS(iface);
629 FIXME("(%p)->(%d %p)\n", This, cmdID, pcmdf);
633 static HRESULT WINAPI WebBrowser_ExecWB(IWebBrowser2 *iface, OLECMDID cmdID,
634 OLECMDEXECOPT cmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
636 WebBrowser *This = WEBBROWSER_THIS(iface);
637 FIXME("(%p)->(%d %d %p %p)\n", This, cmdID, cmdexecopt, pvaIn, pvaOut);
641 static HRESULT WINAPI WebBrowser_ShowBrowserBar(IWebBrowser2 *iface, VARIANT *pvaClsid,
642 VARIANT *pvarShow, VARIANT *pvarSize)
644 WebBrowser *This = WEBBROWSER_THIS(iface);
645 FIXME("(%p)->(%p %p %p)\n", This, pvaClsid, pvarShow, pvarSize);
649 static HRESULT WINAPI WebBrowser_get_ReadyState(IWebBrowser2 *iface, READYSTATE *lpReadyState)
651 WebBrowser *This = WEBBROWSER_THIS(iface);
652 FIXME("(%p)->(%p)\n", This, lpReadyState);
656 static HRESULT WINAPI WebBrowser_get_Offline(IWebBrowser2 *iface, VARIANT_BOOL *pbOffline)
658 WebBrowser *This = WEBBROWSER_THIS(iface);
659 FIXME("(%p)->(%p)\n", This, pbOffline);
663 static HRESULT WINAPI WebBrowser_put_Offline(IWebBrowser2 *iface, VARIANT_BOOL bOffline)
665 WebBrowser *This = WEBBROWSER_THIS(iface);
666 FIXME("(%p)->(%x)\n", This, bOffline);
670 static HRESULT WINAPI WebBrowser_get_Silent(IWebBrowser2 *iface, VARIANT_BOOL *pbSilent)
672 WebBrowser *This = WEBBROWSER_THIS(iface);
673 FIXME("(%p)->(%p)\n", This, pbSilent);
677 static HRESULT WINAPI WebBrowser_put_Silent(IWebBrowser2 *iface, VARIANT_BOOL bSilent)
679 WebBrowser *This = WEBBROWSER_THIS(iface);
680 FIXME("(%p)->(%x)\n", This, bSilent);
684 static HRESULT WINAPI WebBrowser_get_RegisterAsBrowser(IWebBrowser2 *iface,
685 VARIANT_BOOL *pbRegister)
687 WebBrowser *This = WEBBROWSER_THIS(iface);
688 FIXME("(%p)->(%p)\n", This, pbRegister);
692 static HRESULT WINAPI WebBrowser_put_RegisterAsBrowser(IWebBrowser2 *iface,
693 VARIANT_BOOL bRegister)
695 WebBrowser *This = WEBBROWSER_THIS(iface);
696 FIXME("(%p)->(%x)\n", This, bRegister);
700 static HRESULT WINAPI WebBrowser_get_RegisterAsDropTarget(IWebBrowser2 *iface,
701 VARIANT_BOOL *pbRegister)
703 WebBrowser *This = WEBBROWSER_THIS(iface);
704 FIXME("(%p)->(%p)\n", This, pbRegister);
708 static HRESULT WINAPI WebBrowser_put_RegisterAsDropTarget(IWebBrowser2 *iface,
709 VARIANT_BOOL bRegister)
711 WebBrowser *This = WEBBROWSER_THIS(iface);
712 FIXME("(%p)->(%x)\n", This, bRegister);
716 static HRESULT WINAPI WebBrowser_get_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL *pbRegister)
718 WebBrowser *This = WEBBROWSER_THIS(iface);
719 FIXME("(%p)->(%p)\n", This, pbRegister);
723 static HRESULT WINAPI WebBrowser_put_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL bRegister)
725 WebBrowser *This = WEBBROWSER_THIS(iface);
726 FIXME("(%p)->(%x)\n", This, bRegister);
730 static HRESULT WINAPI WebBrowser_get_AddressBar(IWebBrowser2 *iface, VARIANT_BOOL *Value)
732 WebBrowser *This = WEBBROWSER_THIS(iface);
733 FIXME("(%p)->(%p)\n", This, Value);
737 static HRESULT WINAPI WebBrowser_put_AddressBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
739 WebBrowser *This = WEBBROWSER_THIS(iface);
740 FIXME("(%p)->(%x)\n", This, Value);
744 static HRESULT WINAPI WebBrowser_get_Resizable(IWebBrowser2 *iface, VARIANT_BOOL *Value)
746 WebBrowser *This = WEBBROWSER_THIS(iface);
747 FIXME("(%p)->(%p)\n", This, Value);
751 static HRESULT WINAPI WebBrowser_put_Resizable(IWebBrowser2 *iface, VARIANT_BOOL Value)
753 WebBrowser *This = WEBBROWSER_THIS(iface);
754 FIXME("(%p)->(%x)\n", This, Value);
758 #undef WEBBROWSER_THIS
760 static const IWebBrowser2Vtbl WebBrowser2Vtbl =
762 WebBrowser_QueryInterface,
765 WebBrowser_GetTypeInfoCount,
766 WebBrowser_GetTypeInfo,
767 WebBrowser_GetIDsOfNames,
770 WebBrowser_GoForward,
777 WebBrowser_get_Application,
778 WebBrowser_get_Parent,
779 WebBrowser_get_Container,
780 WebBrowser_get_Document,
781 WebBrowser_get_TopLevelContainer,
787 WebBrowser_get_Width,
788 WebBrowser_put_Width,
789 WebBrowser_get_Height,
790 WebBrowser_put_Height,
791 WebBrowser_get_LocationName,
792 WebBrowser_get_LocationURL,
795 WebBrowser_ClientToWindow,
796 WebBrowser_PutProperty,
797 WebBrowser_GetProperty,
800 WebBrowser_get_FullName,
802 WebBrowser_get_Visible,
803 WebBrowser_put_Visible,
804 WebBrowser_get_StatusBar,
805 WebBrowser_put_StatusBar,
806 WebBrowser_get_StatusText,
807 WebBrowser_put_StatusText,
808 WebBrowser_get_ToolBar,
809 WebBrowser_put_ToolBar,
810 WebBrowser_get_MenuBar,
811 WebBrowser_put_MenuBar,
812 WebBrowser_get_FullScreen,
813 WebBrowser_put_FullScreen,
814 WebBrowser_Navigate2,
815 WebBrowser_QueryStatusWB,
817 WebBrowser_ShowBrowserBar,
818 WebBrowser_get_ReadyState,
819 WebBrowser_get_Offline,
820 WebBrowser_put_Offline,
821 WebBrowser_get_Silent,
822 WebBrowser_put_Silent,
823 WebBrowser_get_RegisterAsBrowser,
824 WebBrowser_put_RegisterAsBrowser,
825 WebBrowser_get_RegisterAsDropTarget,
826 WebBrowser_put_RegisterAsDropTarget,
827 WebBrowser_get_TheaterMode,
828 WebBrowser_put_TheaterMode,
829 WebBrowser_get_AddressBar,
830 WebBrowser_put_AddressBar,
831 WebBrowser_get_Resizable,
832 WebBrowser_put_Resizable
835 HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
840 TRACE("(%p %s %p)\n", pOuter, debugstr_guid(riid), ppv);
842 ret = HeapAlloc(GetProcessHeap(), 0, sizeof(WebBrowser));
844 ret->lpWebBrowser2Vtbl = &WebBrowser2Vtbl;
849 ret->doc_host.disp = (IDispatch*)WEBBROWSER2(ret);
851 WebBrowser_OleObject_Init(ret);
852 WebBrowser_ViewObject_Init(ret);
853 WebBrowser_Persist_Init(ret);
854 WebBrowser_ClassInfo_Init(ret);
855 WebBrowser_Events_Init(ret);
856 WebBrowser_ClientSite_Init(ret);
857 WebBrowser_DocHost_Init(ret);
858 WebBrowser_Frame_Init(ret);
859 WebBrowser_HlinkFrame_Init(ret);
861 hres = IWebBrowser_QueryInterface(WEBBROWSER(ret), riid, ppv);
862 if(SUCCEEDED(hres)) {
863 SHDOCVW_LockModule();
865 HeapFree(GetProcessHeap(), 0, ret);