[4943] | 1 | /*
|
---|
| 2 | * Implementation of IProvideClassInfo interfaces for IE Web Browser control
|
---|
| 3 | *
|
---|
| 4 | * 2001 John R. Sheets (for CodeWeavers)
|
---|
| 5 | */
|
---|
| 6 |
|
---|
| 7 | #include "debugtools.h"
|
---|
| 8 | #include "shdocvw.h"
|
---|
| 9 |
|
---|
| 10 | DEFAULT_DEBUG_CHANNEL(shdocvw);
|
---|
| 11 |
|
---|
| 12 | /**********************************************************************
|
---|
| 13 | * Implement the IProvideClassInfo interface
|
---|
| 14 | *
|
---|
| 15 | * FIXME: Should we just pass in the IProvideClassInfo2 methods rather
|
---|
| 16 | * reimplementing them here?
|
---|
| 17 | */
|
---|
| 18 |
|
---|
| 19 | static HRESULT WINAPI WBPCI_QueryInterface(LPPROVIDECLASSINFO iface,
|
---|
| 20 | REFIID riid, LPVOID *ppobj)
|
---|
| 21 | {
|
---|
| 22 | ICOM_THIS(IProvideClassInfoImpl, iface);
|
---|
| 23 |
|
---|
| 24 | FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
---|
| 25 | return E_NOINTERFACE;
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 | static ULONG WINAPI WBPCI_AddRef(LPPROVIDECLASSINFO iface)
|
---|
| 29 | {
|
---|
| 30 | ICOM_THIS(IProvideClassInfoImpl, iface);
|
---|
| 31 |
|
---|
| 32 | TRACE("\n");
|
---|
| 33 | return ++(This->ref);
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 | static ULONG WINAPI WBPCI_Release(LPPROVIDECLASSINFO iface)
|
---|
| 37 | {
|
---|
| 38 | ICOM_THIS(IProvideClassInfoImpl, iface);
|
---|
| 39 |
|
---|
| 40 | /* static class, won't be freed */
|
---|
| 41 | TRACE("\n");
|
---|
| 42 | return --(This->ref);
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 | /* Return an ITypeInfo interface to retrieve type library info about
|
---|
| 46 | * this control.
|
---|
| 47 | */
|
---|
| 48 | static HRESULT WINAPI WBPCI_GetClassInfo(LPPROVIDECLASSINFO iface, LPTYPEINFO *ppTI)
|
---|
| 49 | {
|
---|
| 50 | FIXME("stub: LPTYPEINFO = %p\n", *ppTI);
|
---|
| 51 | return S_OK;
|
---|
| 52 | }
|
---|
| 53 |
|
---|
| 54 | /**********************************************************************
|
---|
| 55 | * IProvideClassInfo virtual function table for IE Web Browser component
|
---|
| 56 | */
|
---|
| 57 |
|
---|
[6712] | 58 | static ICOM_VTABLE(IProvideClassInfo) WBPCI_Vtbl =
|
---|
[4943] | 59 | {
|
---|
| 60 | ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
---|
| 61 | WBPCI_QueryInterface,
|
---|
| 62 | WBPCI_AddRef,
|
---|
| 63 | WBPCI_Release,
|
---|
| 64 | WBPCI_GetClassInfo
|
---|
| 65 | };
|
---|
| 66 |
|
---|
| 67 | IProvideClassInfoImpl SHDOCVW_ProvideClassInfo = { &WBPCI_Vtbl, 1 };
|
---|
| 68 |
|
---|
| 69 |
|
---|
| 70 | /**********************************************************************
|
---|
| 71 | * Implement the IProvideClassInfo2 interface (inherits from
|
---|
| 72 | * IProvideClassInfo).
|
---|
| 73 | */
|
---|
| 74 |
|
---|
| 75 | static HRESULT WINAPI WBPCI2_QueryInterface(LPPROVIDECLASSINFO2 iface,
|
---|
| 76 | REFIID riid, LPVOID *ppobj)
|
---|
| 77 | {
|
---|
| 78 | ICOM_THIS(IProvideClassInfo2Impl, iface);
|
---|
| 79 |
|
---|
| 80 | FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
---|
| 81 | return E_NOINTERFACE;
|
---|
| 82 | }
|
---|
| 83 |
|
---|
| 84 | static ULONG WINAPI WBPCI2_AddRef(LPPROVIDECLASSINFO2 iface)
|
---|
| 85 | {
|
---|
| 86 | ICOM_THIS(IProvideClassInfo2Impl, iface);
|
---|
| 87 |
|
---|
| 88 | TRACE("\n");
|
---|
| 89 | return ++(This->ref);
|
---|
| 90 | }
|
---|
| 91 |
|
---|
| 92 | static ULONG WINAPI WBPCI2_Release(LPPROVIDECLASSINFO2 iface)
|
---|
| 93 | {
|
---|
| 94 | ICOM_THIS(IProvideClassInfo2Impl, iface);
|
---|
| 95 |
|
---|
| 96 | /* static class, won't be freed */
|
---|
| 97 | TRACE("\n");
|
---|
| 98 | return --(This->ref);
|
---|
| 99 | }
|
---|
| 100 |
|
---|
| 101 | /* Return an ITypeInfo interface to retrieve type library info about
|
---|
| 102 | * this control.
|
---|
| 103 | */
|
---|
| 104 | static HRESULT WINAPI WBPCI2_GetClassInfo(LPPROVIDECLASSINFO2 iface, LPTYPEINFO *ppTI)
|
---|
| 105 | {
|
---|
| 106 | FIXME("stub: LPTYPEINFO = %p\n", *ppTI);
|
---|
| 107 | return S_OK;
|
---|
| 108 | }
|
---|
| 109 |
|
---|
| 110 | /* Get the IID for generic default event callbacks. This IID will
|
---|
| 111 | * in theory be used to later query for an IConnectionPoint to connect
|
---|
| 112 | * an event sink (callback implmentation in the OLE control site)
|
---|
| 113 | * to this control.
|
---|
| 114 | */
|
---|
| 115 | static HRESULT WINAPI WBPCI2_GetGUID(LPPROVIDECLASSINFO2 iface,
|
---|
| 116 | DWORD dwGuidKind, GUID *pGUID)
|
---|
| 117 | {
|
---|
| 118 | FIXME("stub: dwGuidKind = %ld, pGUID = %s\n", dwGuidKind, debugstr_guid(pGUID));
|
---|
| 119 |
|
---|
| 120 | if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID)
|
---|
| 121 | {
|
---|
| 122 | FIXME ("Requested unsupported GUID type: %ld\n", dwGuidKind);
|
---|
| 123 | return E_FAIL; /* Is there a better return type here? */
|
---|
| 124 | }
|
---|
| 125 |
|
---|
| 126 | /* FIXME: Returning IPropertyNotifySink interface, but should really
|
---|
| 127 | * return a more generic event set (???) dispinterface.
|
---|
| 128 | * However, this hack, allows a control site to return with success
|
---|
| 129 | * (MFC's COleControlSite falls back to older IProvideClassInfo interface
|
---|
| 130 | * if GetGUID() fails to return a non-NULL GUID).
|
---|
| 131 | */
|
---|
| 132 | memcpy(pGUID, &IID_IPropertyNotifySink, sizeof(GUID));
|
---|
| 133 | FIXME("Wrongly returning IPropertyNotifySink interface %s\n",
|
---|
| 134 | debugstr_guid(pGUID));
|
---|
| 135 |
|
---|
| 136 | return S_OK;
|
---|
| 137 | }
|
---|
| 138 |
|
---|
| 139 | /**********************************************************************
|
---|
| 140 | * IProvideClassInfo virtual function table for IE Web Browser component
|
---|
| 141 | */
|
---|
| 142 |
|
---|
[6712] | 143 | static ICOM_VTABLE(IProvideClassInfo2) WBPCI2_Vtbl =
|
---|
[4943] | 144 | {
|
---|
| 145 | ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
---|
| 146 | WBPCI2_QueryInterface,
|
---|
| 147 | WBPCI2_AddRef,
|
---|
| 148 | WBPCI2_Release,
|
---|
| 149 | WBPCI2_GetClassInfo,
|
---|
| 150 | WBPCI2_GetGUID
|
---|
| 151 | };
|
---|
| 152 |
|
---|
| 153 | IProvideClassInfo2Impl SHDOCVW_ProvideClassInfo2 = { &WBPCI2_Vtbl, 1 };
|
---|