2 * Copyright 2006 Jacek Caban for CodeWeavers
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.
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.
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
21 #include "wine/debug.h"
23 WINE_DEFAULT_DEBUG_CHANNEL(ieframe
);
25 static inline InternetExplorer
*impl_from_IWebBrowser2(IWebBrowser2
*iface
)
27 return CONTAINING_RECORD(iface
, InternetExplorer
, IWebBrowser2_iface
);
30 static HRESULT WINAPI
InternetExplorer_QueryInterface(IWebBrowser2
*iface
, REFIID riid
, LPVOID
*ppv
)
32 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
36 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
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
;
51 }else if(IsEqualGUID(&IID_IConnectionPointContainer
, riid
)) {
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
)) {
65 IUnknown_AddRef((IUnknown
*)*ppv
);
69 WARN("(%p)->(%s %p) interface not supported\n", This
, debugstr_guid(riid
), ppv
);
73 static ULONG WINAPI
InternetExplorer_AddRef(IWebBrowser2
*iface
)
75 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
76 LONG ref
= InterlockedIncrement(&This
->ref
);
77 TRACE("(%p) ref=%d\n", This
, ref
);
81 static ULONG WINAPI
InternetExplorer_Release(IWebBrowser2
*iface
)
83 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
84 LONG ref
= InterlockedDecrement(&This
->ref
);
86 TRACE("(%p) ref=%d\n", This
, ref
);
89 deactivate_document(&This
->doc_host
);
90 DocHost_Release(&This
->doc_host
);
93 DestroyWindow(This
->frame_hwnd
);
94 list_remove(&This
->entry
);
103 static HRESULT WINAPI
InternetExplorer_GetTypeInfoCount(IWebBrowser2
*iface
, UINT
*pctinfo
)
105 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
106 FIXME("(%p)->(%p)\n", This
, pctinfo
);
110 static HRESULT WINAPI
InternetExplorer_GetTypeInfo(IWebBrowser2
*iface
, UINT iTInfo
, LCID lcid
,
113 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
114 FIXME("(%p)->(%d %d %p)\n", This
, iTInfo
, lcid
, ppTInfo
);
118 static HRESULT WINAPI
InternetExplorer_GetIDsOfNames(IWebBrowser2
*iface
, REFIID riid
,
119 LPOLESTR
*rgszNames
, UINT cNames
,
120 LCID lcid
, DISPID
*rgDispId
)
122 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
123 FIXME("(%p)->(%s %p %d %d %p)\n", This
, debugstr_guid(riid
), rgszNames
, cNames
,
128 static HRESULT WINAPI
InternetExplorer_Invoke(IWebBrowser2
*iface
, DISPID dispIdMember
,
129 REFIID riid
, LCID lcid
, WORD wFlags
,
130 DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
,
131 EXCEPINFO
*pExepInfo
, UINT
*puArgErr
)
133 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
134 FIXME("(%p)->(%d %s %d %08x %p %p %p %p)\n", This
, dispIdMember
, debugstr_guid(riid
),
135 lcid
, wFlags
, pDispParams
, pVarResult
, pExepInfo
, puArgErr
);
139 static HRESULT WINAPI
InternetExplorer_GoBack(IWebBrowser2
*iface
)
141 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
142 TRACE("(%p)\n", This
);
143 return go_back(&This
->doc_host
);
146 static HRESULT WINAPI
InternetExplorer_GoForward(IWebBrowser2
*iface
)
148 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
149 TRACE("(%p)\n", This
);
150 return go_forward(&This
->doc_host
);
153 static HRESULT WINAPI
InternetExplorer_GoHome(IWebBrowser2
*iface
)
155 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
156 TRACE("(%p)\n", This
);
157 return go_home(&This
->doc_host
);
160 static HRESULT WINAPI
InternetExplorer_GoSearch(IWebBrowser2
*iface
)
162 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
163 FIXME("(%p)\n", This
);
167 static HRESULT WINAPI
InternetExplorer_Navigate(IWebBrowser2
*iface
, BSTR szUrl
,
168 VARIANT
*Flags
, VARIANT
*TargetFrameName
,
169 VARIANT
*PostData
, VARIANT
*Headers
)
171 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
173 TRACE("(%p)->(%s %p %p %p %p)\n", This
, debugstr_w(szUrl
), Flags
, TargetFrameName
,
176 return navigate_url(&This
->doc_host
, szUrl
, Flags
, TargetFrameName
, PostData
, Headers
);
179 static HRESULT WINAPI
InternetExplorer_Refresh(IWebBrowser2
*iface
)
181 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
183 TRACE("(%p)\n", This
);
185 return refresh_document(&This
->doc_host
);
188 static HRESULT WINAPI
InternetExplorer_Refresh2(IWebBrowser2
*iface
, VARIANT
*Level
)
190 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
191 FIXME("(%p)->(%p)\n", This
, Level
);
195 static HRESULT WINAPI
InternetExplorer_Stop(IWebBrowser2
*iface
)
197 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
198 FIXME("(%p)\n", This
);
202 static HRESULT WINAPI
InternetExplorer_get_Application(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
204 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
205 FIXME("(%p)->(%p)\n", This
, ppDisp
);
209 static HRESULT WINAPI
InternetExplorer_get_Parent(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
211 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
212 FIXME("(%p)->(%p)\n", This
, ppDisp
);
216 static HRESULT WINAPI
InternetExplorer_get_Container(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
218 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
219 FIXME("(%p)->(%p)\n", This
, ppDisp
);
223 static HRESULT WINAPI
InternetExplorer_get_Document(IWebBrowser2
*iface
, IDispatch
**ppDisp
)
225 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
226 FIXME("(%p)->(%p)\n", This
, ppDisp
);
230 static HRESULT WINAPI
InternetExplorer_get_TopLevelContainer(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
232 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
233 FIXME("(%p)->(%p)\n", This
, pBool
);
237 static HRESULT WINAPI
InternetExplorer_get_Type(IWebBrowser2
*iface
, BSTR
*Type
)
239 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
240 FIXME("(%p)->(%p)\n", This
, Type
);
244 static HRESULT WINAPI
InternetExplorer_get_Left(IWebBrowser2
*iface
, LONG
*pl
)
246 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
247 FIXME("(%p)->(%p)\n", This
, pl
);
251 static HRESULT WINAPI
InternetExplorer_put_Left(IWebBrowser2
*iface
, LONG Left
)
253 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
254 FIXME("(%p)->(%d)\n", This
, Left
);
258 static HRESULT WINAPI
InternetExplorer_get_Top(IWebBrowser2
*iface
, LONG
*pl
)
260 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
261 FIXME("(%p)->(%p)\n", This
, pl
);
265 static HRESULT WINAPI
InternetExplorer_put_Top(IWebBrowser2
*iface
, LONG Top
)
267 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
268 FIXME("(%p)->(%d)\n", This
, Top
);
272 static HRESULT WINAPI
InternetExplorer_get_Width(IWebBrowser2
*iface
, LONG
*pl
)
274 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
275 FIXME("(%p)->(%p)\n", This
, pl
);
279 static HRESULT WINAPI
InternetExplorer_put_Width(IWebBrowser2
*iface
, LONG Width
)
281 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
282 FIXME("(%p)->(%d)\n", This
, Width
);
286 static HRESULT WINAPI
InternetExplorer_get_Height(IWebBrowser2
*iface
, LONG
*pl
)
288 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
289 FIXME("(%p)->(%p)\n", This
, pl
);
293 static HRESULT WINAPI
InternetExplorer_put_Height(IWebBrowser2
*iface
, LONG Height
)
295 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
296 FIXME("(%p)->(%d)\n", This
, Height
);
300 static HRESULT WINAPI
InternetExplorer_get_LocationName(IWebBrowser2
*iface
, BSTR
*LocationName
)
302 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
303 FIXME("(%p)->(%p)\n", This
, LocationName
);
307 static HRESULT WINAPI
InternetExplorer_get_LocationURL(IWebBrowser2
*iface
, BSTR
*LocationURL
)
309 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
311 TRACE("(%p)->(%p)\n", This
, LocationURL
);
313 return get_location_url(&This
->doc_host
, LocationURL
);
316 static HRESULT WINAPI
InternetExplorer_get_Busy(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
318 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
319 FIXME("(%p)->(%p)\n", This
, pBool
);
323 static HRESULT WINAPI
InternetExplorer_Quit(IWebBrowser2
*iface
)
325 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
326 FIXME("(%p)\n", This
);
330 static HRESULT WINAPI
InternetExplorer_ClientToWindow(IWebBrowser2
*iface
, int *pcx
, int *pcy
)
332 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
333 FIXME("(%p)->(%p %p)\n", This
, pcx
, pcy
);
337 static HRESULT WINAPI
InternetExplorer_PutProperty(IWebBrowser2
*iface
, BSTR szProperty
, VARIANT vtValue
)
339 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
340 FIXME("(%p)->(%s)\n", This
, debugstr_w(szProperty
));
344 static HRESULT WINAPI
InternetExplorer_GetProperty(IWebBrowser2
*iface
, BSTR szProperty
, VARIANT
*pvtValue
)
346 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
347 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(szProperty
), pvtValue
);
351 static HRESULT WINAPI
InternetExplorer_get_Name(IWebBrowser2
*iface
, BSTR
*Name
)
353 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
354 FIXME("(%p)->(%p)\n", This
, Name
);
358 static HRESULT WINAPI
InternetExplorer_get_HWND(IWebBrowser2
*iface
, SHANDLE_PTR
*pHWND
)
360 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
361 FIXME("(%p)->(%p)\n", This
, pHWND
);
365 static HRESULT WINAPI
InternetExplorer_get_FullName(IWebBrowser2
*iface
, BSTR
*FullName
)
367 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
368 FIXME("(%p)->(%p)\n", This
, FullName
);
372 static HRESULT WINAPI
InternetExplorer_get_Path(IWebBrowser2
*iface
, BSTR
*Path
)
374 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
375 FIXME("(%p)->(%p)\n", This
, Path
);
379 static HRESULT WINAPI
InternetExplorer_get_Visible(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
381 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
383 TRACE("(%p)->(%p)\n", This
, pBool
);
385 *pBool
= IsWindowVisible(This
->frame_hwnd
) ? VARIANT_TRUE
: VARIANT_FALSE
;
389 static HRESULT WINAPI
InternetExplorer_put_Visible(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
391 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
392 TRACE("(%p)->(%x)\n", This
, Value
);
394 ShowWindow(This
->frame_hwnd
, Value
? SW_SHOW
: SW_HIDE
);
399 static HRESULT WINAPI
InternetExplorer_get_StatusBar(IWebBrowser2
*iface
, VARIANT_BOOL
*pBool
)
401 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
402 FIXME("(%p)->(%p)\n", This
, pBool
);
406 static HRESULT WINAPI
InternetExplorer_put_StatusBar(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
408 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
409 FIXME("(%p)->(%x)\n", This
, Value
);
413 static HRESULT WINAPI
InternetExplorer_get_StatusText(IWebBrowser2
*iface
, BSTR
*StatusText
)
415 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
416 FIXME("(%p)->(%p)\n", This
, StatusText
);
420 static HRESULT WINAPI
InternetExplorer_put_StatusText(IWebBrowser2
*iface
, BSTR StatusText
)
422 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
424 TRACE("(%p)->(%s)\n", This
, debugstr_w(StatusText
));
426 return update_ie_statustext(This
, StatusText
);
429 static HRESULT WINAPI
InternetExplorer_get_ToolBar(IWebBrowser2
*iface
, int *Value
)
431 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
432 FIXME("(%p)->(%p)\n", This
, Value
);
436 static HRESULT WINAPI
InternetExplorer_put_ToolBar(IWebBrowser2
*iface
, int Value
)
438 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
439 FIXME("(%p)->(%d)\n", This
, Value
);
443 static HRESULT WINAPI
InternetExplorer_get_MenuBar(IWebBrowser2
*iface
, VARIANT_BOOL
*Value
)
445 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
446 FIXME("(%p)->(%p)\n", This
, Value
);
450 static HRESULT WINAPI
InternetExplorer_put_MenuBar(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
452 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
455 TRACE("(%p)->(%x)\n", This
, Value
);
460 if(!SetMenu(This
->frame_hwnd
, menu
))
461 return HRESULT_FROM_WIN32(GetLastError());
466 static HRESULT WINAPI
InternetExplorer_get_FullScreen(IWebBrowser2
*iface
, VARIANT_BOOL
*pbFullScreen
)
468 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
469 FIXME("(%p)->(%p)\n", This
, pbFullScreen
);
473 static HRESULT WINAPI
InternetExplorer_put_FullScreen(IWebBrowser2
*iface
, VARIANT_BOOL bFullScreen
)
475 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
476 FIXME("(%p)->(%x)\n", This
, bFullScreen
);
480 static HRESULT WINAPI
InternetExplorer_Navigate2(IWebBrowser2
*iface
, VARIANT
*URL
, VARIANT
*Flags
,
481 VARIANT
*TargetFrameName
, VARIANT
*PostData
, VARIANT
*Headers
)
483 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
485 TRACE("(%p)->(%p %p %p %p %p)\n", This
, URL
, Flags
, TargetFrameName
, PostData
, Headers
);
490 if(V_VT(URL
) != VT_BSTR
) {
491 FIXME("Unsupported V_VT(URL) %d\n", V_VT(URL
));
495 return navigate_url(&This
->doc_host
, V_BSTR(URL
), Flags
, TargetFrameName
, PostData
, Headers
);
498 static HRESULT WINAPI
InternetExplorer_QueryStatusWB(IWebBrowser2
*iface
, OLECMDID cmdID
, OLECMDF
*pcmdf
)
500 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
501 FIXME("(%p)->(%d %p)\n", This
, cmdID
, pcmdf
);
505 static HRESULT WINAPI
InternetExplorer_ExecWB(IWebBrowser2
*iface
, OLECMDID cmdID
,
506 OLECMDEXECOPT cmdexecopt
, VARIANT
*pvaIn
, VARIANT
*pvaOut
)
508 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
509 FIXME("(%p)->(%d %d %p %p)\n", This
, cmdID
, cmdexecopt
, pvaIn
, pvaOut
);
513 static HRESULT WINAPI
InternetExplorer_ShowBrowserBar(IWebBrowser2
*iface
, VARIANT
*pvaClsid
,
514 VARIANT
*pvarShow
, VARIANT
*pvarSize
)
516 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
517 FIXME("(%p)->(%p %p %p)\n", This
, pvaClsid
, pvarShow
, pvarSize
);
521 static HRESULT WINAPI
InternetExplorer_get_ReadyState(IWebBrowser2
*iface
, READYSTATE
*lpReadyState
)
523 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
524 FIXME("(%p)->(%p)\n", This
, lpReadyState
);
528 static HRESULT WINAPI
InternetExplorer_get_Offline(IWebBrowser2
*iface
, VARIANT_BOOL
*pbOffline
)
530 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
531 FIXME("(%p)->(%p)\n", This
, pbOffline
);
535 static HRESULT WINAPI
InternetExplorer_put_Offline(IWebBrowser2
*iface
, VARIANT_BOOL bOffline
)
537 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
538 FIXME("(%p)->(%x)\n", This
, bOffline
);
542 static HRESULT WINAPI
InternetExplorer_get_Silent(IWebBrowser2
*iface
, VARIANT_BOOL
*pbSilent
)
544 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
545 FIXME("(%p)->(%p)\n", This
, pbSilent
);
549 static HRESULT WINAPI
InternetExplorer_put_Silent(IWebBrowser2
*iface
, VARIANT_BOOL bSilent
)
551 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
552 FIXME("(%p)->(%x)\n", This
, bSilent
);
556 static HRESULT WINAPI
InternetExplorer_get_RegisterAsBrowser(IWebBrowser2
*iface
,
557 VARIANT_BOOL
*pbRegister
)
559 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
560 FIXME("(%p)->(%p)\n", This
, pbRegister
);
564 static HRESULT WINAPI
InternetExplorer_put_RegisterAsBrowser(IWebBrowser2
*iface
,
565 VARIANT_BOOL bRegister
)
567 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
568 FIXME("(%p)->(%x)\n", This
, bRegister
);
572 static HRESULT WINAPI
InternetExplorer_get_RegisterAsDropTarget(IWebBrowser2
*iface
,
573 VARIANT_BOOL
*pbRegister
)
575 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
576 FIXME("(%p)->(%p)\n", This
, pbRegister
);
580 static HRESULT WINAPI
InternetExplorer_put_RegisterAsDropTarget(IWebBrowser2
*iface
,
581 VARIANT_BOOL bRegister
)
583 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
584 FIXME("(%p)->(%x)\n", This
, bRegister
);
588 static HRESULT WINAPI
InternetExplorer_get_TheaterMode(IWebBrowser2
*iface
, VARIANT_BOOL
*pbRegister
)
590 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
591 FIXME("(%p)->(%p)\n", This
, pbRegister
);
595 static HRESULT WINAPI
InternetExplorer_put_TheaterMode(IWebBrowser2
*iface
, VARIANT_BOOL bRegister
)
597 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
598 FIXME("(%p)->(%x)\n", This
, bRegister
);
602 static HRESULT WINAPI
InternetExplorer_get_AddressBar(IWebBrowser2
*iface
, VARIANT_BOOL
*Value
)
604 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
605 FIXME("(%p)->(%p)\n", This
, Value
);
609 static HRESULT WINAPI
InternetExplorer_put_AddressBar(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
611 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
612 FIXME("(%p)->(%x)\n", This
, Value
);
616 static HRESULT WINAPI
InternetExplorer_get_Resizable(IWebBrowser2
*iface
, VARIANT_BOOL
*Value
)
618 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
619 FIXME("(%p)->(%p)\n", This
, Value
);
623 static HRESULT WINAPI
InternetExplorer_put_Resizable(IWebBrowser2
*iface
, VARIANT_BOOL Value
)
625 InternetExplorer
*This
= impl_from_IWebBrowser2(iface
);
626 FIXME("(%p)->(%x)\n", This
, Value
);
630 static const IWebBrowser2Vtbl InternetExplorerVtbl
=
632 InternetExplorer_QueryInterface
,
633 InternetExplorer_AddRef
,
634 InternetExplorer_Release
,
635 InternetExplorer_GetTypeInfoCount
,
636 InternetExplorer_GetTypeInfo
,
637 InternetExplorer_GetIDsOfNames
,
638 InternetExplorer_Invoke
,
639 InternetExplorer_GoBack
,
640 InternetExplorer_GoForward
,
641 InternetExplorer_GoHome
,
642 InternetExplorer_GoSearch
,
643 InternetExplorer_Navigate
,
644 InternetExplorer_Refresh
,
645 InternetExplorer_Refresh2
,
646 InternetExplorer_Stop
,
647 InternetExplorer_get_Application
,
648 InternetExplorer_get_Parent
,
649 InternetExplorer_get_Container
,
650 InternetExplorer_get_Document
,
651 InternetExplorer_get_TopLevelContainer
,
652 InternetExplorer_get_Type
,
653 InternetExplorer_get_Left
,
654 InternetExplorer_put_Left
,
655 InternetExplorer_get_Top
,
656 InternetExplorer_put_Top
,
657 InternetExplorer_get_Width
,
658 InternetExplorer_put_Width
,
659 InternetExplorer_get_Height
,
660 InternetExplorer_put_Height
,
661 InternetExplorer_get_LocationName
,
662 InternetExplorer_get_LocationURL
,
663 InternetExplorer_get_Busy
,
664 InternetExplorer_Quit
,
665 InternetExplorer_ClientToWindow
,
666 InternetExplorer_PutProperty
,
667 InternetExplorer_GetProperty
,
668 InternetExplorer_get_Name
,
669 InternetExplorer_get_HWND
,
670 InternetExplorer_get_FullName
,
671 InternetExplorer_get_Path
,
672 InternetExplorer_get_Visible
,
673 InternetExplorer_put_Visible
,
674 InternetExplorer_get_StatusBar
,
675 InternetExplorer_put_StatusBar
,
676 InternetExplorer_get_StatusText
,
677 InternetExplorer_put_StatusText
,
678 InternetExplorer_get_ToolBar
,
679 InternetExplorer_put_ToolBar
,
680 InternetExplorer_get_MenuBar
,
681 InternetExplorer_put_MenuBar
,
682 InternetExplorer_get_FullScreen
,
683 InternetExplorer_put_FullScreen
,
684 InternetExplorer_Navigate2
,
685 InternetExplorer_QueryStatusWB
,
686 InternetExplorer_ExecWB
,
687 InternetExplorer_ShowBrowserBar
,
688 InternetExplorer_get_ReadyState
,
689 InternetExplorer_get_Offline
,
690 InternetExplorer_put_Offline
,
691 InternetExplorer_get_Silent
,
692 InternetExplorer_put_Silent
,
693 InternetExplorer_get_RegisterAsBrowser
,
694 InternetExplorer_put_RegisterAsBrowser
,
695 InternetExplorer_get_RegisterAsDropTarget
,
696 InternetExplorer_put_RegisterAsDropTarget
,
697 InternetExplorer_get_TheaterMode
,
698 InternetExplorer_put_TheaterMode
,
699 InternetExplorer_get_AddressBar
,
700 InternetExplorer_put_AddressBar
,
701 InternetExplorer_get_Resizable
,
702 InternetExplorer_put_Resizable
705 static inline InternetExplorer
*impl_from_IExternalConnection(IExternalConnection
*iface
)
707 return CONTAINING_RECORD(iface
, InternetExplorer
, IExternalConnection_iface
);
711 * Document may keep references to InternetExplorer object causing circular references.
712 * We keep track of external references and release the document object when all
713 * external references are released. A visible main window is also considered as
714 * an external reference.
716 DWORD
release_extern_ref(InternetExplorer
*This
, BOOL last_closes
)
718 LONG ref
= InterlockedDecrement(&This
->extern_ref
);
720 TRACE("ref = %d\n", ref
);
726 WARN("Last external connection released with FALSE last_closes.\n");
730 deactivate_document(&This
->doc_host
);
734 static HRESULT WINAPI
ExternalConnection_QueryInterface(IExternalConnection
*iface
, REFIID riid
, void **ppv
)
736 InternetExplorer
*This
= impl_from_IExternalConnection(iface
);
737 return IWebBrowser2_QueryInterface(&This
->IWebBrowser2_iface
, riid
, ppv
);
740 static ULONG WINAPI
ExternalConnection_AddRef(IExternalConnection
*iface
)
742 InternetExplorer
*This
= impl_from_IExternalConnection(iface
);
743 return IWebBrowser2_AddRef(&This
->IWebBrowser2_iface
);
746 static ULONG WINAPI
ExternalConnection_Release(IExternalConnection
*iface
)
748 InternetExplorer
*This
= impl_from_IExternalConnection(iface
);
749 return IWebBrowser2_Release(&This
->IWebBrowser2_iface
);
752 static DWORD WINAPI
ExternalConnection_AddConnection(IExternalConnection
*iface
, DWORD extconn
, DWORD reserved
)
754 InternetExplorer
*This
= impl_from_IExternalConnection(iface
);
756 TRACE("(%p)->(%x %x)\n", This
, extconn
, reserved
);
758 if(extconn
!= EXTCONN_STRONG
)
761 return InterlockedIncrement(&This
->extern_ref
);
764 static DWORD WINAPI
ExternalConnection_ReleaseConnection(IExternalConnection
*iface
, DWORD extconn
,
765 DWORD reserved
, BOOL fLastReleaseCloses
)
767 InternetExplorer
*This
= impl_from_IExternalConnection(iface
);
769 TRACE("(%p)->(%x %x %x)\n", This
, extconn
, reserved
, fLastReleaseCloses
);
771 if(extconn
!= EXTCONN_STRONG
)
774 return release_extern_ref(This
, fLastReleaseCloses
);
777 static const IExternalConnectionVtbl ExternalConnectionVtbl
= {
778 ExternalConnection_QueryInterface
,
779 ExternalConnection_AddRef
,
780 ExternalConnection_Release
,
781 ExternalConnection_AddConnection
,
782 ExternalConnection_ReleaseConnection
785 static inline InternetExplorer
*impl_from_IServiceProvider(IServiceProvider
*iface
)
787 return CONTAINING_RECORD(iface
, InternetExplorer
, IServiceProvider_iface
);
790 static HRESULT WINAPI
IEServiceProvider_QueryInterface(IServiceProvider
*iface
,
791 REFIID riid
, LPVOID
*ppv
)
793 InternetExplorer
*This
= impl_from_IServiceProvider(iface
);
794 return IWebBrowser2_QueryInterface(&This
->IWebBrowser2_iface
, riid
, ppv
);
797 static ULONG WINAPI
IEServiceProvider_AddRef(IServiceProvider
*iface
)
799 InternetExplorer
*This
= impl_from_IServiceProvider(iface
);
800 return IWebBrowser2_AddRef(&This
->IWebBrowser2_iface
);
803 static ULONG WINAPI
IEServiceProvider_Release(IServiceProvider
*iface
)
805 InternetExplorer
*This
= impl_from_IServiceProvider(iface
);
806 return IWebBrowser2_Release(&This
->IWebBrowser2_iface
);
809 static HRESULT WINAPI
IEServiceProvider_QueryService(IServiceProvider
*iface
,
810 REFGUID guidService
, REFIID riid
, void **ppv
)
812 InternetExplorer
*This
= impl_from_IServiceProvider(iface
);
814 if(IsEqualGUID(&SID_SHTMLWindow
, riid
)) {
815 TRACE("(%p)->(SID_SHTMLWindow)\n", This
);
816 return IHTMLWindow2_QueryInterface(&This
->doc_host
.html_window
.IHTMLWindow2_iface
, riid
, ppv
);
819 FIXME("(%p)->(%s, %s %p)\n", This
, debugstr_guid(guidService
), debugstr_guid(riid
), ppv
);
821 return E_NOINTERFACE
;
824 static const IServiceProviderVtbl ServiceProviderVtbl
=
826 IEServiceProvider_QueryInterface
,
827 IEServiceProvider_AddRef
,
828 IEServiceProvider_Release
,
829 IEServiceProvider_QueryService
832 void InternetExplorer_WebBrowser_Init(InternetExplorer
*This
)
834 This
->IWebBrowser2_iface
.lpVtbl
= &InternetExplorerVtbl
;
835 This
->IExternalConnection_iface
.lpVtbl
= &ExternalConnectionVtbl
;
836 This
->IServiceProvider_iface
.lpVtbl
= &ServiceProviderVtbl
;