4 * Copyright 2003 Mike McCormack
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
36 #include "wine/debug.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
40 typedef struct _HTMLDocument_impl {
41 ICOM_VTABLE(IPersistMoniker) *IPersistMoniker_vtbl;
42 ICOM_VTABLE(IPersistFile) *IPersistFile_vtbl;
43 ICOM_VTABLE(IPersist) *IPersist_vtbl;
44 ICOM_VTABLE(IOleObject) *IOleObject_vtbl;
45 ICOM_VTABLE(IViewObject) *IViewObject_vtbl;
46 ICOM_VTABLE(IOleDocument) *IOleDocument_vtbl;
52 static ULONG WINAPI HTMLDocument_AddRef(HTMLDocument_impl *This)
54 return ++This->ref_count;
57 static ULONG WINAPI HTMLDocument_Release(HTMLDocument_impl *This)
61 count = --This->ref_count ;
63 HeapFree( GetProcessHeap(), 0, This );
68 static HRESULT WINAPI HTMLDocument_QueryInterface(
69 HTMLDocument_impl *This, REFIID riid, LPVOID *ppv)
71 TRACE("%p %s %p\n", This, debugstr_guid(riid), ppv);
73 if( IsEqualGUID( riid, &IID_IUnknown ) )
75 TRACE("returning IUnknown\n");
76 HTMLDocument_AddRef(This);
80 if( IsEqualGUID( riid, &IID_IPersistMoniker ) )
82 TRACE("returning IPersistMoniker\n");
83 HTMLDocument_AddRef(This);
87 if( IsEqualGUID( riid, &IID_IPersistFile ) )
89 TRACE("returning IPersistFile\n");
90 HTMLDocument_AddRef(This);
91 *ppv = &(This->IPersistFile_vtbl);
94 if( IsEqualGUID( riid, &IID_IOleObject ) )
96 TRACE("returning IOleObject\n");
97 HTMLDocument_AddRef(This);
98 *ppv = &(This->IOleObject_vtbl);
101 if( IsEqualGUID( riid, &IID_IPersist ) )
103 TRACE("returning IPersist\n");
104 HTMLDocument_AddRef(This);
105 *ppv = &(This->IPersist_vtbl);
108 if( IsEqualGUID( riid, &IID_IViewObject ) )
110 TRACE("returning IViewObject\n");
111 HTMLDocument_AddRef(This);
112 *ppv = &(This->IViewObject_vtbl);
115 if( IsEqualGUID( riid, &IID_IOleDocument ) )
117 TRACE("returning IOleDocument\n");
118 HTMLDocument_AddRef(This);
119 *ppv = &(This->IOleDocument_vtbl);
122 if( IsEqualGUID( riid, &IID_IDispatch ) )
124 TRACE("returning IDispatch\n");
126 if( IsEqualGUID( riid, &IID_IOleCommandTarget ) )
128 TRACE("returning IOleCommandTarget\n");
130 return E_NOINTERFACE;
133 static HRESULT WINAPI fnIPersistMoniker_QueryInterface(
134 IPersistMoniker *iface, REFIID riid, LPVOID *ppv)
136 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistMoniker_vtbl, iface);
137 return HTMLDocument_QueryInterface(This, riid, ppv);
140 static ULONG WINAPI fnIPersistMoniker_AddRef(IPersistMoniker *iface)
142 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistMoniker_vtbl, iface);
143 return HTMLDocument_AddRef(This);
146 static ULONG WINAPI fnIPersistMoniker_Release(IPersistMoniker *iface)
148 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistMoniker_vtbl, iface);
149 return HTMLDocument_Release(This);
152 static HRESULT WINAPI fnIPersistMoniker_GetClassID(IPersistMoniker *iface,
155 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistMoniker_vtbl, iface);
160 static HRESULT WINAPI fnIPersistMoniker_IsDirty(IPersistMoniker *iface )
162 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistMoniker_vtbl, iface);
167 static HRESULT WINAPI fnIPersistMoniker_Load(IPersistMoniker *iface,
168 BOOL fFullyAvailable, IMoniker *pimkName, LPBC pibc, DWORD grfMode )
170 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistMoniker_vtbl, iface);
173 unsigned char buffer[0x201];
176 TRACE("%p %d %p %p %08lx\n", This,
177 fFullyAvailable, pimkName, pibc, grfMode);
179 r = IMoniker_BindToStorage( pimkName, pibc, NULL,
180 &IID_IStream, (LPVOID*) &stm );
183 TRACE("IMoniker_BindToStorage failed %08lx\n", r);
189 r = IStream_Read( stm, buffer, sizeof buffer-1, &count);
195 TRACE("%s\n",buffer);
198 IStream_Release( stm );
203 static HRESULT WINAPI fnIPersistMoniker_Save(IPersistMoniker *iface,
204 IMoniker *pinkName, LPBC pibc, BOOL fRemember )
206 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistMoniker_vtbl, iface);
207 FIXME("%p %p %p %d\n", This, pinkName, pibc, fRemember);
211 static HRESULT WINAPI fnIPersistMoniker_SaveCompleted(IPersistMoniker *iface,
212 IMoniker *pinkName, LPBC pibc )
214 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistMoniker_vtbl, iface);
215 FIXME("%p %p %p\n", This, pinkName, pibc);
219 static HRESULT WINAPI fnIPersistMoniker_GetCurMoniker(IPersistMoniker *iface,
220 IMoniker **pinkName )
222 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistMoniker_vtbl, iface);
227 static ICOM_VTABLE(IPersistMoniker) IPersistMoniker_vtbl =
229 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
230 fnIPersistMoniker_QueryInterface,
231 fnIPersistMoniker_AddRef,
232 fnIPersistMoniker_Release,
233 fnIPersistMoniker_GetClassID,
234 fnIPersistMoniker_IsDirty,
235 fnIPersistMoniker_Load,
236 fnIPersistMoniker_Save,
237 fnIPersistMoniker_SaveCompleted,
238 fnIPersistMoniker_GetCurMoniker
241 static ULONG WINAPI fnIPersistFile_AddRef(IPersistFile *iface)
243 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistFile_vtbl, iface);
244 return HTMLDocument_AddRef(This);
247 static ULONG WINAPI fnIPersistFile_Release(IPersistFile *iface)
249 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistFile_vtbl, iface);
250 return HTMLDocument_Release(This);
253 static HRESULT WINAPI fnIPersistFile_QueryInterface(
254 IPersistFile *iface, REFIID riid, LPVOID *ppv)
256 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistFile_vtbl, iface);
257 return HTMLDocument_QueryInterface(This, riid, ppv);
260 static HRESULT WINAPI fnIPersistFile_GetClassID(IPersistFile *iface,
263 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistFile_vtbl, iface);
267 memcpy( pClassID, &CLSID_HTMLDocument, sizeof CLSID_HTMLDocument);
271 static HRESULT WINAPI fnIPersistFile_IsDirty(IPersistFile *iface )
273 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistFile_vtbl, iface);
278 static HRESULT WINAPI fnIPersistFile_Load(IPersistFile *iface,
279 LPCOLESTR pszFileName, DWORD grfMode )
281 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistFile_vtbl, iface);
282 FIXME("%p %s %08lx\n", This, debugstr_w(pszFileName), grfMode);
286 static HRESULT WINAPI fnIPersistFile_Save(IPersistFile *iface,
287 LPCOLESTR pszFileName, BOOL fRemember )
289 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistFile_vtbl, iface);
290 FIXME("%p %s %d\n", This, debugstr_w(pszFileName), fRemember);
294 static HRESULT WINAPI fnIPersistFile_SaveCompleted(IPersistFile *iface,
295 LPCOLESTR pszFileName )
297 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistFile_vtbl, iface);
298 FIXME("%p %s\n", This, debugstr_w(pszFileName));
302 static HRESULT WINAPI fnIPersistFile_GetCurFile(IPersistFile *iface,
303 LPOLESTR* ppszFileName)
305 ICOM_THIS_MULTI(HTMLDocument_impl, IPersistFile_vtbl, iface);
306 FIXME("%p %p\n",This,ppszFileName);
310 static ICOM_VTABLE(IPersistFile) IPersistFile_vtbl =
312 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
313 fnIPersistFile_QueryInterface,
314 fnIPersistFile_AddRef,
315 fnIPersistFile_Release,
316 fnIPersistFile_GetClassID,
317 fnIPersistFile_IsDirty,
320 fnIPersistFile_SaveCompleted,
321 fnIPersistFile_GetCurFile,
324 static ULONG WINAPI fnIOleObject_AddRef(IOleObject *iface)
326 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
327 return HTMLDocument_AddRef(This);
330 static ULONG WINAPI fnIOleObject_Release(IOleObject *iface)
332 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
333 return HTMLDocument_Release(This);
336 static HRESULT WINAPI fnIOleObject_QueryInterface(
337 IOleObject *iface, REFIID riid, LPVOID *ppv)
339 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
340 return HTMLDocument_QueryInterface(This, riid, ppv);
343 static HRESULT WINAPI fnIOleObject_SetClientSite(IOleObject *iface,
344 IOleClientSite *pClientSite)
346 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
348 TRACE("%p %p\n",This, pClientSite);
351 IOleClientSite_Release( This->site );
353 IOleClientSite_AddRef(pClientSite);
354 This->site = pClientSite;
359 static HRESULT WINAPI fnIOleObject_GetClientSite(IOleObject *iface,
360 IOleClientSite **ppClientSite)
362 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
367 IOleClientSite_AddRef( This->site );
368 *ppClientSite = This->site;
373 static HRESULT WINAPI fnIOleObject_SetHostNames(IOleObject *iface,
374 LPCOLESTR szContainerApp, LPCOLESTR szContainerObj)
376 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
381 static HRESULT WINAPI fnIOleObject_Close(IOleObject *iface,
384 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
389 static HRESULT WINAPI fnIOleObject_SetMoniker(IOleObject *iface,
390 DWORD dwWhichMoniker, IMoniker *pmk)
392 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
397 static HRESULT WINAPI fnIOleObject_GetMoniker(IOleObject *iface,
398 DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
400 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
405 static HRESULT WINAPI fnIOleObject_InitFromData(IOleObject *iface,
406 IDataObject *pDataObject, BOOL fCreation, DWORD dwReserved)
408 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
413 static HRESULT WINAPI fnIOleObject_GetClipboardData(IOleObject *iface,
414 DWORD dwReserved, IDataObject **ppDataObject)
416 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
421 static HRESULT WINAPI fnIOleObject_DoVerb(IOleObject *iface,
422 LONG iVerb, struct tagMSG *lpmsg, IOleClientSite *pActiveSite,
423 LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
425 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
427 TRACE("%p %ld %p %p %ld %p %p\n", This,
428 iVerb, lpmsg, pActiveSite, lindex, hwndParent, lprcPosRect);
433 TRACE("OLEIVERB_SHOW r = (%ld,%ld)-(%ld,%ld)\n",
434 lprcPosRect->left, lprcPosRect->top,
435 lprcPosRect->right, lprcPosRect->bottom );
439 /*return E_NOTIMPL; */
443 static HRESULT WINAPI fnIOleObject_EnumVerbs(IOleObject *iface,
444 IEnumOLEVERB **ppEnumOleVerb)
446 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
451 static HRESULT WINAPI fnIOleObject_Update(IOleObject *iface)
453 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
458 static HRESULT WINAPI fnIOleObject_IsUpToDate(IOleObject *iface)
460 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
465 static HRESULT WINAPI fnIOleObject_GetUserClassID(IOleObject *iface,
468 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
473 static HRESULT WINAPI fnIOleObject_GetUserType(IOleObject *iface,
474 DWORD dwFormOfType, LPOLESTR *pszUserType)
476 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
481 static HRESULT WINAPI fnIOleObject_SetExtent(IOleObject *iface,
482 DWORD dwDrawAspect, SIZEL *psizel)
484 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
489 static HRESULT WINAPI fnIOleObject_GetExtent(IOleObject *iface,
490 DWORD dwDrawAspect, SIZEL *psizel)
492 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
497 static HRESULT WINAPI fnIOleObject_Advise(IOleObject *iface,
498 IAdviseSink *pAdvSink, DWORD *pdwConnection)
500 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
505 static HRESULT WINAPI fnIOleObject_Unadvise(IOleObject *iface,
508 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
513 static HRESULT WINAPI fnIOleObject_EnumAdvise(IOleObject *iface,
514 IEnumSTATDATA **ppenumAdvise)
516 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
521 static HRESULT WINAPI fnIOleObject_GetMiscStatus(IOleObject *iface,
522 DWORD dwAspect, DWORD *pdwStatus)
524 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
529 static HRESULT WINAPI fnIOleObject_SetColorScheme(IOleObject *iface,
530 struct tagLOGPALETTE *pLogpal)
532 ICOM_THIS_MULTI(HTMLDocument_impl, IOleObject_vtbl, iface);
537 static ICOM_VTABLE(IOleObject) IOleObject_vtbl =
539 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
540 fnIOleObject_QueryInterface,
542 fnIOleObject_Release,
543 fnIOleObject_SetClientSite,
544 fnIOleObject_GetClientSite,
545 fnIOleObject_SetHostNames,
547 fnIOleObject_SetMoniker,
548 fnIOleObject_GetMoniker,
549 fnIOleObject_InitFromData,
550 fnIOleObject_GetClipboardData,
552 fnIOleObject_EnumVerbs,
554 fnIOleObject_IsUpToDate,
555 fnIOleObject_GetUserClassID,
556 fnIOleObject_GetUserType,
557 fnIOleObject_SetExtent,
558 fnIOleObject_GetExtent,
560 fnIOleObject_Unadvise,
561 fnIOleObject_EnumAdvise,
562 fnIOleObject_GetMiscStatus,
563 fnIOleObject_SetColorScheme,
566 static ULONG WINAPI fnIPersist_AddRef(IPersist *iface)
568 ICOM_THIS_MULTI(HTMLDocument_impl, IPersist_vtbl, iface);
569 return HTMLDocument_AddRef(This);
572 static ULONG WINAPI fnIPersist_Release(IPersist *iface)
574 ICOM_THIS_MULTI(HTMLDocument_impl, IPersist_vtbl, iface);
575 return HTMLDocument_Release(This);
578 static HRESULT WINAPI fnIPersist_QueryInterface(
579 IPersist *iface, REFIID riid, LPVOID *ppv)
581 ICOM_THIS_MULTI(HTMLDocument_impl, IPersist_vtbl, iface);
582 return HTMLDocument_QueryInterface(This, riid, ppv);
585 static HRESULT WINAPI fnIPersist_GetClassID(
586 IPersist *iface, CLSID * pClassID)
588 ICOM_THIS_MULTI(HTMLDocument_impl, IPersist_vtbl, iface);
589 TRACE("%p %p\n", This, pClassID );
590 memcpy( pClassID, &CLSID_HTMLDocument, sizeof CLSID_HTMLDocument);
594 static ICOM_VTABLE(IPersist) IPersist_vtbl =
596 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
597 fnIPersist_QueryInterface,
600 fnIPersist_GetClassID,
603 static ULONG WINAPI fnIViewObject_AddRef(IViewObject *iface)
605 ICOM_THIS_MULTI(HTMLDocument_impl, IViewObject_vtbl, iface);
606 return HTMLDocument_AddRef(This);
609 static ULONG WINAPI fnIViewObject_Release(IViewObject *iface)
611 ICOM_THIS_MULTI(HTMLDocument_impl, IViewObject_vtbl, iface);
612 return HTMLDocument_Release(This);
615 static HRESULT WINAPI fnIViewObject_QueryInterface(
616 IViewObject *iface, REFIID riid, LPVOID *ppv)
618 ICOM_THIS_MULTI(HTMLDocument_impl, IViewObject_vtbl, iface);
619 return HTMLDocument_QueryInterface(This, riid, ppv);
622 static HRESULT WINAPI fnIViewObject_Draw( IViewObject *iface,
623 DWORD dwDrawAspect, LONG lindex, void *pvAspect,
624 DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw,
625 LPCRECTL lprcBounds, LPCRECTL lprcWBounds,
626 BOOL (STDMETHODCALLTYPE *pfnContinue)(ULONG_PTR dwContinue),
629 ICOM_THIS_MULTI(HTMLDocument_impl, IViewObject_vtbl, iface);
634 static HRESULT WINAPI fnIViewObject_GetColorSet( IViewObject *iface,
635 DWORD dwDrawAspect, LONG lindex, void *pvAspect,
636 DVTARGETDEVICE *ptd, HDC hicTargetDevice,
637 struct tagLOGPALETTE **ppColorSet)
639 ICOM_THIS_MULTI(HTMLDocument_impl, IViewObject_vtbl, iface);
644 static HRESULT WINAPI fnIViewObject_Freeze( IViewObject *iface,
645 DWORD dwDrawAspect, LONG lindex, void *pvAspect, DWORD *pdwFreeze)
647 ICOM_THIS_MULTI(HTMLDocument_impl, IViewObject_vtbl, iface);
652 static HRESULT WINAPI fnIViewObject_Unfreeze( IViewObject *iface,
655 ICOM_THIS_MULTI(HTMLDocument_impl, IViewObject_vtbl, iface);
660 static HRESULT WINAPI fnIViewObject_SetAdvise( IViewObject *iface,
661 DWORD aspects, DWORD advf, IAdviseSink *pAdvSink)
663 ICOM_THIS_MULTI(HTMLDocument_impl, IViewObject_vtbl, iface);
668 static HRESULT WINAPI fnIViewObject_GetAdvise( IViewObject *iface,
669 DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink)
671 ICOM_THIS_MULTI(HTMLDocument_impl, IViewObject_vtbl, iface);
677 static ICOM_VTABLE(IViewObject) IViewObject_vtbl =
679 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
680 fnIViewObject_QueryInterface,
681 fnIViewObject_AddRef,
682 fnIViewObject_Release,
684 fnIViewObject_GetColorSet,
685 fnIViewObject_Freeze,
686 fnIViewObject_Unfreeze,
687 fnIViewObject_SetAdvise,
688 fnIViewObject_GetAdvise,
691 static ULONG WINAPI fnIOleDocument_AddRef(IOleDocument *iface)
693 ICOM_THIS_MULTI(HTMLDocument_impl, IOleDocument_vtbl, iface);
694 return HTMLDocument_AddRef(This);
697 static ULONG WINAPI fnIOleDocument_Release(IOleDocument *iface)
699 ICOM_THIS_MULTI(HTMLDocument_impl, IOleDocument_vtbl, iface);
700 return HTMLDocument_Release(This);
703 static HRESULT WINAPI fnIOleDocument_QueryInterface(
704 IOleDocument *iface, REFIID riid, LPVOID *ppv)
706 ICOM_THIS_MULTI(HTMLDocument_impl, IOleDocument_vtbl, iface);
707 return HTMLDocument_QueryInterface(This, riid, ppv);
710 static HRESULT WINAPI fnIOleDocument_CreateView(IOleDocument *iface,
711 IOleInPlaceSite *pIPSite, IStream *pstm, DWORD dwReserved,
712 IOleDocumentView **ppView)
714 ICOM_THIS_MULTI(HTMLDocument_impl, IOleDocument_vtbl, iface);
719 static HRESULT WINAPI fnIOleDocument_GetDocMiscStatus(IOleDocument *iface,
722 ICOM_THIS_MULTI(HTMLDocument_impl, IOleDocument_vtbl, iface);
727 static HRESULT WINAPI fnIOleDocument_EnumViews(IOleDocument *iface,
728 IEnumOleDocumentViews **ppEnum, IOleDocumentView **ppView)
730 ICOM_THIS_MULTI(HTMLDocument_impl, IOleDocument_vtbl, iface);
735 static ICOM_VTABLE(IOleDocument) IOleDocument_vtbl =
737 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
738 fnIOleDocument_QueryInterface,
739 fnIOleDocument_AddRef,
740 fnIOleDocument_Release,
741 fnIOleDocument_CreateView,
742 fnIOleDocument_GetDocMiscStatus,
743 fnIOleDocument_EnumViews,
746 HRESULT HTMLDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj)
748 HTMLDocument_impl *This;
750 TRACE("%p %p\n",pUnkOuter,ppObj);
752 This = HeapAlloc(GetProcessHeap(), 0, sizeof (HTMLDocument_impl));
753 This->IPersistMoniker_vtbl = &IPersistMoniker_vtbl;
754 This->IPersistFile_vtbl = &IPersistFile_vtbl;
755 This->IOleObject_vtbl = &IOleObject_vtbl;
756 This->IPersist_vtbl = &IPersist_vtbl;
757 This->IViewObject_vtbl = &IViewObject_vtbl;
758 This->IOleDocument_vtbl = &IOleDocument_vtbl;
762 *ppObj = (LPVOID) This;
764 TRACE("(%p) <- %p\n", ppObj, This);