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"
27 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
29 /**********************************************************************
30 * Implement the IWebBrowser interface
33 #define WEBBROWSER_THIS(iface) DEFINE_THIS(WebBrowser, WebBrowser2, iface)
35 static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser2 *iface, REFIID riid, LPVOID *ppv)
37 WebBrowser *This = WEBBROWSER_THIS(iface);
43 if(IsEqualGUID(&IID_IUnknown, riid)) {
44 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
45 *ppv = WEBBROWSER(This);
46 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
47 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
48 *ppv = WEBBROWSER(This);
49 }else if(IsEqualGUID(&IID_IWebBrowser, riid)) {
50 TRACE("(%p)->(IID_IWebBrowser %p)\n", This, ppv);
51 *ppv = WEBBROWSER(This);
52 }else if(IsEqualGUID(&IID_IWebBrowserApp, riid)) {
53 TRACE("(%p)->(IID_IWebBrowserApp %p)\n", This, ppv);
54 *ppv = WEBBROWSER(This);
55 }else if(IsEqualGUID(&IID_IWebBrowser2, riid)) {
56 TRACE("(%p)->(IID_IWebBrowser2 %p)\n", This, ppv);
57 *ppv = WEBBROWSER(This);
58 }else if(IsEqualGUID(&IID_IOleObject, riid)) {
59 TRACE("(%p)->(IID_IOleObject %p)\n", This, ppv);
61 }else if(IsEqualGUID(&IID_IOleWindow, riid)) {
62 TRACE("(%p)->(IID_IOleWindow %p)\n", This, ppv);
63 *ppv = INPLACEOBJ(This);
64 }else if(IsEqualGUID (&IID_IOleInPlaceObject, riid)) {
65 TRACE("(%p)->(IID_IOleInPlaceObject %p)\n", This, ppv);
66 *ppv = INPLACEOBJ(This);
67 }else if(IsEqualGUID(&IID_IOleControl, riid)) {
68 TRACE("(%p)->(IID_IOleControl %p)\n", This, ppv);
70 }else if(IsEqualGUID(&IID_IPersist, riid)) {
71 TRACE("(%p)->(IID_IPersist %p)\n", This, ppv);
72 *ppv = PERSTORAGE(This);
73 }else if(IsEqualGUID(&IID_IPersistStorage, riid)) {
74 TRACE("(%p)->(IID_IPersistStorage %p)\n", This, ppv);
75 *ppv = PERSTORAGE(This);
76 }else if(IsEqualGUID (&IID_IPersistStreamInit, riid)) {
77 TRACE("(%p)->(IID_IPersistStreamInit %p)\n", This, ppv);
78 *ppv = PERSTRINIT(This);
79 }else if(IsEqualGUID(&IID_IProvideClassInfo, riid)) {
80 TRACE("(%p)->(IID_IProvideClassInfo %p)\n", This, ppv);
81 *ppv = CLASSINFO(This);
82 }else if(IsEqualGUID(&IID_IProvideClassInfo2, riid)) {
83 TRACE("(%p)->(IID_IProvideClassInfo2 %p)\n", This, ppv);
84 *ppv = CLASSINFO(This);
85 }else if(IsEqualGUID(&IID_IQuickActivate, riid)) {
86 TRACE("(%p)->(IID_IQuickActivate %p)\n", This, ppv);
87 *ppv = QUICKACT(This);
88 }else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) {
89 TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppv);
90 *ppv = CONPTCONT(This);
91 }else if(IsEqualGUID(&IID_IViewObject, riid)) {
92 TRACE("(%p)->(IID_IViewObject %p)\n", This, ppv);
94 }else if(IsEqualGUID(&IID_IViewObject2, riid)) {
95 TRACE("(%p)->(IID_IViewObject2 %p)\n", This, ppv);
96 *ppv = VIEWOBJ2(This);
97 }else if(IsEqualGUID(&IID_IOleInPlaceActiveObject, riid)) {
98 TRACE("(%p)->(IID_IOleInPlaceActiveObject %p)\n", This, ppv);
99 *ppv = ACTIVEOBJ(This);
103 IUnknown_AddRef((IUnknown*)*ppv);
107 FIXME("(%p)->(%s %p) interface not supported\n", This, debugstr_guid(riid), ppv);
108 return E_NOINTERFACE;
111 static ULONG WINAPI WebBrowser_AddRef(IWebBrowser2 *iface)
113 WebBrowser *This = WEBBROWSER_THIS(iface);
114 LONG ref = InterlockedIncrement(&This->ref);
115 TRACE("(%p) ref=%ld\n", This, ref);
119 static ULONG WINAPI WebBrowser_Release(IWebBrowser2 *iface)
121 WebBrowser *This = WEBBROWSER_THIS(iface);
122 LONG ref = InterlockedDecrement(&This->ref);
124 TRACE("(%p) ref=%ld\n", This, ref);
128 IUnknown_Release(This->document);
130 WebBrowser_OleObject_Destroy(This);
131 WebBrowser_Events_Destroy(This);
132 WebBrowser_ClientSite_Destroy(This);
134 SysFreeString(This->url);
135 HeapFree(GetProcessHeap(), 0, This);
136 SHDOCVW_UnlockModule();
142 /* IDispatch methods */
143 static HRESULT WINAPI WebBrowser_GetTypeInfoCount(IWebBrowser2 *iface, UINT *pctinfo)
145 WebBrowser *This = WEBBROWSER_THIS(iface);
146 FIXME("(%p)->(%p)\n", This, pctinfo);
150 static HRESULT WINAPI WebBrowser_GetTypeInfo(IWebBrowser2 *iface, UINT iTInfo, LCID lcid,
153 WebBrowser *This = WEBBROWSER_THIS(iface);
154 FIXME("(%p)->(%d %ld %p)\n", This, iTInfo, lcid, ppTInfo);
158 static HRESULT WINAPI WebBrowser_GetIDsOfNames(IWebBrowser2 *iface, REFIID riid,
159 LPOLESTR *rgszNames, UINT cNames,
160 LCID lcid, DISPID *rgDispId)
162 WebBrowser *This = WEBBROWSER_THIS(iface);
163 FIXME("(%p)->(%s %p %d %ld %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
168 static HRESULT WINAPI WebBrowser_Invoke(IWebBrowser2 *iface, DISPID dispIdMember,
169 REFIID riid, LCID lcid, WORD wFlags,
170 DISPPARAMS *pDispParams, VARIANT *pVarResult,
171 EXCEPINFO *pExepInfo, UINT *puArgErr)
173 WebBrowser *This = WEBBROWSER_THIS(iface);
174 FIXME("(%p)->(%ld %s %ld %08x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
175 lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
179 /* IWebBrowser methods */
180 static HRESULT WINAPI WebBrowser_GoBack(IWebBrowser2 *iface)
182 WebBrowser *This = WEBBROWSER_THIS(iface);
183 FIXME("(%p)\n", This);
187 static HRESULT WINAPI WebBrowser_GoForward(IWebBrowser2 *iface)
189 WebBrowser *This = WEBBROWSER_THIS(iface);
190 FIXME("(%p)\n", This);
194 static HRESULT WINAPI WebBrowser_GoHome(IWebBrowser2 *iface)
196 WebBrowser *This = WEBBROWSER_THIS(iface);
197 FIXME("(%p)\n", This);
201 static HRESULT WINAPI WebBrowser_GoSearch(IWebBrowser2 *iface)
203 WebBrowser *This = WEBBROWSER_THIS(iface);
204 FIXME("(%p)\n", This);
208 static HRESULT WINAPI WebBrowser_Navigate(IWebBrowser2 *iface, BSTR URL,
209 VARIANT *Flags, VARIANT *TargetFrameName,
210 VARIANT *PostData, VARIANT *Headers)
212 WebBrowser *This = WEBBROWSER_THIS(iface);
213 FIXME("(%p)->(%s %p %p %p %p)\n", This, debugstr_w(URL), Flags, TargetFrameName,
218 static HRESULT WINAPI WebBrowser_Refresh(IWebBrowser2 *iface)
220 WebBrowser *This = WEBBROWSER_THIS(iface);
221 FIXME("(%p)\n", This);
225 static HRESULT WINAPI WebBrowser_Refresh2(IWebBrowser2 *iface, VARIANT *Level)
227 WebBrowser *This = WEBBROWSER_THIS(iface);
228 FIXME("(%p)->(%p)\n", This, Level);
232 static HRESULT WINAPI WebBrowser_Stop(IWebBrowser2 *iface)
234 WebBrowser *This = WEBBROWSER_THIS(iface);
235 FIXME("(%p)\n", This);
239 static HRESULT WINAPI WebBrowser_get_Application(IWebBrowser2 *iface, IDispatch **ppDisp)
241 WebBrowser *This = WEBBROWSER_THIS(iface);
242 FIXME("(%p)->(%p)\n", This, ppDisp);
246 static HRESULT WINAPI WebBrowser_get_Parent(IWebBrowser2 *iface, IDispatch **ppDisp)
248 WebBrowser *This = WEBBROWSER_THIS(iface);
249 FIXME("(%p)->(%p)\n", This, ppDisp);
253 static HRESULT WINAPI WebBrowser_get_Container(IWebBrowser2 *iface, IDispatch **ppDisp)
255 WebBrowser *This = WEBBROWSER_THIS(iface);
256 FIXME("(%p)->(%p)\n", This, ppDisp);
260 static HRESULT WINAPI WebBrowser_get_Document(IWebBrowser2 *iface, IDispatch **ppDisp)
262 WebBrowser *This = WEBBROWSER_THIS(iface);
263 FIXME("(%p)->(%p)\n", This, ppDisp);
267 static HRESULT WINAPI WebBrowser_get_TopLevelContainer(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
269 WebBrowser *This = WEBBROWSER_THIS(iface);
270 FIXME("(%p)->(%p)\n", This, pBool);
274 static HRESULT WINAPI WebBrowser_get_Type(IWebBrowser2 *iface, BSTR *Type)
276 WebBrowser *This = WEBBROWSER_THIS(iface);
277 FIXME("(%p)->(%p)\n", This, Type);
281 static HRESULT WINAPI WebBrowser_get_Left(IWebBrowser2 *iface, long *pl)
283 WebBrowser *This = WEBBROWSER_THIS(iface);
284 FIXME("(%p)->(%p)\n", This, pl);
288 static HRESULT WINAPI WebBrowser_put_Left(IWebBrowser2 *iface, long Left)
290 WebBrowser *This = WEBBROWSER_THIS(iface);
291 FIXME("(%p)->(%ld)\n", This, Left);
295 static HRESULT WINAPI WebBrowser_get_Top(IWebBrowser2 *iface, long *pl)
297 WebBrowser *This = WEBBROWSER_THIS(iface);
298 FIXME("(%p)->(%p)\n", This, pl);
302 static HRESULT WINAPI WebBrowser_put_Top(IWebBrowser2 *iface, long Top)
304 WebBrowser *This = WEBBROWSER_THIS(iface);
305 FIXME("(%p)->(%ld)\n", This, Top);
309 static HRESULT WINAPI WebBrowser_get_Width(IWebBrowser2 *iface, long *pl)
311 WebBrowser *This = WEBBROWSER_THIS(iface);
312 FIXME("(%p)->(%p)\n", This, pl);
316 static HRESULT WINAPI WebBrowser_put_Width(IWebBrowser2 *iface, long Width)
318 WebBrowser *This = WEBBROWSER_THIS(iface);
319 FIXME("(%p)->(%ld)\n", This, Width);
323 static HRESULT WINAPI WebBrowser_get_Height(IWebBrowser2 *iface, long *pl)
325 WebBrowser *This = WEBBROWSER_THIS(iface);
326 FIXME("(%p)->(%p)\n", This, pl);
330 static HRESULT WINAPI WebBrowser_put_Height(IWebBrowser2 *iface, long Height)
332 WebBrowser *This = WEBBROWSER_THIS(iface);
333 FIXME("(%p)->(%ld)\n", This, Height);
337 static HRESULT WINAPI WebBrowser_get_LocationName(IWebBrowser2 *iface, BSTR *LocationName)
339 WebBrowser *This = WEBBROWSER_THIS(iface);
340 FIXME("(%p)->(%p)\n", This, LocationName);
344 static HRESULT WINAPI WebBrowser_get_LocationURL(IWebBrowser2 *iface, BSTR *LocationURL)
346 WebBrowser *This = WEBBROWSER_THIS(iface);
347 FIXME("(%p)->(%p)\n", This, LocationURL);
351 static HRESULT WINAPI WebBrowser_get_Busy(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
353 WebBrowser *This = WEBBROWSER_THIS(iface);
354 FIXME("(%p)->(%p)\n", This, pBool);
358 static HRESULT WINAPI WebBrowser_Quit(IWebBrowser2 *iface)
360 WebBrowser *This = WEBBROWSER_THIS(iface);
361 FIXME("(%p)\n", This);
365 static HRESULT WINAPI WebBrowser_ClientToWindow(IWebBrowser2 *iface, int *pcx, int *pcy)
367 WebBrowser *This = WEBBROWSER_THIS(iface);
368 FIXME("(%p)->(%p %p)\n", This, pcx, pcy);
372 static HRESULT WINAPI WebBrowser_PutProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT vtValue)
374 WebBrowser *This = WEBBROWSER_THIS(iface);
375 FIXME("(%p)->(%s)\n", This, debugstr_w(szProperty));
379 static HRESULT WINAPI WebBrowser_GetProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT *pvtValue)
381 WebBrowser *This = WEBBROWSER_THIS(iface);
382 FIXME("(%p)->(%s %p)\n", This, debugstr_w(szProperty), pvtValue);
386 static HRESULT WINAPI WebBrowser_get_Name(IWebBrowser2 *iface, BSTR *Name)
388 WebBrowser *This = WEBBROWSER_THIS(iface);
389 FIXME("(%p)->(%p)\n", This, Name);
393 static HRESULT WINAPI WebBrowser_get_HWND(IWebBrowser2 *iface, long *pHWND)
395 WebBrowser *This = WEBBROWSER_THIS(iface);
396 FIXME("(%p)->(%p)\n", This, pHWND);
400 static HRESULT WINAPI WebBrowser_get_FullName(IWebBrowser2 *iface, BSTR *FullName)
402 WebBrowser *This = WEBBROWSER_THIS(iface);
403 FIXME("(%p)->(%p)\n", This, FullName);
407 static HRESULT WINAPI WebBrowser_get_Path(IWebBrowser2 *iface, BSTR *Path)
409 WebBrowser *This = WEBBROWSER_THIS(iface);
410 FIXME("(%p)->(%p)\n", This, Path);
414 static HRESULT WINAPI WebBrowser_get_Visible(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
416 WebBrowser *This = WEBBROWSER_THIS(iface);
417 FIXME("(%p)->(%p)\n", This, pBool);
421 static HRESULT WINAPI WebBrowser_put_Visible(IWebBrowser2 *iface, VARIANT_BOOL Value)
423 WebBrowser *This = WEBBROWSER_THIS(iface);
424 FIXME("(%p)->(%x)\n", This, Value);
428 static HRESULT WINAPI WebBrowser_get_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
430 WebBrowser *This = WEBBROWSER_THIS(iface);
431 FIXME("(%p)->(%p)\n", This, pBool);
435 static HRESULT WINAPI WebBrowser_put_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
437 WebBrowser *This = WEBBROWSER_THIS(iface);
438 FIXME("(%p)->(%x)\n", This, Value);
442 static HRESULT WINAPI WebBrowser_get_StatusText(IWebBrowser2 *iface, BSTR *StatusText)
444 WebBrowser *This = WEBBROWSER_THIS(iface);
445 FIXME("(%p)->(%p)\n", This, StatusText);
449 static HRESULT WINAPI WebBrowser_put_StatusText(IWebBrowser2 *iface, BSTR StatusText)
451 WebBrowser *This = WEBBROWSER_THIS(iface);
452 FIXME("(%p)->(%s)\n", This, debugstr_w(StatusText));
456 static HRESULT WINAPI WebBrowser_get_ToolBar(IWebBrowser2 *iface, int *Value)
458 WebBrowser *This = WEBBROWSER_THIS(iface);
459 FIXME("(%p)->(%p)\n", This, Value);
463 static HRESULT WINAPI WebBrowser_put_ToolBar(IWebBrowser2 *iface, int Value)
465 WebBrowser *This = WEBBROWSER_THIS(iface);
466 FIXME("(%p)->(%d)\n", This, Value);
470 static HRESULT WINAPI WebBrowser_get_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL *Value)
472 WebBrowser *This = WEBBROWSER_THIS(iface);
473 FIXME("(%p)->(%p)\n", This, Value);
477 static HRESULT WINAPI WebBrowser_put_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
479 WebBrowser *This = WEBBROWSER_THIS(iface);
480 FIXME("(%p)->(%x)\n", This, Value);
484 static HRESULT WINAPI WebBrowser_get_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL *pbFullScreen)
486 WebBrowser *This = WEBBROWSER_THIS(iface);
487 FIXME("(%p)->(%p)\n", This, pbFullScreen);
491 static HRESULT WINAPI WebBrowser_put_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL bFullScreen)
493 WebBrowser *This = WEBBROWSER_THIS(iface);
494 FIXME("(%p)->(%x)\n", This, bFullScreen);
498 static HRESULT WINAPI WebBrowser_Navigate2(IWebBrowser2 *iface, VARIANT *URL, VARIANT *Flags,
499 VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers)
501 WebBrowser *This = WEBBROWSER_THIS(iface);
502 IPersistMoniker *persist;
507 TRACE("(%p)->(%p %p %p %p %p)\n", This, URL, Flags, TargetFrameName, PostData, Headers);
512 if((Flags && V_VT(Flags) != VT_EMPTY)
513 || (TargetFrameName && V_VT(TargetFrameName) != VT_EMPTY)
514 || (PostData && V_VT(PostData) != VT_EMPTY)
515 || (Headers && V_VT(Headers) != VT_EMPTY))
516 FIXME("Unsupported arguments\n");
520 if(V_VT(URL) != VT_BSTR)
523 if(!This->doc_view_hwnd)
524 create_doc_view_hwnd(This);
528 * We should use URLMoniker's BindToObject instead creating HTMLDocument here.
529 * This should be fixed when mshtml.dll and urlmon.dll will be good enough.
532 if(!This->document) {
533 hres = CoCreateInstance(&CLSID_HTMLDocument, NULL,
534 CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
535 &IID_IUnknown, (void**)&This->document);
540 hres = IUnknown_QueryInterface(This->document, &IID_IPersistMoniker, (void**)&persist);
544 hres = CreateURLMoniker(NULL, V_BSTR(URL), &mon);
546 IPersistMoniker_Release(persist);
550 hres = IPersistMoniker_Load(persist, FALSE, mon, NULL /* FIXME */, 0);
551 IMoniker_Release(mon);
552 IPersistMoniker_Release(persist);
554 WARN("Load failed: %08lx\n", hres);
558 This->url = SysAllocString(V_BSTR(URL));
560 hres = IUnknown_QueryInterface(This->document, &IID_IOleObject, (void**)&oleobj);
564 hres = IOleObject_SetClientSite(oleobj, CLIENTSITE(This));
565 IOleObject_Release(oleobj);
567 PostMessageW(This->doc_view_hwnd, WB_WM_NAVIGATE2, 0, 0);
572 static HRESULT WINAPI WebBrowser_QueryStatusWB(IWebBrowser2 *iface, OLECMDID cmdID, OLECMDF *pcmdf)
574 WebBrowser *This = WEBBROWSER_THIS(iface);
575 FIXME("(%p)->(%d %p)\n", This, cmdID, pcmdf);
579 static HRESULT WINAPI WebBrowser_ExecWB(IWebBrowser2 *iface, OLECMDID cmdID,
580 OLECMDEXECOPT cmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
582 WebBrowser *This = WEBBROWSER_THIS(iface);
583 FIXME("(%p)->(%d %d %p %p)\n", This, cmdID, cmdexecopt, pvaIn, pvaOut);
587 static HRESULT WINAPI WebBrowser_ShowBrowserBar(IWebBrowser2 *iface, VARIANT *pvaClsid,
588 VARIANT *pvarShow, VARIANT *pvarSize)
590 WebBrowser *This = WEBBROWSER_THIS(iface);
591 FIXME("(%p)->(%p %p %p)\n", This, pvaClsid, pvarShow, pvarSize);
595 static HRESULT WINAPI WebBrowser_get_ReadyState(IWebBrowser2 *iface, READYSTATE *lpReadyState)
597 WebBrowser *This = WEBBROWSER_THIS(iface);
598 FIXME("(%p)->(%p)\n", This, lpReadyState);
602 static HRESULT WINAPI WebBrowser_get_Offline(IWebBrowser2 *iface, VARIANT_BOOL *pbOffline)
604 WebBrowser *This = WEBBROWSER_THIS(iface);
605 FIXME("(%p)->(%p)\n", This, pbOffline);
609 static HRESULT WINAPI WebBrowser_put_Offline(IWebBrowser2 *iface, VARIANT_BOOL bOffline)
611 WebBrowser *This = WEBBROWSER_THIS(iface);
612 FIXME("(%p)->(%x)\n", This, bOffline);
616 static HRESULT WINAPI WebBrowser_get_Silent(IWebBrowser2 *iface, VARIANT_BOOL *pbSilent)
618 WebBrowser *This = WEBBROWSER_THIS(iface);
619 FIXME("(%p)->(%p)\n", This, pbSilent);
623 static HRESULT WINAPI WebBrowser_put_Silent(IWebBrowser2 *iface, VARIANT_BOOL bSilent)
625 WebBrowser *This = WEBBROWSER_THIS(iface);
626 FIXME("(%p)->(%x)\n", This, bSilent);
630 static HRESULT WINAPI WebBrowser_get_RegisterAsBrowser(IWebBrowser2 *iface,
631 VARIANT_BOOL *pbRegister)
633 WebBrowser *This = WEBBROWSER_THIS(iface);
634 FIXME("(%p)->(%p)\n", This, pbRegister);
638 static HRESULT WINAPI WebBrowser_put_RegisterAsBrowser(IWebBrowser2 *iface,
639 VARIANT_BOOL bRegister)
641 WebBrowser *This = WEBBROWSER_THIS(iface);
642 FIXME("(%p)->(%x)\n", This, bRegister);
646 static HRESULT WINAPI WebBrowser_get_RegisterAsDropTarget(IWebBrowser2 *iface,
647 VARIANT_BOOL *pbRegister)
649 WebBrowser *This = WEBBROWSER_THIS(iface);
650 FIXME("(%p)->(%p)\n", This, pbRegister);
654 static HRESULT WINAPI WebBrowser_put_RegisterAsDropTarget(IWebBrowser2 *iface,
655 VARIANT_BOOL bRegister)
657 WebBrowser *This = WEBBROWSER_THIS(iface);
658 FIXME("(%p)->(%x)\n", This, bRegister);
662 static HRESULT WINAPI WebBrowser_get_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL *pbRegister)
664 WebBrowser *This = WEBBROWSER_THIS(iface);
665 FIXME("(%p)->(%p)\n", This, pbRegister);
669 static HRESULT WINAPI WebBrowser_put_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL bRegister)
671 WebBrowser *This = WEBBROWSER_THIS(iface);
672 FIXME("(%p)->(%x)\n", This, bRegister);
676 static HRESULT WINAPI WebBrowser_get_AddressBar(IWebBrowser2 *iface, VARIANT_BOOL *Value)
678 WebBrowser *This = WEBBROWSER_THIS(iface);
679 FIXME("(%p)->(%p)\n", This, Value);
683 static HRESULT WINAPI WebBrowser_put_AddressBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
685 WebBrowser *This = WEBBROWSER_THIS(iface);
686 FIXME("(%p)->(%x)\n", This, Value);
690 static HRESULT WINAPI WebBrowser_get_Resizable(IWebBrowser2 *iface, VARIANT_BOOL *Value)
692 WebBrowser *This = WEBBROWSER_THIS(iface);
693 FIXME("(%p)->(%p)\n", This, Value);
697 static HRESULT WINAPI WebBrowser_put_Resizable(IWebBrowser2 *iface, VARIANT_BOOL Value)
699 WebBrowser *This = WEBBROWSER_THIS(iface);
700 FIXME("(%p)->(%x)\n", This, Value);
704 #undef WEBBROWSER_THIS
706 static const IWebBrowser2Vtbl WebBrowser2Vtbl =
708 WebBrowser_QueryInterface,
711 WebBrowser_GetTypeInfoCount,
712 WebBrowser_GetTypeInfo,
713 WebBrowser_GetIDsOfNames,
716 WebBrowser_GoForward,
723 WebBrowser_get_Application,
724 WebBrowser_get_Parent,
725 WebBrowser_get_Container,
726 WebBrowser_get_Document,
727 WebBrowser_get_TopLevelContainer,
733 WebBrowser_get_Width,
734 WebBrowser_put_Width,
735 WebBrowser_get_Height,
736 WebBrowser_put_Height,
737 WebBrowser_get_LocationName,
738 WebBrowser_get_LocationURL,
741 WebBrowser_ClientToWindow,
742 WebBrowser_PutProperty,
743 WebBrowser_GetProperty,
746 WebBrowser_get_FullName,
748 WebBrowser_get_Visible,
749 WebBrowser_put_Visible,
750 WebBrowser_get_StatusBar,
751 WebBrowser_put_StatusBar,
752 WebBrowser_get_StatusText,
753 WebBrowser_put_StatusText,
754 WebBrowser_get_ToolBar,
755 WebBrowser_put_ToolBar,
756 WebBrowser_get_MenuBar,
757 WebBrowser_put_MenuBar,
758 WebBrowser_get_FullScreen,
759 WebBrowser_put_FullScreen,
760 WebBrowser_Navigate2,
761 WebBrowser_QueryStatusWB,
763 WebBrowser_ShowBrowserBar,
764 WebBrowser_get_ReadyState,
765 WebBrowser_get_Offline,
766 WebBrowser_put_Offline,
767 WebBrowser_get_Silent,
768 WebBrowser_put_Silent,
769 WebBrowser_get_RegisterAsBrowser,
770 WebBrowser_put_RegisterAsBrowser,
771 WebBrowser_get_RegisterAsDropTarget,
772 WebBrowser_put_RegisterAsDropTarget,
773 WebBrowser_get_TheaterMode,
774 WebBrowser_put_TheaterMode,
775 WebBrowser_get_AddressBar,
776 WebBrowser_put_AddressBar,
777 WebBrowser_get_Resizable,
778 WebBrowser_put_Resizable
781 HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
786 TRACE("(%p %s %p)\n", pOuter, debugstr_guid(riid), ppv);
788 ret = HeapAlloc(GetProcessHeap(), 0, sizeof(WebBrowser));
790 ret->lpWebBrowser2Vtbl = &WebBrowser2Vtbl;
793 ret->document = NULL;
796 WebBrowser_OleObject_Init(ret);
797 WebBrowser_ViewObject_Init(ret);
798 WebBrowser_Persist_Init(ret);
799 WebBrowser_ClassInfo_Init(ret);
800 WebBrowser_Misc_Init(ret);
801 WebBrowser_Events_Init(ret);
802 WebBrowser_ClientSite_Init(ret);
803 WebBrowser_DocHost_Init(ret);
804 WebBrowser_Frame_Init(ret);
806 hres = IWebBrowser_QueryInterface(WEBBROWSER(ret), riid, ppv);
807 if(SUCCEEDED(hres)) {
808 SHDOCVW_LockModule();
810 HeapFree(GetProcessHeap(), 0, ret);