x11drv: Make UseXVidMode default to yes.
[wine/dibdrv.git] / dlls / shdocvw / webbrowser.c
bloba2021e11ae1b31079d7d1d0357846115cae7772a
1 /*
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"
23 #include "shdocvw.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);
37 if (ppv == NULL)
38 return E_POINTER;
39 *ppv = NULL;
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);
58 *ppv = OLEOBJ(This);
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);
67 *ppv = CONTROL(This);
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);
88 *ppv = VIEWOBJ(This);
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);
103 if(*ppv) {
104 IUnknown_AddRef((IUnknown*)*ppv);
105 return S_OK;
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);
117 return 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);
127 if(!ref) {
128 if(This->document)
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();
140 return ref;
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);
148 return E_NOTIMPL;
151 static HRESULT WINAPI WebBrowser_GetTypeInfo(IWebBrowser2 *iface, UINT iTInfo, LCID lcid,
152 LPTYPEINFO *ppTInfo)
154 WebBrowser *This = WEBBROWSER_THIS(iface);
155 FIXME("(%p)->(%d %ld %p)\n", This, iTInfo, lcid, ppTInfo);
156 return E_NOTIMPL;
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,
165 lcid, rgDispId);
166 return E_NOTIMPL;
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);
177 return E_NOTIMPL;
180 /* IWebBrowser methods */
181 static HRESULT WINAPI WebBrowser_GoBack(IWebBrowser2 *iface)
183 WebBrowser *This = WEBBROWSER_THIS(iface);
184 FIXME("(%p)\n", This);
185 return E_NOTIMPL;
188 static HRESULT WINAPI WebBrowser_GoForward(IWebBrowser2 *iface)
190 WebBrowser *This = WEBBROWSER_THIS(iface);
191 FIXME("(%p)\n", This);
192 return E_NOTIMPL;
195 static HRESULT WINAPI WebBrowser_GoHome(IWebBrowser2 *iface)
197 WebBrowser *This = WEBBROWSER_THIS(iface);
198 FIXME("(%p)\n", This);
199 return E_NOTIMPL;
202 static HRESULT WINAPI WebBrowser_GoSearch(IWebBrowser2 *iface)
204 WebBrowser *This = WEBBROWSER_THIS(iface);
205 FIXME("(%p)\n", This);
206 return E_NOTIMPL;
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,
215 PostData, Headers);
216 return E_NOTIMPL;
219 static HRESULT WINAPI WebBrowser_Refresh(IWebBrowser2 *iface)
221 WebBrowser *This = WEBBROWSER_THIS(iface);
222 FIXME("(%p)\n", This);
223 return E_NOTIMPL;
226 static HRESULT WINAPI WebBrowser_Refresh2(IWebBrowser2 *iface, VARIANT *Level)
228 WebBrowser *This = WEBBROWSER_THIS(iface);
229 FIXME("(%p)->(%p)\n", This, Level);
230 return E_NOTIMPL;
233 static HRESULT WINAPI WebBrowser_Stop(IWebBrowser2 *iface)
235 WebBrowser *This = WEBBROWSER_THIS(iface);
236 FIXME("(%p)\n", This);
237 return E_NOTIMPL;
240 static HRESULT WINAPI WebBrowser_get_Application(IWebBrowser2 *iface, IDispatch **ppDisp)
242 WebBrowser *This = WEBBROWSER_THIS(iface);
243 FIXME("(%p)->(%p)\n", This, ppDisp);
244 return E_NOTIMPL;
247 static HRESULT WINAPI WebBrowser_get_Parent(IWebBrowser2 *iface, IDispatch **ppDisp)
249 WebBrowser *This = WEBBROWSER_THIS(iface);
250 FIXME("(%p)->(%p)\n", This, ppDisp);
251 return E_NOTIMPL;
254 static HRESULT WINAPI WebBrowser_get_Container(IWebBrowser2 *iface, IDispatch **ppDisp)
256 WebBrowser *This = WEBBROWSER_THIS(iface);
257 FIXME("(%p)->(%p)\n", This, ppDisp);
258 return E_NOTIMPL;
261 static HRESULT WINAPI WebBrowser_get_Document(IWebBrowser2 *iface, IDispatch **ppDisp)
263 WebBrowser *This = WEBBROWSER_THIS(iface);
265 TRACE("(%p)->(%p)\n", This, ppDisp);
267 *ppDisp = NULL;
268 if(This->document)
269 IUnknown_QueryInterface(This->document, &IID_IDispatch, (void**)ppDisp);
271 return S_OK;
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);
278 return E_NOTIMPL;
281 static HRESULT WINAPI WebBrowser_get_Type(IWebBrowser2 *iface, BSTR *Type)
283 WebBrowser *This = WEBBROWSER_THIS(iface);
284 FIXME("(%p)->(%p)\n", This, Type);
285 return E_NOTIMPL;
288 static HRESULT WINAPI WebBrowser_get_Left(IWebBrowser2 *iface, long *pl)
290 WebBrowser *This = WEBBROWSER_THIS(iface);
291 FIXME("(%p)->(%p)\n", This, pl);
292 return E_NOTIMPL;
295 static HRESULT WINAPI WebBrowser_put_Left(IWebBrowser2 *iface, long Left)
297 WebBrowser *This = WEBBROWSER_THIS(iface);
298 FIXME("(%p)->(%ld)\n", This, Left);
299 return E_NOTIMPL;
302 static HRESULT WINAPI WebBrowser_get_Top(IWebBrowser2 *iface, long *pl)
304 WebBrowser *This = WEBBROWSER_THIS(iface);
305 FIXME("(%p)->(%p)\n", This, pl);
306 return E_NOTIMPL;
309 static HRESULT WINAPI WebBrowser_put_Top(IWebBrowser2 *iface, long Top)
311 WebBrowser *This = WEBBROWSER_THIS(iface);
312 FIXME("(%p)->(%ld)\n", This, Top);
313 return E_NOTIMPL;
316 static HRESULT WINAPI WebBrowser_get_Width(IWebBrowser2 *iface, long *pl)
318 WebBrowser *This = WEBBROWSER_THIS(iface);
319 FIXME("(%p)->(%p)\n", This, pl);
320 return E_NOTIMPL;
323 static HRESULT WINAPI WebBrowser_put_Width(IWebBrowser2 *iface, long Width)
325 WebBrowser *This = WEBBROWSER_THIS(iface);
326 FIXME("(%p)->(%ld)\n", This, Width);
327 return E_NOTIMPL;
330 static HRESULT WINAPI WebBrowser_get_Height(IWebBrowser2 *iface, long *pl)
332 WebBrowser *This = WEBBROWSER_THIS(iface);
333 FIXME("(%p)->(%p)\n", This, pl);
334 return E_NOTIMPL;
337 static HRESULT WINAPI WebBrowser_put_Height(IWebBrowser2 *iface, long Height)
339 WebBrowser *This = WEBBROWSER_THIS(iface);
340 FIXME("(%p)->(%ld)\n", This, Height);
341 return E_NOTIMPL;
344 static HRESULT WINAPI WebBrowser_get_LocationName(IWebBrowser2 *iface, BSTR *LocationName)
346 WebBrowser *This = WEBBROWSER_THIS(iface);
347 FIXME("(%p)->(%p)\n", This, LocationName);
348 return E_NOTIMPL;
351 static HRESULT WINAPI WebBrowser_get_LocationURL(IWebBrowser2 *iface, BSTR *LocationURL)
353 WebBrowser *This = WEBBROWSER_THIS(iface);
355 FIXME("(%p)->(%p)\n", This, LocationURL);
357 if(!This->url) {
358 static const WCHAR null_char = 0;
359 *LocationURL = SysAllocString(&null_char);
360 return S_FALSE;
363 *LocationURL = SysAllocString(This->url);
364 return S_OK;
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);
371 return E_NOTIMPL;
374 static HRESULT WINAPI WebBrowser_Quit(IWebBrowser2 *iface)
376 WebBrowser *This = WEBBROWSER_THIS(iface);
377 FIXME("(%p)\n", This);
378 return E_NOTIMPL;
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);
385 return E_NOTIMPL;
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));
392 return E_NOTIMPL;
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);
399 return E_NOTIMPL;
402 static HRESULT WINAPI WebBrowser_get_Name(IWebBrowser2 *iface, BSTR *Name)
404 WebBrowser *This = WEBBROWSER_THIS(iface);
405 FIXME("(%p)->(%p)\n", This, Name);
406 return E_NOTIMPL;
409 static HRESULT WINAPI WebBrowser_get_HWND(IWebBrowser2 *iface, long *pHWND)
411 WebBrowser *This = WEBBROWSER_THIS(iface);
412 FIXME("(%p)->(%p)\n", This, pHWND);
413 return E_NOTIMPL;
416 static HRESULT WINAPI WebBrowser_get_FullName(IWebBrowser2 *iface, BSTR *FullName)
418 WebBrowser *This = WEBBROWSER_THIS(iface);
419 FIXME("(%p)->(%p)\n", This, FullName);
420 return E_NOTIMPL;
423 static HRESULT WINAPI WebBrowser_get_Path(IWebBrowser2 *iface, BSTR *Path)
425 WebBrowser *This = WEBBROWSER_THIS(iface);
426 FIXME("(%p)->(%p)\n", This, Path);
427 return E_NOTIMPL;
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);
434 return E_NOTIMPL;
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);
441 return E_NOTIMPL;
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);
448 return E_NOTIMPL;
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);
455 return E_NOTIMPL;
458 static HRESULT WINAPI WebBrowser_get_StatusText(IWebBrowser2 *iface, BSTR *StatusText)
460 WebBrowser *This = WEBBROWSER_THIS(iface);
461 FIXME("(%p)->(%p)\n", This, StatusText);
462 return E_NOTIMPL;
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));
469 return E_NOTIMPL;
472 static HRESULT WINAPI WebBrowser_get_ToolBar(IWebBrowser2 *iface, int *Value)
474 WebBrowser *This = WEBBROWSER_THIS(iface);
475 FIXME("(%p)->(%p)\n", This, Value);
476 return E_NOTIMPL;
479 static HRESULT WINAPI WebBrowser_put_ToolBar(IWebBrowser2 *iface, int Value)
481 WebBrowser *This = WEBBROWSER_THIS(iface);
482 FIXME("(%p)->(%d)\n", This, Value);
483 return E_NOTIMPL;
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);
490 return E_NOTIMPL;
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);
497 return E_NOTIMPL;
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);
504 return E_NOTIMPL;
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);
511 return E_NOTIMPL;
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;
521 HRESULT hres;
523 TRACE("(%p)->(%p %p %p %p %p)\n", This, URL, Flags, TargetFrameName, PostData, Headers);
525 if(!This->client)
526 return E_FAIL;
528 if((Flags && V_VT(Flags) != VT_EMPTY)
529 || (TargetFrameName && V_VT(TargetFrameName) != VT_EMPTY))
530 FIXME("Unsupported arguments\n");
533 if(!URL)
534 return S_OK;
536 if(V_VT(URL) != VT_BSTR)
537 return E_INVALIDARG;
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");
543 return E_INVALIDARG;
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)
552 return E_INVALIDARG;
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);
563 if(post_data)
564 SafeArrayUnaccessData(V_ARRAY(PostData));
566 return hres;
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);
573 return E_NOTIMPL;
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);
581 return E_NOTIMPL;
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);
589 return E_NOTIMPL;
592 static HRESULT WINAPI WebBrowser_get_ReadyState(IWebBrowser2 *iface, READYSTATE *lpReadyState)
594 WebBrowser *This = WEBBROWSER_THIS(iface);
595 FIXME("(%p)->(%p)\n", This, lpReadyState);
596 return E_NOTIMPL;
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);
603 return E_NOTIMPL;
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);
610 return E_NOTIMPL;
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);
617 return E_NOTIMPL;
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);
624 return E_NOTIMPL;
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);
632 return E_NOTIMPL;
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);
640 return E_NOTIMPL;
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);
648 return E_NOTIMPL;
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);
656 return E_NOTIMPL;
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);
663 return E_NOTIMPL;
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);
670 return E_NOTIMPL;
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);
677 return E_NOTIMPL;
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);
684 return E_NOTIMPL;
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);
691 return E_NOTIMPL;
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);
698 return E_NOTIMPL;
701 #undef WEBBROWSER_THIS
703 static const IWebBrowser2Vtbl WebBrowser2Vtbl =
705 WebBrowser_QueryInterface,
706 WebBrowser_AddRef,
707 WebBrowser_Release,
708 WebBrowser_GetTypeInfoCount,
709 WebBrowser_GetTypeInfo,
710 WebBrowser_GetIDsOfNames,
711 WebBrowser_Invoke,
712 WebBrowser_GoBack,
713 WebBrowser_GoForward,
714 WebBrowser_GoHome,
715 WebBrowser_GoSearch,
716 WebBrowser_Navigate,
717 WebBrowser_Refresh,
718 WebBrowser_Refresh2,
719 WebBrowser_Stop,
720 WebBrowser_get_Application,
721 WebBrowser_get_Parent,
722 WebBrowser_get_Container,
723 WebBrowser_get_Document,
724 WebBrowser_get_TopLevelContainer,
725 WebBrowser_get_Type,
726 WebBrowser_get_Left,
727 WebBrowser_put_Left,
728 WebBrowser_get_Top,
729 WebBrowser_put_Top,
730 WebBrowser_get_Width,
731 WebBrowser_put_Width,
732 WebBrowser_get_Height,
733 WebBrowser_put_Height,
734 WebBrowser_get_LocationName,
735 WebBrowser_get_LocationURL,
736 WebBrowser_get_Busy,
737 WebBrowser_Quit,
738 WebBrowser_ClientToWindow,
739 WebBrowser_PutProperty,
740 WebBrowser_GetProperty,
741 WebBrowser_get_Name,
742 WebBrowser_get_HWND,
743 WebBrowser_get_FullName,
744 WebBrowser_get_Path,
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,
759 WebBrowser_ExecWB,
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)
780 WebBrowser *ret;
781 HRESULT hres;
783 TRACE("(%p %s %p)\n", pOuter, debugstr_guid(riid), ppv);
785 ret = HeapAlloc(GetProcessHeap(), 0, sizeof(WebBrowser));
787 ret->lpWebBrowser2Vtbl = &WebBrowser2Vtbl;
788 ret->ref = 0;
790 ret->document = NULL;
791 ret->url = 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();
806 }else {
807 HeapFree(GetProcessHeap(), 0, ret);
808 return hres;
811 return hres;