ReactOS  0.4.14-dev-614-gbfd8a84
ie.c
Go to the documentation of this file.
1 /*
2  * Copyright 2006 Jacek Caban for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 #include "ieframe.h"
20 
21 #include "wine/debug.h"
22 
24 
25 static inline InternetExplorer *impl_from_IWebBrowser2(IWebBrowser2 *iface)
26 {
27  return CONTAINING_RECORD(iface, InternetExplorer, IWebBrowser2_iface);
28 }
29 
31 {
33 
34  *ppv = NULL;
35 
37  TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
38  *ppv = &This->IWebBrowser2_iface;
39  }else if(IsEqualGUID(&IID_IDispatch, riid)) {
40  TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
41  *ppv = &This->IWebBrowser2_iface;
42  }else if(IsEqualGUID(&IID_IWebBrowser, riid)) {
43  TRACE("(%p)->(IID_IWebBrowser %p)\n", This, ppv);
44  *ppv = &This->IWebBrowser2_iface;
45  }else if(IsEqualGUID(&IID_IWebBrowserApp, riid)) {
46  TRACE("(%p)->(IID_IWebBrowserApp %p)\n", This, ppv);
47  *ppv = &This->IWebBrowser2_iface;
48  }else if(IsEqualGUID(&IID_IWebBrowser2, riid)) {
49  TRACE("(%p)->(IID_IWebBrowser2 %p)\n", This, ppv);
50  *ppv = &This->IWebBrowser2_iface;
52  TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppv);
53  *ppv = &This->doc_host.cps.IConnectionPointContainer_iface;
54  }else if(IsEqualGUID(&IID_IExternalConnection, riid)) {
55  TRACE("(%p)->(IID_IExternalConnection %p)\n", This, ppv);
56  *ppv = &This->IExternalConnection_iface;
57  }else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
58  TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv);
59  *ppv = &This->IServiceProvider_iface;
60  }else if(HlinkFrame_QI(&This->hlink_frame, riid, ppv)) {
61  return S_OK;
62  }
63 
64  if(*ppv) {
65  IUnknown_AddRef((IUnknown*)*ppv);
66  return S_OK;
67  }
68 
69  WARN("(%p)->(%s %p) interface not supported\n", This, debugstr_guid(riid), ppv);
70  return E_NOINTERFACE;
71 }
72 
73 static ULONG WINAPI InternetExplorer_AddRef(IWebBrowser2 *iface)
74 {
77  TRACE("(%p) ref=%d\n", This, ref);
78  return ref;
79 }
80 
81 static ULONG WINAPI InternetExplorer_Release(IWebBrowser2 *iface)
82 {
85 
86  TRACE("(%p) ref=%d\n", This, ref);
87 
88  if(!ref) {
89  deactivate_document(&This->doc_host);
90  DocHost_Release(&This->doc_host);
91 
92  if(This->frame_hwnd)
93  DestroyWindow(This->frame_hwnd);
94  list_remove(&This->entry);
95  heap_free(This);
96 
97  released_obj();
98  }
99 
100  return ref;
101 }
102 
103 static HRESULT WINAPI InternetExplorer_GetTypeInfoCount(IWebBrowser2 *iface, UINT *pctinfo)
104 {
106 
107  TRACE("(%p)->(%p)\n", This, pctinfo);
108 
109  *pctinfo = 1;
110  return S_OK;
111 }
112 
113 static HRESULT WINAPI InternetExplorer_GetTypeInfo(IWebBrowser2 *iface, UINT iTInfo, LCID lcid,
114  LPTYPEINFO *ppTInfo)
115 {
118  HRESULT hres;
119 
120  TRACE("(%p)->(%d %d %p)\n", This, iTInfo, lcid, ppTInfo);
121 
122  hres = get_typeinfo(IWebBrowser2_tid, &typeinfo);
123  if(FAILED(hres))
124  return hres;
125 
126  ITypeInfo_AddRef(typeinfo);
127  *ppTInfo = typeinfo;
128  return S_OK;
129 }
130 
132  LPOLESTR *rgszNames, UINT cNames,
133  LCID lcid, DISPID *rgDispId)
134 {
137  HRESULT hres;
138 
139  TRACE("(%p)->(%s %p %d %d %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
140  lcid, rgDispId);
141 
142  hres = get_typeinfo(IWebBrowser2_tid, &typeinfo);
143  if(FAILED(hres))
144  return hres;
145 
146  return ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
147 }
148 
149 static HRESULT WINAPI InternetExplorer_Invoke(IWebBrowser2 *iface, DISPID dispIdMember,
150  REFIID riid, LCID lcid, WORD wFlags,
151  DISPPARAMS *pDispParams, VARIANT *pVarResult,
152  EXCEPINFO *pExepInfo, UINT *puArgErr)
153 {
156  HRESULT hres;
157 
158  TRACE("(%p)->(%d %s %d %08x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
159  lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
160 
161  hres = get_typeinfo(IWebBrowser2_tid, &typeinfo);
162  if(FAILED(hres))
163  return hres;
164 
165  return ITypeInfo_Invoke(typeinfo, &This->IWebBrowser2_iface, dispIdMember, wFlags, pDispParams,
166  pVarResult, pExepInfo, puArgErr);
167 }
168 
169 static HRESULT WINAPI InternetExplorer_GoBack(IWebBrowser2 *iface)
170 {
172  TRACE("(%p)\n", This);
173  return go_back(&This->doc_host);
174 }
175 
176 static HRESULT WINAPI InternetExplorer_GoForward(IWebBrowser2 *iface)
177 {
179  TRACE("(%p)\n", This);
180  return go_forward(&This->doc_host);
181 }
182 
183 static HRESULT WINAPI InternetExplorer_GoHome(IWebBrowser2 *iface)
184 {
186  TRACE("(%p)\n", This);
187  return go_home(&This->doc_host);
188 }
189 
190 static HRESULT WINAPI InternetExplorer_GoSearch(IWebBrowser2 *iface)
191 {
193  FIXME("(%p)\n", This);
194  return E_NOTIMPL;
195 }
196 
197 static HRESULT WINAPI InternetExplorer_Navigate(IWebBrowser2 *iface, BSTR szUrl,
198  VARIANT *Flags, VARIANT *TargetFrameName,
199  VARIANT *PostData, VARIANT *Headers)
200 {
202 
203  TRACE("(%p)->(%s %s %s %s %s)\n", This, debugstr_w(szUrl), debugstr_variant(Flags),
204  debugstr_variant(TargetFrameName), debugstr_variant(PostData), debugstr_variant(Headers));
205 
206  return navigate_url(&This->doc_host, szUrl, Flags, TargetFrameName, PostData, Headers);
207 }
208 
209 static HRESULT WINAPI InternetExplorer_Refresh(IWebBrowser2 *iface)
210 {
212 
213  TRACE("(%p)\n", This);
214 
215  return refresh_document(&This->doc_host, NULL);
216 }
217 
218 static HRESULT WINAPI InternetExplorer_Refresh2(IWebBrowser2 *iface, VARIANT *Level)
219 {
221 
222  TRACE("(%p)->(%s)\n", This, debugstr_variant(Level));
223 
224  return refresh_document(&This->doc_host, Level);
225 }
226 
227 static HRESULT WINAPI InternetExplorer_Stop(IWebBrowser2 *iface)
228 {
230  FIXME("(%p)\n", This);
231  return E_NOTIMPL;
232 }
233 
234 static HRESULT WINAPI InternetExplorer_get_Application(IWebBrowser2 *iface, IDispatch **ppDisp)
235 {
237  FIXME("(%p)->(%p)\n", This, ppDisp);
238  return E_NOTIMPL;
239 }
240 
241 static HRESULT WINAPI InternetExplorer_get_Parent(IWebBrowser2 *iface, IDispatch **ppDisp)
242 {
244  FIXME("(%p)->(%p)\n", This, ppDisp);
245  return E_NOTIMPL;
246 }
247 
248 static HRESULT WINAPI InternetExplorer_get_Container(IWebBrowser2 *iface, IDispatch **ppDisp)
249 {
251  FIXME("(%p)->(%p)\n", This, ppDisp);
252  return E_NOTIMPL;
253 }
254 
255 static HRESULT WINAPI InternetExplorer_get_Document(IWebBrowser2 *iface, IDispatch **ppDisp)
256 {
258  FIXME("(%p)->(%p)\n", This, ppDisp);
259  return E_NOTIMPL;
260 }
261 
263 {
265  FIXME("(%p)->(%p)\n", This, pBool);
266  return E_NOTIMPL;
267 }
268 
269 static HRESULT WINAPI InternetExplorer_get_Type(IWebBrowser2 *iface, BSTR *Type)
270 {
272  FIXME("(%p)->(%p)\n", This, Type);
273  return E_NOTIMPL;
274 }
275 
276 static HRESULT WINAPI InternetExplorer_get_Left(IWebBrowser2 *iface, LONG *pl)
277 {
279  FIXME("(%p)->(%p)\n", This, pl);
280  return E_NOTIMPL;
281 }
282 
283 static HRESULT WINAPI InternetExplorer_put_Left(IWebBrowser2 *iface, LONG Left)
284 {
286  FIXME("(%p)->(%d)\n", This, Left);
287  return E_NOTIMPL;
288 }
289 
290 static HRESULT WINAPI InternetExplorer_get_Top(IWebBrowser2 *iface, LONG *pl)
291 {
293  FIXME("(%p)->(%p)\n", This, pl);
294  return E_NOTIMPL;
295 }
296 
297 static HRESULT WINAPI InternetExplorer_put_Top(IWebBrowser2 *iface, LONG Top)
298 {
300  FIXME("(%p)->(%d)\n", This, Top);
301  return E_NOTIMPL;
302 }
303 
304 static HRESULT WINAPI InternetExplorer_get_Width(IWebBrowser2 *iface, LONG *pl)
305 {
307  FIXME("(%p)->(%p)\n", This, pl);
308  return E_NOTIMPL;
309 }
310 
311 static HRESULT WINAPI InternetExplorer_put_Width(IWebBrowser2 *iface, LONG Width)
312 {
314  FIXME("(%p)->(%d)\n", This, Width);
315  return E_NOTIMPL;
316 }
317 
318 static HRESULT WINAPI InternetExplorer_get_Height(IWebBrowser2 *iface, LONG *pl)
319 {
321  FIXME("(%p)->(%p)\n", This, pl);
322  return E_NOTIMPL;
323 }
324 
325 static HRESULT WINAPI InternetExplorer_put_Height(IWebBrowser2 *iface, LONG Height)
326 {
328  FIXME("(%p)->(%d)\n", This, Height);
329  return E_NOTIMPL;
330 }
331 
332 static HRESULT WINAPI InternetExplorer_get_LocationName(IWebBrowser2 *iface, BSTR *LocationName)
333 {
335  FIXME("(%p)->(%p)\n", This, LocationName);
336  return E_NOTIMPL;
337 }
338 
339 static HRESULT WINAPI InternetExplorer_get_LocationURL(IWebBrowser2 *iface, BSTR *LocationURL)
340 {
342 
343  TRACE("(%p)->(%p)\n", This, LocationURL);
344 
345  return get_location_url(&This->doc_host, LocationURL);
346 }
347 
348 static HRESULT WINAPI InternetExplorer_get_Busy(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
349 {
351 
352  TRACE("(%p)->(%p)\n", This, pBool);
353 
354  *pBool = This->doc_host.busy;
355  return S_OK;
356 }
357 
358 static HRESULT WINAPI InternetExplorer_Quit(IWebBrowser2 *iface)
359 {
361  FIXME("(%p)\n", This);
362  return E_NOTIMPL;
363 }
364 
365 static HRESULT WINAPI InternetExplorer_ClientToWindow(IWebBrowser2 *iface, int *pcx, int *pcy)
366 {
368  FIXME("(%p)->(%p %p)\n", This, pcx, pcy);
369  return E_NOTIMPL;
370 }
371 
372 static HRESULT WINAPI InternetExplorer_PutProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT vtValue)
373 {
375  FIXME("(%p)->(%s %s)\n", This, debugstr_w(szProperty), debugstr_variant(&vtValue));
376  return E_NOTIMPL;
377 }
378 
379 static HRESULT WINAPI InternetExplorer_GetProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT *pvtValue)
380 {
382  FIXME("(%p)->(%s %p)\n", This, debugstr_w(szProperty), pvtValue);
383  return E_NOTIMPL;
384 }
385 
386 static HRESULT WINAPI InternetExplorer_get_Name(IWebBrowser2 *iface, BSTR *Name)
387 {
389  FIXME("(%p)->(%p)\n", This, Name);
390  return E_NOTIMPL;
391 }
392 
393 static HRESULT WINAPI InternetExplorer_get_HWND(IWebBrowser2 *iface, SHANDLE_PTR *pHWND)
394 {
396 
397  TRACE("(%p)->(%p)\n", This, pHWND);
398 
399  *pHWND = (SHANDLE_PTR)This->frame_hwnd;
400  return S_OK;
401 }
402 
404 {
406  FIXME("(%p)->(%p)\n", This, FullName);
407  return E_NOTIMPL;
408 }
409 
410 static HRESULT WINAPI InternetExplorer_get_Path(IWebBrowser2 *iface, BSTR *Path)
411 {
413  FIXME("(%p)->(%p)\n", This, Path);
414  return E_NOTIMPL;
415 }
416 
417 static HRESULT WINAPI InternetExplorer_get_Visible(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
418 {
420 
421  TRACE("(%p)->(%p)\n", This, pBool);
422 
423  *pBool = IsWindowVisible(This->frame_hwnd) ? VARIANT_TRUE : VARIANT_FALSE;
424  return S_OK;
425 }
426 
428 {
430  TRACE("(%p)->(%x)\n", This, Value);
431 
432  ShowWindow(This->frame_hwnd, Value ? SW_SHOW : SW_HIDE);
433 
434  return S_OK;
435 }
436 
437 static HRESULT WINAPI InternetExplorer_get_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
438 {
440  FIXME("(%p)->(%p)\n", This, pBool);
441  return E_NOTIMPL;
442 }
443 
445 {
447  FIXME("(%p)->(%x)\n", This, Value);
448  return E_NOTIMPL;
449 }
450 
451 static HRESULT WINAPI InternetExplorer_get_StatusText(IWebBrowser2 *iface, BSTR *StatusText)
452 {
454  FIXME("(%p)->(%p)\n", This, StatusText);
455  return E_NOTIMPL;
456 }
457 
458 static HRESULT WINAPI InternetExplorer_put_StatusText(IWebBrowser2 *iface, BSTR StatusText)
459 {
461 
462  TRACE("(%p)->(%s)\n", This, debugstr_w(StatusText));
463 
464  return update_ie_statustext(This, StatusText);
465 }
466 
467 static HRESULT WINAPI InternetExplorer_get_ToolBar(IWebBrowser2 *iface, int *Value)
468 {
470  FIXME("(%p)->(%p)\n", This, Value);
471  return E_NOTIMPL;
472 }
473 
474 static HRESULT WINAPI InternetExplorer_put_ToolBar(IWebBrowser2 *iface, int Value)
475 {
477  FIXME("(%p)->(%d)\n", This, Value);
478  return E_NOTIMPL;
479 }
480 
482 {
484  FIXME("(%p)->(%p)\n", This, Value);
485  return E_NOTIMPL;
486 }
487 
489 {
491  HMENU menu = NULL;
492 
493  TRACE("(%p)->(%x)\n", This, Value);
494 
495  if(Value)
496  menu = This->menu;
497 
498  if(!SetMenu(This->frame_hwnd, menu))
500 
501  return S_OK;
502 }
503 
504 static HRESULT WINAPI InternetExplorer_get_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL *pbFullScreen)
505 {
507  FIXME("(%p)->(%p)\n", This, pbFullScreen);
508  return E_NOTIMPL;
509 }
510 
511 static HRESULT WINAPI InternetExplorer_put_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL bFullScreen)
512 {
514  FIXME("(%p)->(%x)\n", This, bFullScreen);
515  return E_NOTIMPL;
516 }
517 
518 static HRESULT WINAPI InternetExplorer_Navigate2(IWebBrowser2 *iface, VARIANT *URL, VARIANT *Flags,
519  VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers)
520 {
522 
523  TRACE("(%p)->(%s %s %s %s %s)\n", This, debugstr_variant(URL), debugstr_variant(Flags),
524  debugstr_variant(TargetFrameName), debugstr_variant(PostData), debugstr_variant(Headers));
525 
526  if(!URL)
527  return S_OK;
528 
529  if(V_VT(URL) != VT_BSTR) {
530  FIXME("Unsupported V_VT(URL) %d\n", V_VT(URL));
531  return E_INVALIDARG;
532  }
533 
534  return navigate_url(&This->doc_host, V_BSTR(URL), Flags, TargetFrameName, PostData, Headers);
535 }
536 
537 static HRESULT WINAPI InternetExplorer_QueryStatusWB(IWebBrowser2 *iface, OLECMDID cmdID, OLECMDF *pcmdf)
538 {
540  FIXME("(%p)->(%d %p)\n", This, cmdID, pcmdf);
541  return E_NOTIMPL;
542 }
543 
544 static HRESULT WINAPI InternetExplorer_ExecWB(IWebBrowser2 *iface, OLECMDID cmdID,
545  OLECMDEXECOPT cmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
546 {
548  FIXME("(%p)->(%d %d %s %p)\n", This, cmdID, cmdexecopt, debugstr_variant(pvaIn), pvaOut);
549  return E_NOTIMPL;
550 }
551 
552 static HRESULT WINAPI InternetExplorer_ShowBrowserBar(IWebBrowser2 *iface, VARIANT *pvaClsid,
553  VARIANT *pvarShow, VARIANT *pvarSize)
554 {
556  FIXME("(%p)->(%s %s %s)\n", This, debugstr_variant(pvaClsid), debugstr_variant(pvarShow),
557  debugstr_variant(pvarSize));
558  return E_NOTIMPL;
559 }
560 
561 static HRESULT WINAPI InternetExplorer_get_ReadyState(IWebBrowser2 *iface, READYSTATE *lpReadyState)
562 {
564  FIXME("(%p)->(%p)\n", This, lpReadyState);
565  return E_NOTIMPL;
566 }
567 
568 static HRESULT WINAPI InternetExplorer_get_Offline(IWebBrowser2 *iface, VARIANT_BOOL *pbOffline)
569 {
571  FIXME("(%p)->(%p)\n", This, pbOffline);
572  return E_NOTIMPL;
573 }
574 
575 static HRESULT WINAPI InternetExplorer_put_Offline(IWebBrowser2 *iface, VARIANT_BOOL bOffline)
576 {
578  FIXME("(%p)->(%x)\n", This, bOffline);
579  return E_NOTIMPL;
580 }
581 
582 static HRESULT WINAPI InternetExplorer_get_Silent(IWebBrowser2 *iface, VARIANT_BOOL *pbSilent)
583 {
585  FIXME("(%p)->(%p)\n", This, pbSilent);
586  return E_NOTIMPL;
587 }
588 
589 static HRESULT WINAPI InternetExplorer_put_Silent(IWebBrowser2 *iface, VARIANT_BOOL bSilent)
590 {
592  FIXME("(%p)->(%x)\n", This, bSilent);
593  return E_NOTIMPL;
594 }
595 
597  VARIANT_BOOL *pbRegister)
598 {
600  FIXME("(%p)->(%p)\n", This, pbRegister);
601  return E_NOTIMPL;
602 }
603 
605  VARIANT_BOOL bRegister)
606 {
608  FIXME("(%p)->(%x)\n", This, bRegister);
609  return E_NOTIMPL;
610 }
611 
613  VARIANT_BOOL *pbRegister)
614 {
616  FIXME("(%p)->(%p)\n", This, pbRegister);
617  return E_NOTIMPL;
618 }
619 
621  VARIANT_BOOL bRegister)
622 {
624  FIXME("(%p)->(%x)\n", This, bRegister);
625  return E_NOTIMPL;
626 }
627 
628 static HRESULT WINAPI InternetExplorer_get_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL *pbRegister)
629 {
631  FIXME("(%p)->(%p)\n", This, pbRegister);
632  return E_NOTIMPL;
633 }
634 
635 static HRESULT WINAPI InternetExplorer_put_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL bRegister)
636 {
638  FIXME("(%p)->(%x)\n", This, bRegister);
639  return E_NOTIMPL;
640 }
641 
643 {
645  FIXME("(%p)->(%p)\n", This, Value);
646  return E_NOTIMPL;
647 }
648 
650 {
652  FIXME("(%p)->(%x)\n", This, Value);
653  return E_NOTIMPL;
654 }
655 
657 {
659  FIXME("(%p)->(%p)\n", This, Value);
660  return E_NOTIMPL;
661 }
662 
664 {
666  FIXME("(%p)->(%x)\n", This, Value);
667  return E_NOTIMPL;
668 }
669 
670 static const IWebBrowser2Vtbl InternetExplorerVtbl =
671 {
743 };
744 
746 {
747  return CONTAINING_RECORD(iface, InternetExplorer, IExternalConnection_iface);
748 }
749 
750 /*
751  * Document may keep references to InternetExplorer object causing circular references.
752  * We keep track of external references and release the document object when all
753  * external references are released. A visible main window is also considered as
754  * an external reference.
755  */
757 {
758  LONG ref = InterlockedDecrement(&This->extern_ref);
759 
760  TRACE("ref = %d\n", ref);
761 
762  if(ref)
763  return ref;
764 
765  if(!last_closes) {
766  WARN("Last external connection released with FALSE last_closes.\n");
767  return ref;
768  }
769 
770  deactivate_document(&This->doc_host);
771  return ref;
772 }
773 
775 {
777  return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppv);
778 }
779 
781 {
783  return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
784 }
785 
787 {
789  return IWebBrowser2_Release(&This->IWebBrowser2_iface);
790 }
791 
793 {
795 
796  TRACE("(%p)->(%x %x)\n", This, extconn, reserved);
797 
798  if(extconn != EXTCONN_STRONG)
799  return 0;
800 
801  return InterlockedIncrement(&This->extern_ref);
802 }
803 
805  DWORD reserved, BOOL fLastReleaseCloses)
806 {
808 
809  TRACE("(%p)->(%x %x %x)\n", This, extconn, reserved, fLastReleaseCloses);
810 
811  if(extconn != EXTCONN_STRONG)
812  return 0;
813 
814  return release_extern_ref(This, fLastReleaseCloses);
815 }
816 
817 static const IExternalConnectionVtbl ExternalConnectionVtbl = {
823 };
824 
826 {
827  return CONTAINING_RECORD(iface, InternetExplorer, IServiceProvider_iface);
828 }
829 
831  REFIID riid, LPVOID *ppv)
832 {
834  return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppv);
835 }
836 
838 {
840  return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
841 }
842 
844 {
846  return IWebBrowser2_Release(&This->IWebBrowser2_iface);
847 }
848 
850  REFGUID guidService, REFIID riid, void **ppv)
851 {
853 
854  if(IsEqualGUID(&SID_SHTMLWindow, riid)) {
855  TRACE("(%p)->(SID_SHTMLWindow)\n", This);
856  return IHTMLWindow2_QueryInterface(&This->doc_host.html_window.IHTMLWindow2_iface, riid, ppv);
857  }
858 
859  FIXME("(%p)->(%s, %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
860  *ppv = NULL;
861  return E_NOINTERFACE;
862 }
863 
864 static const IServiceProviderVtbl ServiceProviderVtbl =
865 {
870 };
871 
873 {
874  This->IWebBrowser2_iface.lpVtbl = &InternetExplorerVtbl;
875  This->IExternalConnection_iface.lpVtbl = &ExternalConnectionVtbl;
876  This->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl;
877 }
static const IServiceProviderVtbl ServiceProviderVtbl
Definition: ie.c:864
static HRESULT WINAPI InternetExplorer_put_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL bRegister)
Definition: ie.c:635
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
static HRESULT WINAPI InternetExplorer_PutProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT vtValue)
Definition: ie.c:372
static HRESULT WINAPI InternetExplorer_put_Silent(IWebBrowser2 *iface, VARIANT_BOOL bSilent)
Definition: ie.c:589
static HRESULT WINAPI InternetExplorer_get_StatusText(IWebBrowser2 *iface, BSTR *StatusText)
Definition: ie.c:451
static HRESULT WINAPI InternetExplorer_Quit(IWebBrowser2 *iface)
Definition: ie.c:358
static HRESULT WINAPI InternetExplorer_GoSearch(IWebBrowser2 *iface)
Definition: ie.c:190
static HRESULT WINAPI IEServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
Definition: ie.c:849
#define REFIID
Definition: guiddef.h:118
static HRESULT WINAPI InternetExplorer_get_ToolBar(IWebBrowser2 *iface, int *Value)
Definition: ie.c:467
#define E_NOINTERFACE
Definition: winerror.h:2364
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
static ULONG WINAPI InternetExplorer_AddRef(IWebBrowser2 *iface)
Definition: ie.c:73
static HRESULT WINAPI InternetExplorer_put_StatusText(IWebBrowser2 *iface, BSTR StatusText)
Definition: ie.c:458
static InternetExplorer * impl_from_IServiceProvider(IServiceProvider *iface)
Definition: ie.c:825
BOOL HlinkFrame_QI(HlinkFrame *, REFIID, void **) DECLSPEC_HIDDEN
Definition: navigate.c:1666
static HRESULT WINAPI InternetExplorer_QueryStatusWB(IWebBrowser2 *iface, OLECMDID cmdID, OLECMDF *pcmdf)
Definition: ie.c:537
Type
Definition: Type.h:6
static HRESULT WINAPI InternetExplorer_get_TopLevelContainer(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
Definition: ie.c:262
Definition: scsiwmi.h:51
static DWORD WINAPI ExternalConnection_AddConnection(IExternalConnection *iface, DWORD extconn, DWORD reserved)
Definition: ie.c:792
HRESULT refresh_document(DocHost *This, const VARIANT *level)
Definition: dochost.c:572
static HRESULT navigate_url(HHInfo *info, LPCWSTR surl)
Definition: help.c:189
void released_obj(void) DECLSPEC_HIDDEN
Definition: iexplore.c:946
static HRESULT WINAPI InternetExplorer_put_Top(IWebBrowser2 *iface, LONG Top)
Definition: ie.c:297
#define SW_HIDE
Definition: winuser.h:762
REFIID riid
Definition: precomp.h:44
static HRESULT WINAPI InternetExplorer_get_Path(IWebBrowser2 *iface, BSTR *Path)
Definition: ie.c:410
static HRESULT WINAPI InternetExplorer_get_ReadyState(IWebBrowser2 *iface, READYSTATE *lpReadyState)
Definition: ie.c:561
static const IWebBrowser2Vtbl InternetExplorerVtbl
Definition: ie.c:670
#define WARN(fmt,...)
Definition: debug.h:111
static ULONG WINAPI IEServiceProvider_AddRef(IServiceProvider *iface)
Definition: ie.c:837
static HRESULT WINAPI InternetExplorer_get_Left(IWebBrowser2 *iface, LONG *pl)
Definition: ie.c:276
REFIID LPVOID * ppv
Definition: atlbase.h:39
const GUID IID_IConnectionPointContainer
HRESULT update_ie_statustext(InternetExplorer *, LPCWSTR) DECLSPEC_HIDDEN
Definition: iexplore.c:63
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
static HRESULT WINAPI InternetExplorer_get_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL *pbRegister)
Definition: ie.c:628
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:55
DWORD LCID
Definition: nls.h:13
OLECHAR * BSTR
Definition: compat.h:1942
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
static const IExternalConnectionVtbl ExternalConnectionVtbl
Definition: ie.c:817
static LPOLESTR
Definition: stg_prop.c:27
static HRESULT WINAPI InternetExplorer_GetProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT *pvtValue)
Definition: ie.c:379
static HRESULT WINAPI InternetExplorer_get_Top(IWebBrowser2 *iface, LONG *pl)
Definition: ie.c:290
BOOL WINAPI DestroyWindow(_In_ HWND)
static HRESULT WINAPI InternetExplorer_get_Type(IWebBrowser2 *iface, BSTR *Type)
Definition: ie.c:269
short VARIANT_BOOL
Definition: compat.h:1939
Definition: send.c:47
static HRESULT WINAPI InternetExplorer_ExecWB(IWebBrowser2 *iface, OLECMDID cmdID, OLECMDEXECOPT cmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ie.c:544
long SHANDLE_PTR
Definition: basetsd.h:77
static HRESULT WINAPI InternetExplorer_get_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL *pbFullScreen)
Definition: ie.c:504
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
static ULONG WINAPI IEServiceProvider_Release(IServiceProvider *iface)
Definition: ie.c:843
static HRESULT WINAPI InternetExplorer_put_RegisterAsBrowser(IWebBrowser2 *iface, VARIANT_BOOL bRegister)
Definition: ie.c:604
static HRESULT WINAPI InternetExplorer_put_AddressBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
Definition: ie.c:649
static HRESULT WINAPI InternetExplorer_GetIDsOfNames(IWebBrowser2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: ie.c:131
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
static HRESULT WINAPI InternetExplorer_get_RegisterAsDropTarget(IWebBrowser2 *iface, VARIANT_BOOL *pbRegister)
Definition: ie.c:612
static HRESULT WINAPI InternetExplorer_put_Height(IWebBrowser2 *iface, LONG Height)
Definition: ie.c:325
#define debugstr_w
Definition: kernel32.h:32
GLenum GLint ref
Definition: glext.h:6028
static HRESULT WINAPI InternetExplorer_get_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
Definition: ie.c:437
#define FIXME(fmt,...)
Definition: debug.h:110
static HRESULT WINAPI InternetExplorer_put_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
Definition: ie.c:488
r reserved
Definition: btrfs.c:2865
static HRESULT WINAPI InternetExplorer_get_Silent(IWebBrowser2 *iface, VARIANT_BOOL *pbSilent)
Definition: ie.c:582
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT go_home(DocHost *) DECLSPEC_HIDDEN
Definition: navigate.c:1065
smooth NULL
Definition: ftsmooth.c:416
static HRESULT WINAPI InternetExplorer_get_RegisterAsBrowser(IWebBrowser2 *iface, VARIANT_BOOL *pbRegister)
Definition: ie.c:596
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
static HRESULT WINAPI InternetExplorer_get_AddressBar(IWebBrowser2 *iface, VARIANT_BOOL *Value)
Definition: ie.c:642
static ULONG WINAPI ExternalConnection_AddRef(IExternalConnection *iface)
Definition: ie.c:780
static HRESULT WINAPI InternetExplorer_put_ToolBar(IWebBrowser2 *iface, int Value)
Definition: ie.c:474
HRESULT go_forward(DocHost *) DECLSPEC_HIDDEN
Definition: navigate.c:1132
#define SW_SHOW
Definition: winuser.h:769
static HRESULT WINAPI InternetExplorer_ClientToWindow(IWebBrowser2 *iface, int *pcx, int *pcy)
Definition: ie.c:365
#define debugstr_guid
Definition: kernel32.h:35
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
static HRESULT WINAPI InternetExplorer_get_Height(IWebBrowser2 *iface, LONG *pl)
Definition: ie.c:318
void deactivate_document(DocHost *This)
Definition: dochost.c:510
static HRESULT WINAPI InternetExplorer_GetTypeInfo(IWebBrowser2 *iface, UINT iTInfo, LCID lcid, LPTYPEINFO *ppTInfo)
Definition: ie.c:113
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
static HRESULT WINAPI InternetExplorer_put_Resizable(IWebBrowser2 *iface, VARIANT_BOOL Value)
Definition: ie.c:663
static HRESULT WINAPI InternetExplorer_put_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
Definition: ie.c:444
static HRESULT WINAPI InternetExplorer_QueryInterface(IWebBrowser2 *iface, REFIID riid, LPVOID *ppv)
Definition: ie.c:30
static HRESULT WINAPI InternetExplorer_put_RegisterAsDropTarget(IWebBrowser2 *iface, VARIANT_BOOL bRegister)
Definition: ie.c:620
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
BOOL WINAPI SetMenu(_In_ HWND, _In_opt_ HMENU)
const GUID IID_IUnknown
static HRESULT WINAPI InternetExplorer_ShowBrowserBar(IWebBrowser2 *iface, VARIANT *pvaClsid, VARIANT *pvarShow, VARIANT *pvarSize)
Definition: ie.c:552
static HRESULT WINAPI InternetExplorer_Refresh(IWebBrowser2 *iface)
Definition: ie.c:209
static HRESULT WINAPI InternetExplorer_get_Busy(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
Definition: ie.c:348
#define WINAPI
Definition: msvc.h:6
static HRESULT WINAPI InternetExplorer_GetTypeInfoCount(IWebBrowser2 *iface, UINT *pctinfo)
Definition: ie.c:103
static HRESULT WINAPI InternetExplorer_get_Visible(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
Definition: ie.c:417
unsigned short WORD
Definition: ntddk_ex.h:93
static HRESULT WINAPI InternetExplorer_put_Offline(IWebBrowser2 *iface, VARIANT_BOOL bOffline)
Definition: ie.c:575
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ PSTRING FullName
Definition: rtlfuncs.h:1649
static HRESULT WINAPI InternetExplorer_put_Width(IWebBrowser2 *iface, LONG Width)
Definition: ie.c:311
static HRESULT WINAPI InternetExplorer_Refresh2(IWebBrowser2 *iface, VARIANT *Level)
Definition: ie.c:218
void DocHost_Release(DocHost *This)
Definition: dochost.c:1128
static ULONG WINAPI InternetExplorer_Release(IWebBrowser2 *iface)
Definition: ie.c:81
const GUID IID_IDispatch
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109
#define InterlockedDecrement
Definition: armddk.h:52
DWORD release_extern_ref(InternetExplorer *This, BOOL last_closes)
Definition: ie.c:756
#define V_VT(A)
Definition: oleauto.h:211
static HRESULT WINAPI InternetExplorer_Navigate2(IWebBrowser2 *iface, VARIANT *URL, VARIANT *Flags, VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers)
Definition: ie.c:518
static HRESULT WINAPI InternetExplorer_Stop(IWebBrowser2 *iface)
Definition: ie.c:227
static HRESULT WINAPI InternetExplorer_put_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL bFullScreen)
Definition: ie.c:511
static HRESULT WINAPI IEServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, LPVOID *ppv)
Definition: ie.c:830
static HRESULT WINAPI InternetExplorer_GoBack(IWebBrowser2 *iface)
Definition: ie.c:169
static HRESULT WINAPI InternetExplorer_Invoke(IWebBrowser2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
Definition: ie.c:149
#define V_BSTR(A)
Definition: oleauto.h:226
static HRESULT WINAPI InternetExplorer_get_FullName(IWebBrowser2 *iface, BSTR *FullName)
Definition: ie.c:403
static HRESULT WINAPI InternetExplorer_GoHome(IWebBrowser2 *iface)
Definition: ie.c:183
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
struct stdole::EXCEPINFO EXCEPINFO
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
static VARIANTARG static DISPID
Definition: ordinal.c:49
#define S_OK
Definition: intsafe.h:59
static HRESULT WINAPI ExternalConnection_QueryInterface(IExternalConnection *iface, REFIID riid, void **ppv)
Definition: ie.c:774
PRTL_UNICODE_STRING_BUFFER Path
static HRESULT WINAPI InternetExplorer_get_Parent(IWebBrowser2 *iface, IDispatch **ppDisp)
Definition: ie.c:241
static InternetExplorer * impl_from_IExternalConnection(IExternalConnection *iface)
Definition: ie.c:745
#define InterlockedIncrement
Definition: armddk.h:53
HRESULT go_back(DocHost *) DECLSPEC_HIDDEN
Definition: navigate.c:1122
static HRESULT WINAPI InternetExplorer_get_LocationURL(IWebBrowser2 *iface, BSTR *LocationURL)
Definition: ie.c:339
static HRESULT WINAPI InternetExplorer_get_Container(IWebBrowser2 *iface, IDispatch **ppDisp)
Definition: ie.c:248
static HRESULT WINAPI InternetExplorer_get_Application(IWebBrowser2 *iface, IDispatch **ppDisp)
Definition: ie.c:234
#define E_NOTIMPL
Definition: ddrawi.h:99
static const WCHAR szProperty[]
Definition: msipriv.h:1198
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
static InternetExplorer * impl_from_IWebBrowser2(IWebBrowser2 *iface)
Definition: ie.c:25
static HRESULT WINAPI InternetExplorer_Navigate(IWebBrowser2 *iface, BSTR szUrl, VARIANT *Flags, VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers)
Definition: ie.c:197
static DWORD WINAPI ExternalConnection_ReleaseConnection(IExternalConnection *iface, DWORD extconn, DWORD reserved, BOOL fLastReleaseCloses)
Definition: ie.c:804
HRESULT get_location_url(DocHost *, BSTR *) DECLSPEC_HIDDEN
Definition: navigate.c:1142
static HRESULT WINAPI InternetExplorer_get_Document(IWebBrowser2 *iface, IDispatch **ppDisp)
Definition: ie.c:255
struct stdole::DISPPARAMS DISPPARAMS
static HRESULT WINAPI InternetExplorer_get_Offline(IWebBrowser2 *iface, VARIANT_BOOL *pbOffline)
Definition: ie.c:568
static HRESULT WINAPI InternetExplorer_get_Width(IWebBrowser2 *iface, LONG *pl)
Definition: ie.c:304
unsigned int ULONG
Definition: retypes.h:1
BOOL WINAPI IsWindowVisible(_In_ HWND)
static HRESULT WINAPI InternetExplorer_put_Left(IWebBrowser2 *iface, LONG Left)
Definition: ie.c:283
void InternetExplorer_WebBrowser_Init(InternetExplorer *This)
Definition: ie.c:872
static HRESULT WINAPI InternetExplorer_put_Visible(IWebBrowser2 *iface, VARIANT_BOOL Value)
Definition: ie.c:427
static HRESULT WINAPI InternetExplorer_get_LocationName(IWebBrowser2 *iface, BSTR *LocationName)
Definition: ie.c:332
WINE_DEFAULT_DEBUG_CHANNEL(ieframe)
static HRESULT WINAPI InternetExplorer_get_HWND(IWebBrowser2 *iface, SHANDLE_PTR *pHWND)
Definition: ie.c:393
static ULONG WINAPI ExternalConnection_Release(IExternalConnection *iface)
Definition: ie.c:786
static HRESULT WINAPI InternetExplorer_get_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL *Value)
Definition: ie.c:481
static HRESULT WINAPI InternetExplorer_get_Resizable(IWebBrowser2 *iface, VARIANT_BOOL *Value)
Definition: ie.c:656
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
static HRESULT WINAPI InternetExplorer_GoForward(IWebBrowser2 *iface)
Definition: ie.c:176
static LPHIST_ENTRY Top
Definition: history.c:53
static HRESULT WINAPI InternetExplorer_get_Name(IWebBrowser2 *iface, BSTR *Name)
Definition: ie.c:386
static BOOL heap_free(void *mem)
Definition: appwiz.h:75