ie.c 24.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * Copyright 2006 Jacek Caban for CodeWeavers
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * 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 20
#include "ieframe.h"

21 22
#include "wine/debug.h"

23
WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
24

25 26
static inline InternetExplorer *impl_from_IWebBrowser2(IWebBrowser2 *iface)
{
27
    return CONTAINING_RECORD(iface, InternetExplorer, IWebBrowser2_iface);
28
}
29 30 31

static HRESULT WINAPI InternetExplorer_QueryInterface(IWebBrowser2 *iface, REFIID riid, LPVOID *ppv)
{
32
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
33 34 35 36 37

    *ppv = NULL;

    if(IsEqualGUID(&IID_IUnknown, riid)) {
        TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
38
        *ppv = &This->IWebBrowser2_iface;
39 40
    }else if(IsEqualGUID(&IID_IDispatch, riid)) {
        TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
41
        *ppv = &This->IWebBrowser2_iface;
42 43
    }else if(IsEqualGUID(&IID_IWebBrowser, riid)) {
        TRACE("(%p)->(IID_IWebBrowser %p)\n", This, ppv);
44
        *ppv = &This->IWebBrowser2_iface;
45 46
    }else if(IsEqualGUID(&IID_IWebBrowserApp, riid)) {
        TRACE("(%p)->(IID_IWebBrowserApp %p)\n", This, ppv);
47
        *ppv = &This->IWebBrowser2_iface;
48 49
    }else if(IsEqualGUID(&IID_IWebBrowser2, riid)) {
        TRACE("(%p)->(IID_IWebBrowser2 %p)\n", This, ppv);
50
        *ppv = &This->IWebBrowser2_iface;
51 52
    }else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) {
        TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppv);
53
        *ppv = &This->doc_host->doc_host.cps.IConnectionPointContainer_iface;
54 55 56
    }else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
        TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv);
        *ppv = &This->IServiceProvider_iface;
57 58
    }else if(HlinkFrame_QI(&This->hlink_frame, riid, ppv)) {
        return S_OK;
59 60 61 62 63 64 65 66 67 68 69 70 71
    }

    if(*ppv) {
        IUnknown_AddRef((IUnknown*)*ppv);
        return S_OK;
    }

    WARN("(%p)->(%s %p) interface not supported\n", This, debugstr_guid(riid), ppv);
    return E_NOINTERFACE;
}

static ULONG WINAPI InternetExplorer_AddRef(IWebBrowser2 *iface)
{
72
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
73
    LONG ref = InterlockedIncrement(&This->ref);
74
    TRACE("(%p) ref=%d\n", This, ref);
75 76 77 78 79
    return ref;
}

static ULONG WINAPI InternetExplorer_Release(IWebBrowser2 *iface)
{
80
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
81 82
    LONG ref = InterlockedDecrement(&This->ref);

83
    TRACE("(%p) ref=%d\n", This, ref);
84 85

    if(!ref) {
86
        if(This->doc_host) {
87
            deactivate_document(&This->doc_host->doc_host);
88
            DocHost_Release(&This->doc_host->doc_host);
89
            if(This->doc_host) {
90
                This->doc_host->ie = NULL;
91 92
                This->doc_host->doc_host.container_vtbl->release(&This->doc_host->doc_host);
            }
93 94 95 96
        }

        if(This->frame_hwnd)
            DestroyWindow(This->frame_hwnd);
97
        list_remove(&This->entry);
98
        heap_free(This);
99 100

        released_obj();
101 102 103 104 105 106 107
    }

    return ref;
}

