2 * Copyright 2012 Piotr 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
31 #include "wine/debug.h"
33 #include "msxml_dispex.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(msxml
);
39 IPersistMoniker IPersistMoniker_iface
;
40 IPersistHistory IPersistHistory_iface
;
41 IOleCommandTarget IOleCommandTarget_iface
;
42 IOleObject IOleObject_iface
;
52 IMoniker IMoniker_iface
;
61 IBindStatusCallback IBindStatusCallback_iface
;
63 IBindStatusCallback
*bsc
;
71 IBinding IBinding_iface
;
76 static inline Binding
* impl_from_IBinding(IBinding
*iface
)
78 return CONTAINING_RECORD(iface
, Binding
, IBinding_iface
);
81 static HRESULT WINAPI
XMLView_Binding_QueryInterface(
82 IBinding
*iface
, REFIID riid
, void **ppvObject
)
84 Binding
*This
= impl_from_IBinding(iface
);
86 TRACE("(%p)->(%s %p)\n", This
, debugstr_guid(riid
), ppvObject
);
88 if(IsEqualGUID(riid
, &IID_IUnknown
) || IsEqualGUID(riid
, &IID_IBinding
)) {
90 IBinding_AddRef(iface
);
98 static ULONG WINAPI
XMLView_Binding_AddRef(IBinding
*iface
)
100 Binding
*This
= impl_from_IBinding(iface
);
101 ULONG ref
= InterlockedIncrement(&This
->ref
);
103 TRACE("%p, refcount %lu.\n", iface
, ref
);
108 static ULONG WINAPI
XMLView_Binding_Release(IBinding
*iface
)
110 Binding
*This
= impl_from_IBinding(iface
);
111 ULONG ref
= InterlockedDecrement(&This
->ref
);
113 TRACE("%p, refcount %lu.\n", iface
, ref
);
116 IBinding_Release(This
->binding
);
122 static HRESULT WINAPI
XMLView_Binding_Abort(IBinding
*iface
)
124 Binding
*This
= impl_from_IBinding(iface
);
125 TRACE("(%p)\n", This
);
127 return IBinding_Abort(This
->binding
);
130 static HRESULT WINAPI
XMLView_Binding_Suspend(IBinding
*iface
)
132 Binding
*This
= impl_from_IBinding(iface
);
133 FIXME("(%p)\n", This
);
137 static HRESULT WINAPI
XMLView_Binding_Resume(IBinding
*iface
)
139 Binding
*This
= impl_from_IBinding(iface
);
140 FIXME("(%p)\n", This
);
144 static HRESULT WINAPI
XMLView_Binding_SetPriority(
145 IBinding
*iface
, LONG nPriority
)
147 Binding
*This
= impl_from_IBinding(iface
);
148 TRACE("%p, %ld.\n", iface
, nPriority
);
150 return IBinding_SetPriority(This
->binding
, nPriority
);
153 static HRESULT WINAPI
XMLView_Binding_GetPriority(
154 IBinding
*iface
, LONG
*pnPriority
)
156 Binding
*This
= impl_from_IBinding(iface
);
157 TRACE("(%p)->(%p)\n", This
, pnPriority
);
159 return IBinding_GetPriority(This
->binding
, pnPriority
);
162 static HRESULT WINAPI
XMLView_Binding_GetBindResult(IBinding
*iface
,
163 CLSID
*pclsidProtocol
, DWORD
*pdwResult
, LPOLESTR
*pszResult
,
166 Binding
*This
= impl_from_IBinding(iface
);
167 FIXME("(%p)->(%s %p %p %p)\n", This
, debugstr_guid(pclsidProtocol
),
168 pdwResult
, pszResult
, pdwReserved
);
172 static IBindingVtbl XMLView_BindingVtbl
= {
173 XMLView_Binding_QueryInterface
,
174 XMLView_Binding_AddRef
,
175 XMLView_Binding_Release
,
176 XMLView_Binding_Abort
,
177 XMLView_Binding_Suspend
,
178 XMLView_Binding_Resume
,
179 XMLView_Binding_SetPriority
,
180 XMLView_Binding_GetPriority
,
181 XMLView_Binding_GetBindResult
184 static inline HRESULT
XMLView_Binding_Create(IBinding
*binding
, IBinding
**ret
)
188 bind
= calloc(1, sizeof(Binding
));
190 return E_OUTOFMEMORY
;
192 bind
->IBinding_iface
.lpVtbl
= &XMLView_BindingVtbl
;
195 bind
->binding
= binding
;
196 IBinding_AddRef(binding
);
198 *ret
= &bind
->IBinding_iface
;
202 static inline BindStatusCallback
* impl_from_IBindStatusCallback(
203 IBindStatusCallback
*iface
)
205 return CONTAINING_RECORD(iface
, BindStatusCallback
,
206 IBindStatusCallback_iface
);
209 static HRESULT WINAPI
XMLView_BindStatusCallback_QueryInterface(
210 IBindStatusCallback
*iface
, REFIID riid
, void **ppvObject
)
212 BindStatusCallback
*This
= impl_from_IBindStatusCallback(iface
);
214 TRACE("(%p)->(%s %p)\n", This
, debugstr_guid(riid
), ppvObject
);
216 if(IsEqualGUID(riid
, &IID_IUnknown
) || IsEqualGUID(riid
, &IID_IBindStatusCallback
)) {
218 IBindStatusCallback_AddRef(iface
);
223 return E_NOINTERFACE
;
226 static ULONG WINAPI
XMLView_BindStatusCallback_AddRef(
227 IBindStatusCallback
*iface
)
229 BindStatusCallback
*This
= impl_from_IBindStatusCallback(iface
);
230 ULONG ref
= InterlockedIncrement(&This
->ref
);
232 TRACE("%p, refcount %lu.\n", iface
, ref
);
237 static ULONG WINAPI
XMLView_BindStatusCallback_Release(
238 IBindStatusCallback
*iface
)
240 BindStatusCallback
*This
= impl_from_IBindStatusCallback(iface
);
241 ULONG ref
= InterlockedDecrement(&This
->ref
);
243 TRACE("%p, refcount %lu.\n", iface
, ref
);
247 IStream_Release(This
->stream
);
248 IBindStatusCallback_Release(This
->bsc
);
249 IMoniker_Release(This
->mon
);
255 static HRESULT WINAPI
XMLView_BindStatusCallback_OnStartBinding(
256 IBindStatusCallback
*iface
, DWORD dwReserved
, IBinding
*pib
)
258 BindStatusCallback
*This
= impl_from_IBindStatusCallback(iface
);
262 TRACE("%p, %lx, %p.\n", iface
, dwReserved
, pib
);
264 hres
= XMLView_Binding_Create(pib
, &binding
);
270 hres
= IBindStatusCallback_OnStartBinding(This
->bsc
, dwReserved
, binding
);
272 IBinding_Abort(binding
);
276 IBinding_Release(binding
);
280 static HRESULT WINAPI
XMLView_BindStatusCallback_GetPriority(
281 IBindStatusCallback
*iface
, LONG
*pnPriority
)
283 BindStatusCallback
*This
= impl_from_IBindStatusCallback(iface
);
284 FIXME("(%p)->(%p)\n", This
, pnPriority
);
288 static HRESULT WINAPI
XMLView_BindStatusCallback_OnLowResource(
289 IBindStatusCallback
*iface
, DWORD reserved
)
291 FIXME("%p, %lx.\n", iface
, reserved
);
295 static HRESULT WINAPI
XMLView_BindStatusCallback_OnProgress(
296 IBindStatusCallback
*iface
, ULONG ulProgress
, ULONG ulProgressMax
,
297 ULONG ulStatusCode
, LPCWSTR szStatusText
)
299 BindStatusCallback
*This
= impl_from_IBindStatusCallback(iface
);
300 TRACE("%p, %lu, %lu, %lu, %s.\n", iface
, ulProgress
, ulProgressMax
,
301 ulStatusCode
, debugstr_w(szStatusText
));
303 switch(ulStatusCode
) {
304 case BINDSTATUS_BEGINDOWNLOADDATA
:
305 return IBindStatusCallback_OnProgress(This
->bsc
, ulProgress
,
306 ulProgressMax
, ulStatusCode
, szStatusText
);
307 case BINDSTATUS_MIMETYPEAVAILABLE
:
310 FIXME("ulStatusCode: %lu\n", ulStatusCode
);
315 static HRESULT WINAPI
XMLView_BindStatusCallback_OnStopBinding(
316 IBindStatusCallback
*iface
, HRESULT hresult
, LPCWSTR szError
)
318 BindStatusCallback
*This
= impl_from_IBindStatusCallback(iface
);
319 TRACE("%p, %#lx, %s.\n", iface
, hresult
, debugstr_w(szError
));
320 return IBindStatusCallback_OnStopBinding(This
->bsc
, hresult
, szError
);
323 static HRESULT WINAPI
XMLView_BindStatusCallback_GetBindInfo(
324 IBindStatusCallback
*iface
, DWORD
*grfBINDF
, BINDINFO
*pbindinfo
)
326 BindStatusCallback
*This
= impl_from_IBindStatusCallback(iface
);
327 TRACE("(%p)->(%p %p)\n", This
, grfBINDF
, pbindinfo
);
328 return IBindStatusCallback_GetBindInfo(This
->bsc
, grfBINDF
, pbindinfo
);
331 static inline HRESULT
report_data(BindStatusCallback
*This
)
333 FORMATETC formatetc
= {0, NULL
, 1, -1, TYMED_ISTREAM
};
340 hres
= IStream_Seek(This
->stream
, off
, STREAM_SEEK_CUR
, &size
);
344 hres
= IStream_Seek(This
->stream
, off
, STREAM_SEEK_SET
, NULL
);
348 stgmedium
.tymed
= TYMED_ISTREAM
;
349 stgmedium
.pstm
= This
->stream
;
350 stgmedium
.pUnkForRelease
= NULL
;
352 hres
= IBindStatusCallback_OnDataAvailable(This
->bsc
,
353 BSCF_FIRSTDATANOTIFICATION
|BSCF_LASTDATANOTIFICATION
,
354 size
.u
.LowPart
, &formatetc
, &stgmedium
);
356 IStream_Release(This
->stream
);
361 static inline HRESULT
display_error_page(BindStatusCallback
*This
)
363 FIXME("Error page not implemented yet.\n");
364 return report_data(This
);
367 static inline HRESULT
handle_xml_load(BindStatusCallback
*This
)
369 static const WCHAR selectW
[] = {'p','r','o','c','e','s','s','i','n','g','-',
370 'i','n','s','t','r','u','c','t','i','o','n','(','\'','x','m','l',
371 '-','s','t','y','l','e','s','h','e','e','t','\'',')',0};
372 static const WCHAR hrefW
[] = {'h','r','e','f','=',0};
374 IXMLDOMDocument3
*xml
= NULL
, *xsl
= NULL
;
375 IXMLDOMNode
*stylesheet
;
382 WCHAR
*href
= NULL
, *p
;
387 hres
= IStream_Seek(This
->stream
, off
, STREAM_SEEK_SET
, NULL
);
389 return display_error_page(This
);
391 hres
= dom_document_create(MSXML_DEFAULT
, (void **)&xml
);
393 return display_error_page(This
);
395 V_VT(&var
) = VT_UNKNOWN
;
396 V_UNKNOWN(&var
) = (IUnknown
*)This
->stream
;
397 hres
= IXMLDOMDocument3_load(xml
, var
, &succ
);
398 if(FAILED(hres
) || !succ
) {
399 IXMLDOMDocument3_Release(xml
);
400 return display_error_page(This
);
402 V_VT(&var
) = VT_EMPTY
;
404 bstr
= SysAllocString(selectW
);
405 hres
= IXMLDOMDocument3_selectSingleNode(xml
, bstr
, &stylesheet
);
408 IXMLDOMDocument3_Release(xml
);
409 return display_error_page(This
);
412 hres
= IXMLDOMNode_get_nodeValue(stylesheet
, &var
);
413 IXMLDOMNode_Release(stylesheet
);
414 if(SUCCEEDED(hres
) && V_VT(&var
)!=VT_BSTR
) {
415 FIXME("Variant type %d not supported\n", V_VT(&var
));
420 IXMLDOMDocument3_Release(xml
);
421 return display_error_page(This
);
424 /* TODO: fix parsing processing instruction value */
425 if((p
= wcsstr(V_BSTR(&var
), hrefW
))) {
426 p
+= ARRAY_SIZE(hrefW
) - 1;
427 if(*p
!='\'' && *p
!='\"') p
= NULL
;
430 p
= wcschr(href
, *p
);
437 IXMLDOMDocument3_Release(xml
);
438 return display_error_page(This
);
441 hres
= CreateURLMonikerEx(This
->mon
, href
, &mon
, 0);
444 IXMLDOMDocument3_Release(xml
);
445 return display_error_page(This
);
448 hres
= CreateBindCtx(0, &pbc
);
449 if(SUCCEEDED(hres
)) {
450 hres
= IMoniker_GetDisplayName(mon
, pbc
, NULL
, &xsl_url
);
451 IMoniker_Release(mon
);
452 IBindCtx_Release(pbc
);
455 IXMLDOMDocument3_Release(xml
);
456 return display_error_page(This
);
459 V_VT(&var
) = VT_BSTR
;
460 V_BSTR(&var
) = SysAllocString(xsl_url
);
461 CoTaskMemFree(xsl_url
);
463 IXMLDOMDocument3_Release(xml
);
464 return display_error_page(This
);
467 hres
= dom_document_create(MSXML_DEFAULT
, (void **)&xsl
);
470 IXMLDOMDocument3_Release(xml
);
471 return display_error_page(This
);
474 /* TODO: do the binding asynchronously */
475 hres
= IXMLDOMDocument3_load(xsl
, var
, &succ
);
477 if(FAILED(hres
) || !succ
) {
478 IXMLDOMDocument3_Release(xsl
);
479 IXMLDOMDocument3_Release(xml
);
480 return display_error_page(This
);
483 hres
= IXMLDOMDocument3_transformNode(xml
, (IXMLDOMNode
*)xsl
, &bstr
);
484 IXMLDOMDocument3_Release(xsl
);
485 IXMLDOMDocument3_Release(xml
);
487 return display_error_page(This
);
489 hres
= IStream_Seek(This
->stream
, off
, STREAM_SEEK_SET
, NULL
);
492 return display_error_page(This
);
495 hres
= IStream_Write(This
->stream
, (BYTE
*)bstr
,
496 SysStringLen(bstr
)*sizeof(WCHAR
), NULL
);
499 return display_error_page(This
);
501 return report_data(This
);
504 static HRESULT WINAPI
XMLView_BindStatusCallback_OnDataAvailable(
505 IBindStatusCallback
*iface
, DWORD grfBSCF
, DWORD dwSize
,
506 FORMATETC
*pformatetc
, STGMEDIUM
*pstgmed
)
508 BindStatusCallback
*This
= impl_from_IBindStatusCallback(iface
);
513 TRACE("%p, %lx, %ld, %p, %p.\n", iface
, grfBSCF
, dwSize
, pformatetc
, pstgmed
);
519 hres
= IStream_Read(pstgmed
->pstm
, buf
, sizeof(buf
), &size
);
520 IStream_Write(This
->stream
, buf
, size
, &size
);
521 } while(hres
==S_OK
&& size
);
523 if(FAILED(hres
) && hres
!=E_PENDING
)
528 return handle_xml_load(This
);
531 static HRESULT WINAPI
XMLView_BindStatusCallback_OnObjectAvailable(
532 IBindStatusCallback
*iface
, REFIID riid
, IUnknown
*punk
)
534 BindStatusCallback
*This
= impl_from_IBindStatusCallback(iface
);
535 FIXME("(%p)->(%s %p)\n", This
, debugstr_guid(riid
), punk
);
539 static IBindStatusCallbackVtbl XMLView_BindStatusCallbackVtbl
= {
540 XMLView_BindStatusCallback_QueryInterface
,
541 XMLView_BindStatusCallback_AddRef
,
542 XMLView_BindStatusCallback_Release
,
543 XMLView_BindStatusCallback_OnStartBinding
,
544 XMLView_BindStatusCallback_GetPriority
,
545 XMLView_BindStatusCallback_OnLowResource
,
546 XMLView_BindStatusCallback_OnProgress
,
547 XMLView_BindStatusCallback_OnStopBinding
,
548 XMLView_BindStatusCallback_GetBindInfo
,
549 XMLView_BindStatusCallback_OnDataAvailable
,
550 XMLView_BindStatusCallback_OnObjectAvailable
553 static inline HRESULT
XMLView_BindStatusCallback_Create(IBindStatusCallback
*bsc_html
,
554 IMoniker
*mon
, IStream
*stream
, IBindStatusCallback
**ret
)
556 BindStatusCallback
*bsc
;
558 bsc
= calloc(1, sizeof(BindStatusCallback
));
560 return E_OUTOFMEMORY
;
562 bsc
->IBindStatusCallback_iface
.lpVtbl
= &XMLView_BindStatusCallbackVtbl
;
566 IBindStatusCallback_AddRef(bsc_html
);
567 bsc
->stream
= stream
;
568 IStream_AddRef(bsc
->stream
);
570 IMoniker_AddRef(mon
);
572 *ret
= &bsc
->IBindStatusCallback_iface
;
576 static inline Moniker
* impl_from_IMoniker(IMoniker
*iface
)
578 return CONTAINING_RECORD(iface
, Moniker
, IMoniker_iface
);
581 static HRESULT WINAPI
XMLView_Moniker_QueryInterface(
582 IMoniker
*iface
, REFIID riid
, void **ppvObject
)
584 Moniker
*This
= impl_from_IMoniker(iface
);
586 TRACE("(%p)->(%s %p)\n", This
, debugstr_guid(riid
), ppvObject
);
588 if(IsEqualGUID(riid
, &IID_IUnknown
) || IsEqualGUID(riid
, &IID_IPersist
)
589 || IsEqualGUID(riid
, &IID_IPersistStream
) || IsEqualGUID(riid
, &IID_IMoniker
)) {
591 IMoniker_AddRef(iface
);
596 return E_NOINTERFACE
;
599 static ULONG WINAPI
XMLView_Moniker_AddRef(IMoniker
*iface
)
601 Moniker
*This
= impl_from_IMoniker(iface
);
602 LONG ref
= InterlockedIncrement(&This
->ref
);
604 TRACE("%p, refcount %lu.\n", iface
, ref
);
609 static ULONG WINAPI
XMLView_Moniker_Release(IMoniker
*iface
)
611 Moniker
*This
= impl_from_IMoniker(iface
);
612 ULONG ref
= InterlockedDecrement(&This
->ref
);
614 TRACE("%p, refcount %lu.\n", iface
, ref
);
617 IMoniker_Release(This
->mon
);
623 static HRESULT WINAPI
XMLView_Moniker_GetClassID(IMoniker
*iface
, CLSID
*pClassID
)
625 Moniker
*This
= impl_from_IMoniker(iface
);
626 FIXME("(%p)->(%p)\n", This
, pClassID
);
630 static HRESULT WINAPI
XMLView_Moniker_IsDirty(IMoniker
*iface
)
632 Moniker
*This
= impl_from_IMoniker(iface
);
633 FIXME("(%p)\n", This
);
637 static HRESULT WINAPI
XMLView_Moniker_Load(IMoniker
*iface
, IStream
*pStm
)
639 Moniker
*This
= impl_from_IMoniker(iface
);
640 FIXME("(%p)->(%p)\n", This
, pStm
);
644 static HRESULT WINAPI
XMLView_Moniker_Save(IMoniker
*iface
,
645 IStream
*pStm
, BOOL fClearDirty
)
647 Moniker
*This
= impl_from_IMoniker(iface
);
648 FIXME("(%p)->(%p %x)\n", This
, pStm
, fClearDirty
);
652 static HRESULT WINAPI
XMLView_Moniker_GetSizeMax(
653 IMoniker
*iface
, ULARGE_INTEGER
*pcbSize
)
655 Moniker
*This
= impl_from_IMoniker(iface
);
656 FIXME("(%p)->(%p)\n", This
, pcbSize
);
660 static HRESULT WINAPI
XMLView_Moniker_BindToObject(IMoniker
*iface
, IBindCtx
*pbc
,
661 IMoniker
*pmkToLeft
, REFIID riidResult
, void **ppvResult
)
663 Moniker
*This
= impl_from_IMoniker(iface
);
664 FIXME("(%p)->(%p %p %s %p)\n", This
, pbc
, pmkToLeft
,
665 debugstr_guid(riidResult
), ppvResult
);
669 static HRESULT WINAPI
XMLView_Moniker_BindToStorage(IMoniker
*iface
, IBindCtx
*pbc
,
670 IMoniker
*pmkToLeft
, REFIID riid
, void **ppvObj
)
672 Moniker
*This
= impl_from_IMoniker(iface
);
674 TRACE("(%p)->(%p %p %s %p)\n", This
, pbc
, pmkToLeft
, debugstr_guid(riid
), ppvObj
);
676 if(IsEqualGUID(riid
, &IID_IStream
)) {
680 *ppvObj
= This
->stream
;
682 return S_ASYNCHRONOUS
;
688 static HRESULT WINAPI
XMLView_Moniker_Reduce(IMoniker
*iface
, IBindCtx
*pbc
,
689 DWORD dwReduceHowFar
, IMoniker
**ppmkToLeft
, IMoniker
**ppmkReduced
)
691 FIXME("%p, %p, %ld, %p, %p.\n", iface
, pbc
, dwReduceHowFar
, ppmkToLeft
, ppmkReduced
);
695 static HRESULT WINAPI
XMLView_Moniker_ComposeWith(IMoniker
*iface
, IMoniker
*pmkRight
,
696 BOOL fOnlyIfNotGeneric
, IMoniker
**ppmkComposite
)
698 Moniker
*This
= impl_from_IMoniker(iface
);
699 FIXME("(%p)->(%p %x %p)\n", This
, pmkRight
, fOnlyIfNotGeneric
, ppmkComposite
);
703 static HRESULT WINAPI
XMLView_Moniker_Enum(IMoniker
*iface
,
704 BOOL fForward
, IEnumMoniker
**ppenumMoniker
)
706 Moniker
*This
= impl_from_IMoniker(iface
);
707 FIXME("(%p)->(%x %p)\n", This
, fForward
, ppenumMoniker
);
711 static HRESULT WINAPI
XMLView_Moniker_IsEqual(IMoniker
*iface
,
712 IMoniker
*pmkOtherMoniker
)
714 Moniker
*This
= impl_from_IMoniker(iface
);
715 FIXME("(%p)->(%p)\n", This
, pmkOtherMoniker
);
719 static HRESULT WINAPI
XMLView_Moniker_Hash(IMoniker
*iface
, DWORD
*pdwHash
)
721 Moniker
*This
= impl_from_IMoniker(iface
);
722 FIXME("(%p)->(%p)\n", This
, pdwHash
);
726 static HRESULT WINAPI
XMLView_Moniker_IsRunning(IMoniker
*iface
, IBindCtx
*pbc
,
727 IMoniker
*pmkToLeft
, IMoniker
*pmkNewlyRunning
)
729 Moniker
*This
= impl_from_IMoniker(iface
);
730 FIXME("(%p)->(%p %p %p)\n", This
, pbc
, pmkToLeft
, pmkNewlyRunning
);
734 static HRESULT WINAPI
XMLView_Moniker_GetTimeOfLastChange(IMoniker
*iface
,
735 IBindCtx
*pbc
, IMoniker
*pmkToLeft
, FILETIME
*pFileTime
)
737 Moniker
*This
= impl_from_IMoniker(iface
);
738 FIXME("(%p)->(%p %p %p)\n", This
, pbc
, pmkToLeft
, pFileTime
);
742 static HRESULT WINAPI
XMLView_Moniker_Inverse(IMoniker
*iface
, IMoniker
**ppmk
)
744 Moniker
*This
= impl_from_IMoniker(iface
);
745 FIXME("(%p)->(%p)\n", This
, ppmk
);
749 static HRESULT WINAPI
XMLView_Moniker_CommonPrefixWith(IMoniker
*iface
,
750 IMoniker
*pmkOther
, IMoniker
**ppmkPrefix
)
752 Moniker
*This
= impl_from_IMoniker(iface
);
753 FIXME("(%p)->(%p %p)\n", This
, pmkOther
, ppmkPrefix
);
757 static HRESULT WINAPI
XMLView_Moniker_RelativePathTo(IMoniker
*iface
,
758 IMoniker
*pmkOther
, IMoniker
**ppmkRelPath
)
760 Moniker
*This
= impl_from_IMoniker(iface
);
761 FIXME("(%p)->(%p %p)\n", This
, pmkOther
, ppmkRelPath
);
765 static HRESULT WINAPI
XMLView_Moniker_GetDisplayName(IMoniker
*iface
,
766 IBindCtx
*pbc
, IMoniker
*pmkToLeft
, LPOLESTR
*ppszDisplayName
)
768 Moniker
*This
= impl_from_IMoniker(iface
);
769 TRACE("(%p)->(%p %p %p)\n", This
, pbc
, pmkToLeft
, ppszDisplayName
);
770 return IMoniker_GetDisplayName(This
->mon
, pbc
, pmkToLeft
, ppszDisplayName
);
773 static HRESULT WINAPI
XMLView_Moniker_ParseDisplayName(IMoniker
*iface
,
774 IBindCtx
*pbc
, IMoniker
*pmkToLeft
, LPOLESTR pszDisplayName
,
775 ULONG
*pchEaten
, IMoniker
**ppmkOut
)
777 Moniker
*This
= impl_from_IMoniker(iface
);
778 FIXME("(%p)->(%p %p %s %p %p)\n", This
, pbc
, pmkToLeft
,
779 debugstr_w(pszDisplayName
), pchEaten
, ppmkOut
);
783 static HRESULT WINAPI
XMLView_Moniker_IsSystemMoniker(
784 IMoniker
*iface
, DWORD
*pdwMksys
)
786 Moniker
*This
= impl_from_IMoniker(iface
);
787 FIXME("(%p)->(%p)\n", This
, pdwMksys
);
791 static IMonikerVtbl XMLView_MonikerVtbl
= {
792 XMLView_Moniker_QueryInterface
,
793 XMLView_Moniker_AddRef
,
794 XMLView_Moniker_Release
,
795 XMLView_Moniker_GetClassID
,
796 XMLView_Moniker_IsDirty
,
797 XMLView_Moniker_Load
,
798 XMLView_Moniker_Save
,
799 XMLView_Moniker_GetSizeMax
,
800 XMLView_Moniker_BindToObject
,
801 XMLView_Moniker_BindToStorage
,
802 XMLView_Moniker_Reduce
,
803 XMLView_Moniker_ComposeWith
,
804 XMLView_Moniker_Enum
,
805 XMLView_Moniker_IsEqual
,
806 XMLView_Moniker_Hash
,
807 XMLView_Moniker_IsRunning
,
808 XMLView_Moniker_GetTimeOfLastChange
,
809 XMLView_Moniker_Inverse
,
810 XMLView_Moniker_CommonPrefixWith
,
811 XMLView_Moniker_RelativePathTo
,
812 XMLView_Moniker_GetDisplayName
,
813 XMLView_Moniker_ParseDisplayName
,
814 XMLView_Moniker_IsSystemMoniker
817 static inline HRESULT
XMLView_Moniker_Create(IMoniker
*mon
,
818 IStream
*stream
, IMoniker
**ret
)
822 wrap
= calloc(1, sizeof(Moniker
));
824 return E_OUTOFMEMORY
;
826 wrap
->IMoniker_iface
.lpVtbl
= &XMLView_MonikerVtbl
;
830 IMoniker_AddRef(mon
);
831 wrap
->stream
= stream
;
832 IStream_AddRef(stream
);
834 *ret
= &wrap
->IMoniker_iface
;
838 static inline XMLView
* impl_from_IPersistMoniker(IPersistMoniker
*iface
)
840 return CONTAINING_RECORD(iface
, XMLView
, IPersistMoniker_iface
);
843 static HRESULT WINAPI
XMLView_PersistMoniker_QueryInterface(
844 IPersistMoniker
*iface
, REFIID riid
, void **ppvObject
)
846 XMLView
*This
= impl_from_IPersistMoniker(iface
);
848 TRACE("(%p)->(%s %p)\n", This
, debugstr_guid(riid
), ppvObject
);
850 if(IsEqualGUID(riid
, &IID_IUnknown
) || IsEqualGUID(riid
, &IID_IPersistMoniker
))
851 *ppvObject
= &This
->IPersistMoniker_iface
;
852 else if(IsEqualGUID(riid
, &IID_IPersistHistory
) ||
853 IsEqualGUID(riid
, &IID_IPersist
))
854 *ppvObject
= &This
->IPersistHistory_iface
;
855 else if(IsEqualGUID(riid
, &IID_IOleCommandTarget
))
856 *ppvObject
= &This
->IOleCommandTarget_iface
;
857 else if(IsEqualGUID(riid
, &IID_IOleObject
))
858 *ppvObject
= &This
->IOleObject_iface
;
860 return IUnknown_QueryInterface(This
->html_doc
, riid
, ppvObject
);
862 IPersistMoniker_AddRef(&This
->IPersistMoniker_iface
);
866 static ULONG WINAPI
XMLView_PersistMoniker_AddRef(IPersistMoniker
*iface
)
868 XMLView
*This
= impl_from_IPersistMoniker(iface
);
869 ULONG ref
= InterlockedIncrement(&This
->ref
);
871 TRACE("%p, refcount %lu.\n", iface
, ref
);
876 static ULONG WINAPI
XMLView_PersistMoniker_Release(IPersistMoniker
*iface
)
878 XMLView
*This
= impl_from_IPersistMoniker(iface
);
879 ULONG ref
= InterlockedDecrement(&This
->ref
);
881 TRACE("%p, refcount %lu.\n", iface
, ref
);
885 IMoniker_Release(This
->mon
);
886 IUnknown_Release(This
->html_doc
);
892 static HRESULT WINAPI
XMLView_PersistMoniker_GetClassID(
893 IPersistMoniker
*iface
, CLSID
*pClassID
)
895 XMLView
*This
= impl_from_IPersistMoniker(iface
);
896 FIXME("(%p)->(%p)\n", This
, pClassID
);
900 static HRESULT WINAPI
XMLView_PersistMoniker_IsDirty(IPersistMoniker
*iface
)
902 XMLView
*This
= impl_from_IPersistMoniker(iface
);
903 FIXME("(%p)\n", This
);
907 static HRESULT WINAPI
XMLView_PersistMoniker_Load(IPersistMoniker
*iface
,
908 BOOL fFullyAvailable
, IMoniker
*pimkName
, LPBC pibc
, DWORD grfMode
)
910 static const WCHAR XSLParametersW
[] = {'X','S','L','P','a','r','a','m','e','t','e','r','s',0};
911 static const WCHAR XMLBufferStreamW
[] = {'X','M','L','B','u','f','f','e','r','S','t','r','e','a','m',0};
912 static const WCHAR DWNBINDINFOW
[] = {'_','_','D','W','N','B','I','N','D','I','N','F','O',0};
913 static const WCHAR HTMLLOADOPTIONSW
[] = {'_','_','H','T','M','L','L','O','A','D','O','P','T','I','O','N','S',0};
914 static const WCHAR BSCBHolderW
[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 };
916 XMLView
*This
= impl_from_IPersistMoniker(iface
);
917 IPersistMoniker
*html_persist_mon
;
918 IBindStatusCallback
*bsc
, *bsc_html
;
925 TRACE("%p, %x, %p, %p, %lx.\n", iface
, fFullyAvailable
, pimkName
, pibc
, grfMode
);
927 hres
= IBindCtx_GetObjectParam(pibc
, (LPOLESTR
)XSLParametersW
, &unk
);
928 if(SUCCEEDED(hres
)) {
929 FIXME("ignoring XSLParameters\n");
930 IUnknown_Release(unk
);
932 hres
= IBindCtx_GetObjectParam(pibc
, (LPOLESTR
)XMLBufferStreamW
, &unk
);
933 if(SUCCEEDED(hres
)) {
934 FIXME("ignoring XMLBufferStream\n");
935 IUnknown_Release(unk
);
938 hres
= CreateBindCtx(0, &bindctx
);
942 hres
= IBindCtx_GetObjectParam(pibc
, (LPOLESTR
)DWNBINDINFOW
, &unk
);
943 if(SUCCEEDED(hres
)) {
944 IBindCtx_RegisterObjectParam(bindctx
, (LPOLESTR
)DWNBINDINFOW
, unk
);
945 IUnknown_Release(unk
);
947 hres
= IBindCtx_GetObjectParam(pibc
, (LPOLESTR
)HTMLLOADOPTIONSW
, &unk
);
948 if(SUCCEEDED(hres
)) {
949 IBindCtx_RegisterObjectParam(bindctx
, (LPOLESTR
)HTMLLOADOPTIONSW
, unk
);
950 IUnknown_Release(unk
);
952 hres
= IBindCtx_GetObjectParam(pibc
, (LPOLESTR
)SZ_HTML_CLIENTSITE_OBJECTPARAM
, &unk
);
953 if(SUCCEEDED(hres
)) {
954 IBindCtx_RegisterObjectParam(bindctx
, (LPOLESTR
)SZ_HTML_CLIENTSITE_OBJECTPARAM
, unk
);
955 IUnknown_Release(unk
);
958 hres
= CreateStreamOnHGlobal(NULL
, TRUE
, &stream
);
960 IBindCtx_Release(bindctx
);
965 IMoniker_Release(This
->mon
);
966 This
->mon
= pimkName
;
967 IMoniker_AddRef(This
->mon
);
969 hres
= XMLView_Moniker_Create(This
->mon
, stream
, &mon
);
971 IStream_Release(stream
);
972 IBindCtx_Release(bindctx
);
976 hres
= IUnknown_QueryInterface(This
->html_doc
,
977 &IID_IPersistMoniker
, (void**)&html_persist_mon
);
979 IMoniker_Release(mon
);
980 IStream_Release(stream
);
981 IBindCtx_Release(bindctx
);
985 hres
= IPersistMoniker_Load(html_persist_mon
, FALSE
, mon
, bindctx
, 0);
986 IPersistMoniker_Release(html_persist_mon
);
987 IMoniker_Release(mon
);
989 IStream_Release(stream
);
990 IBindCtx_Release(bindctx
);
994 hres
= IBindCtx_GetObjectParam(bindctx
, (LPOLESTR
)BSCBHolderW
, &unk
);
995 IBindCtx_Release(bindctx
);
997 IStream_Release(stream
);
1000 hres
= IUnknown_QueryInterface(unk
, &IID_IBindStatusCallback
, (void**)&bsc_html
);
1001 IUnknown_Release(unk
);
1003 IStream_Release(stream
);
1007 hres
= XMLView_BindStatusCallback_Create(bsc_html
, This
->mon
, stream
, &bsc
);
1008 IStream_Release(stream
);
1010 IBindStatusCallback_OnStopBinding(bsc_html
, hres
, NULL
);
1011 IBindStatusCallback_Release(bsc_html
);
1015 hres
= RegisterBindStatusCallback(pibc
, bsc
, NULL
, 0);
1016 IBindStatusCallback_Release(bsc
);
1018 IBindStatusCallback_OnStopBinding(bsc_html
, hres
, NULL
);
1019 IBindStatusCallback_Release(bsc_html
);
1023 hres
= IMoniker_BindToStorage(pimkName
, pibc
, NULL
,
1024 &IID_IStream
, (void**)&stream
);
1026 IBindStatusCallback_OnStopBinding(bsc_html
, hres
, NULL
);
1027 IBindStatusCallback_Release(bsc_html
);
1032 IStream_Release(stream
);
1033 IBindStatusCallback_Release(bsc_html
);
1037 static HRESULT WINAPI
XMLView_PersistMoniker_Save(IPersistMoniker
*iface
,
1038 IMoniker
*pimkName
, LPBC pbc
, BOOL fRemember
)
1040 XMLView
*This
= impl_from_IPersistMoniker(iface
);
1041 FIXME("(%p)->(%p %p %x)\n", This
, pimkName
, pbc
, fRemember
);
1045 static HRESULT WINAPI
XMLView_PersistMoniker_SaveCompleted(
1046 IPersistMoniker
*iface
, IMoniker
*pimkName
, LPBC pibc
)
1048 XMLView
*This
= impl_from_IPersistMoniker(iface
);
1049 FIXME("(%p)->(%p %p)\n", This
, pimkName
, pibc
);
1053 static HRESULT WINAPI
XMLView_PersistMoniker_GetCurMoniker(
1054 IPersistMoniker
*iface
, IMoniker
**ppimkName
)
1056 XMLView
*This
= impl_from_IPersistMoniker(iface
);
1057 FIXME("(%p)->(%p)\n", This
, ppimkName
);
1061 static IPersistMonikerVtbl XMLView_PersistMonikerVtbl
= {
1062 XMLView_PersistMoniker_QueryInterface
,
1063 XMLView_PersistMoniker_AddRef
,
1064 XMLView_PersistMoniker_Release
,
1065 XMLView_PersistMoniker_GetClassID
,
1066 XMLView_PersistMoniker_IsDirty
,
1067 XMLView_PersistMoniker_Load
,
1068 XMLView_PersistMoniker_Save
,
1069 XMLView_PersistMoniker_SaveCompleted
,
1070 XMLView_PersistMoniker_GetCurMoniker
1073 static inline XMLView
* impl_from_IPersistHistory(IPersistHistory
*iface
)
1075 return CONTAINING_RECORD(iface
, XMLView
, IPersistHistory_iface
);
1078 static HRESULT WINAPI
XMLView_PersistHistory_QueryInterface(
1079 IPersistHistory
*iface
, REFIID riid
, void **ppvObject
)
1081 XMLView
*This
= impl_from_IPersistHistory(iface
);
1082 return IPersistMoniker_QueryInterface(&This
->IPersistMoniker_iface
, riid
, ppvObject
);
1085 static ULONG WINAPI
XMLView_PersistHistory_AddRef(IPersistHistory
*iface
)
1087 XMLView
*This
= impl_from_IPersistHistory(iface
);
1088 return IPersistMoniker_AddRef(&This
->IPersistMoniker_iface
);
1091 static ULONG WINAPI
XMLView_PersistHistory_Release(IPersistHistory
*iface
)
1093 XMLView
*This
= impl_from_IPersistHistory(iface
);
1094 return IPersistMoniker_Release(&This
->IPersistMoniker_iface
);
1097 static HRESULT WINAPI
XMLView_PersistHistory_GetClassID(
1098 IPersistHistory
*iface
, CLSID
*pClassID
)
1100 XMLView
*This
= impl_from_IPersistHistory(iface
);
1101 FIXME("(%p)->(%p)\n", This
, pClassID
);
1105 static HRESULT WINAPI
XMLView_PersistHistory_LoadHistory(
1106 IPersistHistory
*iface
, IStream
*pStream
, IBindCtx
*pbc
)
1108 XMLView
*This
= impl_from_IPersistHistory(iface
);
1109 FIXME("(%p)->(%p %p)\n", This
, pStream
, pbc
);
1113 static HRESULT WINAPI
XMLView_PersistHistory_SaveHistory(
1114 IPersistHistory
*iface
, IStream
*pStream
)
1116 XMLView
*This
= impl_from_IPersistHistory(iface
);
1117 FIXME("(%p)->(%p)\n", This
, pStream
);
1121 static HRESULT WINAPI
XMLView_PersistHistory_SetPositionCookie(
1122 IPersistHistory
*iface
, DWORD dwPositioncookie
)
1124 FIXME("%p, %ld.\n", iface
, dwPositioncookie
);
1128 static HRESULT WINAPI
XMLView_PersistHistory_GetPositionCookie(
1129 IPersistHistory
*iface
, DWORD
*pdwPositioncookie
)
1131 XMLView
*This
= impl_from_IPersistHistory(iface
);
1132 FIXME("(%p)->(%p)\n", This
, pdwPositioncookie
);
1136 static IPersistHistoryVtbl XMLView_PersistHistoryVtbl
= {
1137 XMLView_PersistHistory_QueryInterface
,
1138 XMLView_PersistHistory_AddRef
,
1139 XMLView_PersistHistory_Release
,
1140 XMLView_PersistHistory_GetClassID
,
1141 XMLView_PersistHistory_LoadHistory
,
1142 XMLView_PersistHistory_SaveHistory
,
1143 XMLView_PersistHistory_SetPositionCookie
,
1144 XMLView_PersistHistory_GetPositionCookie
1147 static inline XMLView
* impl_from_IOleCommandTarget(IOleCommandTarget
*iface
)
1149 return CONTAINING_RECORD(iface
, XMLView
, IOleCommandTarget_iface
);
1152 static HRESULT WINAPI
XMLView_OleCommandTarget_QueryInterface(
1153 IOleCommandTarget
*iface
, REFIID riid
, void **ppvObject
)
1155 XMLView
*This
= impl_from_IOleCommandTarget(iface
);
1156 return IPersistMoniker_QueryInterface(&This
->IPersistMoniker_iface
, riid
, ppvObject
);
1159 static ULONG WINAPI
XMLView_OleCommandTarget_AddRef(IOleCommandTarget
*iface
)
1161 XMLView
*This
= impl_from_IOleCommandTarget(iface
);
1162 return IPersistMoniker_AddRef(&This
->IPersistMoniker_iface
);
1165 static ULONG WINAPI
XMLView_OleCommandTarget_Release(IOleCommandTarget
*iface
)
1167 XMLView
*This
= impl_from_IOleCommandTarget(iface
);
1168 return IPersistMoniker_Release(&This
->IPersistMoniker_iface
);
1171 static HRESULT WINAPI
XMLView_OleCommandTarget_QueryStatus(IOleCommandTarget
*iface
,
1172 const GUID
*pguidCmdGroup
, ULONG cCmds
, OLECMD prgCmds
[], OLECMDTEXT
*pCmdText
)
1174 FIXME("%p, %p, %lu, %p, %p.\n", iface
, pguidCmdGroup
, cCmds
, prgCmds
, pCmdText
);
1178 static HRESULT WINAPI
XMLView_OleCommandTarget_Exec(IOleCommandTarget
*iface
,
1179 const GUID
*pguidCmdGroup
, DWORD nCmdID
, DWORD nCmdexecopt
,
1180 VARIANT
*pvaIn
, VARIANT
*pvaOut
)
1182 FIXME("%p, %p, %ld, %lx, %p, %p.\n", iface
, pguidCmdGroup
,
1183 nCmdID
, nCmdexecopt
, pvaIn
, pvaOut
);
1187 static IOleCommandTargetVtbl XMLView_OleCommandTargetVtbl
= {
1188 XMLView_OleCommandTarget_QueryInterface
,
1189 XMLView_OleCommandTarget_AddRef
,
1190 XMLView_OleCommandTarget_Release
,
1191 XMLView_OleCommandTarget_QueryStatus
,
1192 XMLView_OleCommandTarget_Exec
1195 static inline XMLView
* impl_from_IOleObject(IOleObject
*iface
)
1197 return CONTAINING_RECORD(iface
, XMLView
, IOleObject_iface
);
1200 static HRESULT WINAPI
XMLView_OleObject_QueryInterface(
1201 IOleObject
*iface
, REFIID riid
, void **ppvObject
)
1203 XMLView
*This
= impl_from_IOleObject(iface
);
1204 return IPersistMoniker_QueryInterface(&This
->IPersistMoniker_iface
, riid
, ppvObject
);
1207 static ULONG WINAPI
XMLView_OleObject_AddRef(IOleObject
*iface
)
1209 XMLView
*This
= impl_from_IOleObject(iface
);
1210 return IPersistMoniker_AddRef(&This
->IPersistMoniker_iface
);
1213 static ULONG WINAPI
XMLView_OleObject_Release(IOleObject
*iface
)
1215 XMLView
*This
= impl_from_IOleObject(iface
);
1216 return IPersistMoniker_Release(&This
->IPersistMoniker_iface
);
1219 static HRESULT WINAPI
XMLView_OleObject_SetClientSite(
1220 IOleObject
*iface
, IOleClientSite
*pClientSite
)
1222 XMLView
*This
= impl_from_IOleObject(iface
);
1223 FIXME("(%p)->(%p)\n", This
, pClientSite
);
1227 static HRESULT WINAPI
XMLView_OleObject_GetClientSite(
1228 IOleObject
*iface
, IOleClientSite
**ppClientSite
)
1230 XMLView
*This
= impl_from_IOleObject(iface
);
1231 FIXME("(%p)->(%p)\n", This
, ppClientSite
);
1235 static HRESULT WINAPI
XMLView_OleObject_SetHostNames(IOleObject
*iface
,
1236 LPCOLESTR szContainerApp
, LPCOLESTR szContainerObj
)
1238 XMLView
*This
= impl_from_IOleObject(iface
);
1239 FIXME("(%p)->(%s %s)\n", This
, debugstr_w(szContainerApp
), debugstr_w(szContainerObj
));
1243 static HRESULT WINAPI
XMLView_OleObject_Close(IOleObject
*iface
, DWORD dwSaveOption
)
1245 FIXME("%p, %lx.\n", iface
, dwSaveOption
);
1249 static HRESULT WINAPI
XMLView_OleObject_SetMoniker(IOleObject
*iface
,
1250 DWORD dwWhichMoniker
, IMoniker
*pmk
)
1252 FIXME("%p, %lx, %p.\n", iface
, dwWhichMoniker
, pmk
);
1256 static HRESULT WINAPI
XMLView_OleObject_GetMoniker(IOleObject
*iface
,
1257 DWORD dwAssign
, DWORD dwWhichMoniker
, IMoniker
**ppmk
)
1259 FIXME("%p, %lx, %lx, %p.\n", iface
, dwAssign
, dwWhichMoniker
, ppmk
);
1263 static HRESULT WINAPI
XMLView_OleObject_InitFromData(IOleObject
*iface
,
1264 IDataObject
*pDataObject
, BOOL fCreation
, DWORD dwReserved
)
1266 FIXME("%p, %p, %x, %lx.\n", iface
, pDataObject
, fCreation
, dwReserved
);
1270 static HRESULT WINAPI
XMLView_OleObject_GetClipboardData(IOleObject
*iface
,
1271 DWORD dwReserved
, IDataObject
**ppDataObject
)
1273 FIXME("%p, %lx, %p.\n", iface
, dwReserved
, ppDataObject
);
1277 static HRESULT WINAPI
XMLView_OleObject_DoVerb(IOleObject
*iface
,
1278 LONG iVerb
, LPMSG lpmsg
, IOleClientSite
*pActiveSite
,
1279 LONG lindex
, HWND hwndParent
, LPCRECT lprcPosRect
)
1281 FIXME("%p, %ld, %p, %p, %ld, %p, %p.\n", iface
, iVerb
, lpmsg
,
1282 pActiveSite
, lindex
, hwndParent
, lprcPosRect
);
1286 static HRESULT WINAPI
XMLView_OleObject_EnumVerbs(
1287 IOleObject
*iface
, IEnumOLEVERB
**ppEnumOleVerb
)
1289 XMLView
*This
= impl_from_IOleObject(iface
);
1290 FIXME("(%p)->{%p)\n", This
, ppEnumOleVerb
);
1294 static HRESULT WINAPI
XMLView_OleObject_Update(IOleObject
*iface
)
1296 XMLView
*This
= impl_from_IOleObject(iface
);
1297 FIXME("(%p)\n", This
);
1301 static HRESULT WINAPI
XMLView_OleObject_IsUpToDate(IOleObject
*iface
)
1303 XMLView
*This
= impl_from_IOleObject(iface
);
1304 FIXME("(%p)\n", This
);
1308 static HRESULT WINAPI
XMLView_OleObject_GetUserClassID(IOleObject
*iface
, CLSID
*pClsid
)
1310 XMLView
*This
= impl_from_IOleObject(iface
);
1311 FIXME("(%p)->(%p)\n", This
, pClsid
);
1315 static HRESULT WINAPI
XMLView_OleObject_GetUserType(IOleObject
*iface
,
1316 DWORD dwFormOfType
, LPOLESTR
*pszUserType
)
1318 FIXME("%p, %lx, %p.\n", iface
, dwFormOfType
, pszUserType
);
1322 static HRESULT WINAPI
XMLView_OleObject_SetExtent(IOleObject
*iface
,
1323 DWORD dwDrawAspect
, SIZEL
*psizel
)
1325 FIXME("%p, %lx, %p.\n", iface
, dwDrawAspect
, psizel
);
1329 static HRESULT WINAPI
XMLView_OleObject_GetExtent(IOleObject
*iface
,
1330 DWORD dwDrawAspect
, SIZEL
*psizel
)
1332 FIXME("%p, %lx, %p.\n", iface
, dwDrawAspect
, psizel
);
1336 static HRESULT WINAPI
XMLView_OleObject_Advise(IOleObject
*iface
,
1337 IAdviseSink
*pAdvSink
, DWORD
*pdwConnection
)
1339 XMLView
*This
= impl_from_IOleObject(iface
);
1340 FIXME("(%p)->(%p %p)\n", This
, pAdvSink
, pdwConnection
);
1344 static HRESULT WINAPI
XMLView_OleObject_Unadvise(
1345 IOleObject
*iface
, DWORD dwConnection
)
1347 FIXME("%p, %ld.\n", iface
, dwConnection
);
1351 static HRESULT WINAPI
XMLView_OleObject_EnumAdvise(
1352 IOleObject
*iface
, IEnumSTATDATA
**ppenumAdvise
)
1354 XMLView
*This
= impl_from_IOleObject(iface
);
1355 FIXME("(%p)->(%p)\n", This
, ppenumAdvise
);
1359 static HRESULT WINAPI
XMLView_OleObject_GetMiscStatus(
1360 IOleObject
*iface
, DWORD dwAspect
, DWORD
*pdwStatus
)
1362 FIXME("%p, %ld, %p.\n", iface
, dwAspect
, pdwStatus
);
1366 static HRESULT WINAPI
XMLView_OleObject_SetColorScheme(
1367 IOleObject
*iface
, LOGPALETTE
*pLogpal
)
1369 XMLView
*This
= impl_from_IOleObject(iface
);
1370 FIXME("(%p)->(%p)\n", This
, pLogpal
);
1374 static IOleObjectVtbl XMLView_OleObjectVtbl
= {
1375 XMLView_OleObject_QueryInterface
,
1376 XMLView_OleObject_AddRef
,
1377 XMLView_OleObject_Release
,
1378 XMLView_OleObject_SetClientSite
,
1379 XMLView_OleObject_GetClientSite
,
1380 XMLView_OleObject_SetHostNames
,
1381 XMLView_OleObject_Close
,
1382 XMLView_OleObject_SetMoniker
,
1383 XMLView_OleObject_GetMoniker
,
1384 XMLView_OleObject_InitFromData
,
1385 XMLView_OleObject_GetClipboardData
,
1386 XMLView_OleObject_DoVerb
,
1387 XMLView_OleObject_EnumVerbs
,
1388 XMLView_OleObject_Update
,
1389 XMLView_OleObject_IsUpToDate
,
1390 XMLView_OleObject_GetUserClassID
,
1391 XMLView_OleObject_GetUserType
,
1392 XMLView_OleObject_SetExtent
,
1393 XMLView_OleObject_GetExtent
,
1394 XMLView_OleObject_Advise
,
1395 XMLView_OleObject_Unadvise
,
1396 XMLView_OleObject_EnumAdvise
,
1397 XMLView_OleObject_GetMiscStatus
,
1398 XMLView_OleObject_SetColorScheme
1401 HRESULT
XMLView_create(void **ppObj
)
1406 TRACE("(%p)\n", ppObj
);
1408 This
= calloc(1, sizeof(*This
));
1410 return E_OUTOFMEMORY
;
1412 This
->IPersistMoniker_iface
.lpVtbl
= &XMLView_PersistMonikerVtbl
;
1413 This
->IPersistHistory_iface
.lpVtbl
= &XMLView_PersistHistoryVtbl
;
1414 This
->IOleCommandTarget_iface
.lpVtbl
= &XMLView_OleCommandTargetVtbl
;
1415 This
->IOleObject_iface
.lpVtbl
= &XMLView_OleObjectVtbl
;
1418 hres
= CoCreateInstance(&CLSID_HTMLDocument
, (IUnknown
*)&This
->IPersistMoniker_iface
,
1419 CLSCTX_INPROC_SERVER
, &IID_IUnknown
, (void**)&This
->html_doc
);
1425 *ppObj
= &This
->IPersistMoniker_iface
;