static HRESULT WINAPI InternetExplorer_GetTypeInfoCount(IWebBrowser2 *iface, UINT *pctinfo)
{
108
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
109 110 111 112 113 114 115
    FIXME("(%p)->(%p)\n", This, pctinfo);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_GetTypeInfo(IWebBrowser2 *iface, UINT iTInfo, LCID lcid,
                                     LPTYPEINFO *ppTInfo)
{
116
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
117
    FIXME("(%p)->(%d %d %p)\n", This, iTInfo, lcid, ppTInfo);
118 119 120 121 122 123 124
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_GetIDsOfNames(IWebBrowser2 *iface, REFIID riid,
                                       LPOLESTR *rgszNames, UINT cNames,
                                       LCID lcid, DISPID *rgDispId)
{
125
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
126
    FIXME("(%p)->(%s %p %d %d %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
127 128 129 130 131 132 133 134 135
            lcid, rgDispId);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_Invoke(IWebBrowser2 *iface, DISPID dispIdMember,
                                REFIID riid, LCID lcid, WORD wFlags,
                                DISPPARAMS *pDispParams, VARIANT *pVarResult,
                                EXCEPINFO *pExepInfo, UINT *puArgErr)
{
136
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
137
    FIXME("(%p)->(%d %s %d %08x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
138 139 140 141 142 143
            lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_GoBack(IWebBrowser2 *iface)
{
144
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
145 146
    TRACE("(%p)\n", This);
    return go_back(&This->doc_host->doc_host);
147 148 149 150
}

static HRESULT WINAPI InternetExplorer_GoForward(IWebBrowser2 *iface)
{
151
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
152 153 154 155 156 157
    FIXME("(%p)\n", This);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_GoHome(IWebBrowser2 *iface)
{
158
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
159
    TRACE("(%p)\n", This);
160
    return go_home(&This->doc_host->doc_host);
161 162 163 164
}

static HRESULT WINAPI InternetExplorer_GoSearch(IWebBrowser2 *iface)
{
165
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
166 167 168 169 170 171 172 173
    FIXME("(%p)\n", This);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_Navigate(IWebBrowser2 *iface, BSTR szUrl,
                                  VARIANT *Flags, VARIANT *TargetFrameName,
                                  VARIANT *PostData, VARIANT *Headers)
{
174
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
175 176

    TRACE("(%p)->(%s %p %p %p %p)\n", This, debugstr_w(szUrl), Flags, TargetFrameName,
177
          PostData, Headers);
178

179
    return navigate_url(&This->doc_host->doc_host, szUrl, Flags, TargetFrameName, PostData, Headers);
180 181 182 183
}

static HRESULT WINAPI InternetExplorer_Refresh(IWebBrowser2 *iface)
{
184
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
185 186 187 188 189 190
    FIXME("(%p)\n", This);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_Refresh2(IWebBrowser2 *iface, VARIANT *Level)
{
191
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
192 193 194 195 196 197
    FIXME("(%p)->(%p)\n", This, Level);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_Stop(IWebBrowser2 *iface)
{
198
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
199 200 201 202 203 204
    FIXME("(%p)\n", This);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_Application(IWebBrowser2 *iface, IDispatch **ppDisp)
{
205
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
206 207 208 209 210 211
    FIXME("(%p)->(%p)\n", This, ppDisp);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_Parent(IWebBrowser2 *iface, IDispatch **ppDisp)
{
212
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
213 214 215 216 217 218
    FIXME("(%p)->(%p)\n", This, ppDisp);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_Container(IWebBrowser2 *iface, IDispatch **ppDisp)
{
219
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
220 221 222 223 224 225
    FIXME("(%p)->(%p)\n", This, ppDisp);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_Document(IWebBrowser2 *iface, IDispatch **ppDisp)
{
226
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
227 228 229 230 231 232
    FIXME("(%p)->(%p)\n", This, ppDisp);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_TopLevelContainer(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
{
233
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
234 235 236 237 238 239
    FIXME("(%p)->(%p)\n", This, pBool);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_Type(IWebBrowser2 *iface, BSTR *Type)
{
240
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
241 242 243 244
    FIXME("(%p)->(%p)\n", This, Type);
    return E_NOTIMPL;
}

245
static HRESULT WINAPI InternetExplorer_get_Left(IWebBrowser2 *iface, LONG *pl)
246
{
247
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
248 249 250 251
    FIXME("(%p)->(%p)\n", This, pl);
    return E_NOTIMPL;
}

252
static HRESULT WINAPI InternetExplorer_put_Left(IWebBrowser2 *iface, LONG Left)
253
{
254
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
255
    FIXME("(%p)->(%d)\n", This, Left);
256 257 258
    return E_NOTIMPL;
}

259
static HRESULT WINAPI InternetExplorer_get_Top(IWebBrowser2 *iface, LONG *pl)
260
{
261
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
262 263 264 265
    FIXME("(%p)->(%p)\n", This, pl);
    return E_NOTIMPL;
}

266
static HRESULT WINAPI InternetExplorer_put_Top(IWebBrowser2 *iface, LONG Top)
267
{
268
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
269
    FIXME("(%p)->(%d)\n", This, Top);
270 271 272
    return E_NOTIMPL;
}

273
static HRESULT WINAPI InternetExplorer_get_Width(IWebBrowser2 *iface, LONG *pl)
274
{
275
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
276 277 278 279
    FIXME("(%p)->(%p)\n", This, pl);
    return E_NOTIMPL;
}

280
static HRESULT WINAPI InternetExplorer_put_Width(IWebBrowser2 *iface, LONG Width)
281
{
282
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
283
    FIXME("(%p)->(%d)\n", This, Width);
284 285 286
    return E_NOTIMPL;
}

287
static HRESULT WINAPI InternetExplorer_get_Height(IWebBrowser2 *iface, LONG *pl)
288
{
289
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
290 291 292 293
    FIXME("(%p)->(%p)\n", This, pl);
    return E_NOTIMPL;
}

294
static HRESULT WINAPI InternetExplorer_put_Height(IWebBrowser2 *iface, LONG Height)
295
{
296
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
297
    FIXME("(%p)->(%d)\n", This, Height);
298 299 300 301 302
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_LocationName(IWebBrowser2 *iface, BSTR *LocationName)
{
303
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
304 305 306 307 308 309
    FIXME("(%p)->(%p)\n", This, LocationName);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_LocationURL(IWebBrowser2 *iface, BSTR *LocationURL)
{
310
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
311 312 313

    TRACE("(%p)->(%p)\n", This, LocationURL);

314
    return get_location_url(&This->doc_host->doc_host, LocationURL);
315 316 317 318
}

static HRESULT WINAPI InternetExplorer_get_Busy(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
{
319
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
320 321 322 323 324 325
    FIXME("(%p)->(%p)\n", This, pBool);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_Quit(IWebBrowser2 *iface)
{
326
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
327 328 329 330 331 332
    FIXME("(%p)\n", This);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_ClientToWindow(IWebBrowser2 *iface, int *pcx, int *pcy)
{
333
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
334 335 336 337 338 339
    FIXME("(%p)->(%p %p)\n", This, pcx, pcy);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_PutProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT vtValue)
{
340
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
341 342 343 344 345 346
    FIXME("(%p)->(%s)\n", This, debugstr_w(szProperty));
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_GetProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT *pvtValue)
{
347
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
348 349 350 351 352 353
    FIXME("(%p)->(%s %p)\n", This, debugstr_w(szProperty), pvtValue);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_Name(IWebBrowser2 *iface, BSTR *Name)
{
354
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
355 356 357 358
    FIXME("(%p)->(%p)\n", This, Name);
    return E_NOTIMPL;
}

359
static HRESULT WINAPI InternetExplorer_get_HWND(IWebBrowser2 *iface, LONG *pHWND)
360
{
361
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
362 363 364 365 366 367
    FIXME("(%p)->(%p)\n", This, pHWND);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_FullName(IWebBrowser2 *iface, BSTR *FullName)
{
368
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
369 370 371 372 373 374
    FIXME("(%p)->(%p)\n", This, FullName);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_Path(IWebBrowser2 *iface, BSTR *Path)
{
375
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
376 377 378 379 380 381
    FIXME("(%p)->(%p)\n", This, Path);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_Visible(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
{
382
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
383 384 385 386 387

    TRACE("(%p)->(%p)\n", This, pBool);

    *pBool = IsWindowVisible(This->frame_hwnd) ? VARIANT_TRUE : VARIANT_FALSE;
    return S_OK;
388 389 390 391
}

static HRESULT WINAPI InternetExplorer_put_Visible(IWebBrowser2 *iface, VARIANT_BOOL Value)
{
392
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
393 394 395 396 397
    TRACE("(%p)->(%x)\n", This, Value);

    ShowWindow(This->frame_hwnd, Value ? SW_SHOW : SW_HIDE);

    return S_OK;
398 399 400 401
}

static HRESULT WINAPI InternetExplorer_get_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
{
402
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
403 404 405 406 407 408
    FIXME("(%p)->(%p)\n", This, pBool);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_put_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
{
409
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
410 411 412 413 414 415
    FIXME("(%p)->(%x)\n", This, Value);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_StatusText(IWebBrowser2 *iface, BSTR *StatusText)
{
416
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
417 418 419 420 421 422
    FIXME("(%p)->(%p)\n", This, StatusText);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_put_StatusText(IWebBrowser2 *iface, BSTR StatusText)
{
423
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
424 425 426 427

    TRACE("(%p)->(%s)\n", This, debugstr_w(StatusText));

    return update_ie_statustext(This, StatusText);
428 429 430 431
}

static HRESULT WINAPI InternetExplorer_get_ToolBar(IWebBrowser2 *iface, int *Value)
{
432
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
433 434 435 436 437 438
    FIXME("(%p)->(%p)\n", This, Value);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_put_ToolBar(IWebBrowser2 *iface, int Value)
{
439
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
440 441 442 443 444 445
    FIXME("(%p)->(%d)\n", This, Value);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL *Value)
{
446
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
447 448 449 450 451 452
    FIXME("(%p)->(%p)\n", This, Value);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_put_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
{
453
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
454 455 456 457 458
    HMENU menu = NULL;

    TRACE("(%p)->(%x)\n", This, Value);

    if(Value)
459
        menu = This->menu;
460 461 462 463 464

    if(!SetMenu(This->frame_hwnd, menu))
        return HRESULT_FROM_WIN32(GetLastError());

    return S_OK;
465 466 467 468
}

static HRESULT WINAPI InternetExplorer_get_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL *pbFullScreen)
{
469
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
470 471 472 473 474 475
    FIXME("(%p)->(%p)\n", This, pbFullScreen);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_put_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL bFullScreen)
{
476
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
477 478 479 480 481 482 483
    FIXME("(%p)->(%x)\n", This, bFullScreen);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_Navigate2(IWebBrowser2 *iface, VARIANT *URL, VARIANT *Flags,
        VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers)
{
484
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
485 486 487 488 489 490

    TRACE("(%p)->(%p %p %p %p %p)\n", This, URL, Flags, TargetFrameName, PostData, Headers);

    if(!URL)
        return S_OK;

491 492
    if(V_VT(URL) != VT_BSTR) {
        FIXME("Unsupported V_VT(URL) %d\n", V_VT(URL));
493 494 495
        return E_INVALIDARG;
    }

496
    return navigate_url(&This->doc_host->doc_host, V_BSTR(URL), Flags, TargetFrameName, PostData, Headers);
497 498 499 500
}

static HRESULT WINAPI InternetExplorer_QueryStatusWB(IWebBrowser2 *iface, OLECMDID cmdID, OLECMDF *pcmdf)
{
501
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
502 503 504 505 506 507 508
    FIXME("(%p)->(%d %p)\n", This, cmdID, pcmdf);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_ExecWB(IWebBrowser2 *iface, OLECMDID cmdID,
        OLECMDEXECOPT cmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
{
509
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
510 511 512 513 514 515 516
    FIXME("(%p)->(%d %d %p %p)\n", This, cmdID, cmdexecopt, pvaIn, pvaOut);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_ShowBrowserBar(IWebBrowser2 *iface, VARIANT *pvaClsid,
        VARIANT *pvarShow, VARIANT *pvarSize)
{
517
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
518 519 520 521 522 523
    FIXME("(%p)->(%p %p %p)\n", This, pvaClsid, pvarShow, pvarSize);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_ReadyState(IWebBrowser2 *iface, READYSTATE *lpReadyState)
{
524
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
525 526 527 528 529 530
    FIXME("(%p)->(%p)\n", This, lpReadyState);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_Offline(IWebBrowser2 *iface, VARIANT_BOOL *pbOffline)
{
531
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
532 533 534 535 536 537
    FIXME("(%p)->(%p)\n", This, pbOffline);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_put_Offline(IWebBrowser2 *iface, VARIANT_BOOL bOffline)
{
538
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
539 540 541 542 543 544
    FIXME("(%p)->(%x)\n", This, bOffline);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_Silent(IWebBrowser2 *iface, VARIANT_BOOL *pbSilent)
{
545
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
546 547 548 549 550 551
    FIXME("(%p)->(%p)\n", This, pbSilent);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_put_Silent(IWebBrowser2 *iface, VARIANT_BOOL bSilent)
{
552
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
553 554 555 556 557 558 559
    FIXME("(%p)->(%x)\n", This, bSilent);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_RegisterAsBrowser(IWebBrowser2 *iface,
        VARIANT_BOOL *pbRegister)
{
560
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
561 562 563 564 565 566 567
    FIXME("(%p)->(%p)\n", This, pbRegister);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_put_RegisterAsBrowser(IWebBrowser2 *iface,
        VARIANT_BOOL bRegister)
{
568
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
569 570 571 572 573 574 575
    FIXME("(%p)->(%x)\n", This, bRegister);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_RegisterAsDropTarget(IWebBrowser2 *iface,
        VARIANT_BOOL *pbRegister)
{
576
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
577 578 579 580 581 582 583
    FIXME("(%p)->(%p)\n", This, pbRegister);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_put_RegisterAsDropTarget(IWebBrowser2 *iface,
        VARIANT_BOOL bRegister)
{
584
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
585 586 587 588 589 590
    FIXME("(%p)->(%x)\n", This, bRegister);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL *pbRegister)
{
591
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
592 593 594 595 596 597
    FIXME("(%p)->(%p)\n", This, pbRegister);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_put_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL bRegister)
{
598
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
599 600 601 602 603 604
    FIXME("(%p)->(%x)\n", This, bRegister);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_AddressBar(IWebBrowser2 *iface, VARIANT_BOOL *Value)
{
605
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
606 607 608 609 610 611
    FIXME("(%p)->(%p)\n", This, Value);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_put_AddressBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
{
612
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
613 614 615 616 617 618
    FIXME("(%p)->(%x)\n", This, Value);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_get_Resizable(IWebBrowser2 *iface, VARIANT_BOOL *Value)
{
619
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
620 621 622 623 624 625
    FIXME("(%p)->(%p)\n", This, Value);
    return E_NOTIMPL;
}

static HRESULT WINAPI InternetExplorer_put_Resizable(IWebBrowser2 *iface, VARIANT_BOOL Value)
{
626
    InternetExplorer *This = impl_from_IWebBrowser2(iface);
627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705
    FIXME("(%p)->(%x)\n", This, Value);
    return E_NOTIMPL;
}

static const IWebBrowser2Vtbl InternetExplorerVtbl =
{
    InternetExplorer_QueryInterface,
    InternetExplorer_AddRef,
    InternetExplorer_Release,
    InternetExplorer_GetTypeInfoCount,
    InternetExplorer_GetTypeInfo,
    InternetExplorer_GetIDsOfNames,
    InternetExplorer_Invoke,
    InternetExplorer_GoBack,
    InternetExplorer_GoForward,
    InternetExplorer_GoHome,
    InternetExplorer_GoSearch,
    InternetExplorer_Navigate,
    InternetExplorer_Refresh,
    InternetExplorer_Refresh2,
    InternetExplorer_Stop,
    InternetExplorer_get_Application,
    InternetExplorer_get_Parent,
    InternetExplorer_get_Container,
    InternetExplorer_get_Document,
    InternetExplorer_get_TopLevelContainer,
    InternetExplorer_get_Type,
    InternetExplorer_get_Left,
    InternetExplorer_put_Left,
    InternetExplorer_get_Top,
    InternetExplorer_put_Top,
    InternetExplorer_get_Width,
    InternetExplorer_put_Width,
    InternetExplorer_get_Height,
    InternetExplorer_put_Height,
    InternetExplorer_get_LocationName,
    InternetExplorer_get_LocationURL,
    InternetExplorer_get_Busy,
    InternetExplorer_Quit,
    InternetExplorer_ClientToWindow,
    InternetExplorer_PutProperty,
    InternetExplorer_GetProperty,
    InternetExplorer_get_Name,
    InternetExplorer_get_HWND,
    InternetExplorer_get_FullName,
    InternetExplorer_get_Path,
    InternetExplorer_get_Visible,
    InternetExplorer_put_Visible,
    InternetExplorer_get_StatusBar,
    InternetExplorer_put_StatusBar,
    InternetExplorer_get_StatusText,
    InternetExplorer_put_StatusText,
    InternetExplorer_get_ToolBar,
    InternetExplorer_put_ToolBar,
    InternetExplorer_get_MenuBar,
    InternetExplorer_put_MenuBar,
    InternetExplorer_get_FullScreen,
    InternetExplorer_put_FullScreen,
    InternetExplorer_Navigate2,
    InternetExplorer_QueryStatusWB,
    InternetExplorer_ExecWB,
    InternetExplorer_ShowBrowserBar,
    InternetExplorer_get_ReadyState,
    InternetExplorer_get_Offline,
    InternetExplorer_put_Offline,
    InternetExplorer_get_Silent,
    InternetExplorer_put_Silent,
    InternetExplorer_get_RegisterAsBrowser,
    InternetExplorer_put_RegisterAsBrowser,
    InternetExplorer_get_RegisterAsDropTarget,
    InternetExplorer_put_RegisterAsDropTarget,
    InternetExplorer_get_TheaterMode,
    InternetExplorer_put_TheaterMode,
    InternetExplorer_get_AddressBar,
    InternetExplorer_put_AddressBar,
    InternetExplorer_get_Resizable,
    InternetExplorer_put_Resizable
};

706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733
static inline InternetExplorer *impl_from_IServiceProvider(IServiceProvider *iface)
{
    return CONTAINING_RECORD(iface, InternetExplorer, IServiceProvider_iface);
}

static HRESULT WINAPI IEServiceProvider_QueryInterface(IServiceProvider *iface,
            REFIID riid, LPVOID *ppv)
{
    InternetExplorer *This = impl_from_IServiceProvider(iface);
    return IWebBrowser_QueryInterface(&This->IWebBrowser2_iface, riid, ppv);
}

static ULONG WINAPI IEServiceProvider_AddRef(IServiceProvider *iface)
{
    InternetExplorer *This = impl_from_IServiceProvider(iface);
    return IWebBrowser_AddRef(&This->IWebBrowser2_iface);
}

static ULONG WINAPI IEServiceProvider_Release(IServiceProvider *iface)
{
    InternetExplorer *This = impl_from_IServiceProvider(iface);
    return IWebBrowser_Release(&This->IWebBrowser2_iface);
}

static HRESULT WINAPI IEServiceProvider_QueryService(IServiceProvider *iface,
        REFGUID guidService, REFIID riid, void **ppv)
{
    InternetExplorer *This = impl_from_IServiceProvider(iface);
734 735 736 737 738 739

    if(IsEqualGUID(&SID_SHTMLWindow, riid)) {
        TRACE("(%p)->(SID_SHTMLWindow)\n", This);
        return IHTMLWindow2_QueryInterface(&This->doc_host->doc_host.html_window.IHTMLWindow2_iface, riid, ppv);
    }

740 741 742 743 744 745 746 747 748 749 750 751 752
    FIXME("(%p)->(%s, %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
    *ppv = NULL;
    return E_NOINTERFACE;
}

static const IServiceProviderVtbl ServiceProviderVtbl =
{
    IEServiceProvider_QueryInterface,
    IEServiceProvider_AddRef,
    IEServiceProvider_Release,
    IEServiceProvider_QueryService
};

753 754
void InternetExplorer_WebBrowser_Init(InternetExplorer *This)
{
755
    This->IWebBrowser2_iface.lpVtbl = &InternetExplorerVtbl;
756
    This->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl;
757
}