4 * Copyright 1998 Eric Kohl
14 DEFAULT_DEBUG_CHANNEL(ole)
17 /**************************************************************************
18 * IOleAdviseHolder Implementation
22 ICOM_VTABLE(IOleAdviseHolder)* lpvtbl;
24 } IOleAdviseHolderImpl;
26 static HRESULT WINAPI IOleAdviseHolder_fnQueryInterface(LPOLEADVISEHOLDER,REFIID,LPVOID*);
27 static ULONG WINAPI IOleAdviseHolder_fnAddRef(LPOLEADVISEHOLDER);
28 static ULONG WINAPI IOleAdviseHolder_fnRelease(LPOLEADVISEHOLDER);
29 static HRESULT WINAPI IOleAdviseHolder_fnAdvise(LPOLEADVISEHOLDER, IAdviseSink*, DWORD*);
30 static HRESULT WINAPI IOleAdviseHolder_fnUnadvise (LPOLEADVISEHOLDER, DWORD);
31 static HRESULT WINAPI IOleAdviseHolder_fnEnumAdvise (LPOLEADVISEHOLDER, IEnumSTATDATA **);
32 static HRESULT WINAPI IOleAdviseHolder_fnSendOnRename (LPOLEADVISEHOLDER, IMoniker *);
33 static HRESULT WINAPI IOleAdviseHolder_fnSendOnSave (LPOLEADVISEHOLDER);
34 static HRESULT WINAPI IOleAdviseHolder_fnSendOnClose (LPOLEADVISEHOLDER);
37 /**************************************************************************
38 * IOleAdviseHolder_VTable
40 static struct ICOM_VTABLE(IOleAdviseHolder) oahvt =
42 IOleAdviseHolder_fnQueryInterface,
43 IOleAdviseHolder_fnAddRef,
44 IOleAdviseHolder_fnRelease,
45 IOleAdviseHolder_fnAdvise,
46 IOleAdviseHolder_fnUnadvise,
47 IOleAdviseHolder_fnEnumAdvise,
48 IOleAdviseHolder_fnSendOnRename,
49 IOleAdviseHolder_fnSendOnSave,
50 IOleAdviseHolder_fnSendOnClose
53 /**************************************************************************
54 * IOleAdviseHolder_Constructor
57 LPOLEADVISEHOLDER IOleAdviseHolder_Constructor()
59 IOleAdviseHolderImpl* lpoah;
61 lpoah= (IOleAdviseHolderImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IOleAdviseHolderImpl));
63 lpoah->lpvtbl = &oahvt;
64 FIXME (ole, "(%p)->()\n", lpoah);
66 return (LPOLEADVISEHOLDER)lpoah;
69 /**************************************************************************
70 * IOleAdviseHolder_QueryInterface
73 IOleAdviseHolder_fnQueryInterface (LPOLEADVISEHOLDER iface, REFIID riid, LPVOID *ppvObj)
75 ICOM_THIS(IOleAdviseHolderImpl, iface);
77 WINE_StringFromCLSID((LPCLSID)riid,xriid);
78 FIXME (ole, "(%p)->(\n\tIID:\t%s)\n", This, xriid);
82 if(IsEqualIID(riid, &IID_IUnknown)) {
86 else if(IsEqualIID(riid, &IID_IOleAdviseHolder)) {
87 /* IOleAdviseHolder */
88 *ppvObj = (IOleAdviseHolder*) This;
92 (*(LPOLEADVISEHOLDER*)ppvObj)->lpvtbl->fnAddRef(iface);
93 FIXME (ole, "-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj);
97 FIXME (ole, "-- Interface: E_NOINTERFACE\n");
101 /******************************************************************************
102 * IOleAdviseHolder_AddRef
105 IOleAdviseHolder_fnAddRef (LPOLEADVISEHOLDER iface)
107 ICOM_THIS(IOleAdviseHolderImpl, iface);
108 FIXME (ole, "(%p)->(count=%lu)\n", This, This->ref);
109 return ++(This->ref);
112 /******************************************************************************
113 * IOleAdviseHolder_Release
116 IOleAdviseHolder_fnRelease (LPOLEADVISEHOLDER iface)
118 ICOM_THIS(IOleAdviseHolderImpl, iface);
119 FIXME (ole, "(%p)->(count=%lu)\n", This, This->ref);
120 if (!--(This->ref)) {
121 FIXME (ole, "-- destroying IOleAdviseHolder(%p)\n", This);
122 HeapFree(GetProcessHeap(),0,This);
128 /******************************************************************************
129 * IOleAdviseHolder_Advise
131 static HRESULT WINAPI
132 IOleAdviseHolder_fnAdvise (LPOLEADVISEHOLDER iface,
133 IAdviseSink *pAdvise, DWORD *pdwConnection)
135 ICOM_THIS(IOleAdviseHolderImpl, iface);
136 FIXME (ole, "(%p)->(%p %p)\n", This, pAdvise, pdwConnection);
143 /******************************************************************************
144 * IOleAdviseHolder_Unadvise
146 static HRESULT WINAPI
147 IOleAdviseHolder_fnUnadvise (LPOLEADVISEHOLDER iface, DWORD dwConnection)
149 ICOM_THIS(IOleAdviseHolderImpl, iface);
150 FIXME (ole, "(%p)->(%lu)\n", This, dwConnection);
155 /******************************************************************************
156 * IOleAdviseHolder_EnumAdvise
158 static HRESULT WINAPI
159 IOleAdviseHolder_fnEnumAdvise (LPOLEADVISEHOLDER iface, IEnumSTATDATA **ppenumAdvise)
161 ICOM_THIS(IOleAdviseHolderImpl, iface);
162 FIXME (ole, "(%p)->(%p)\n", This, ppenumAdvise);
164 *ppenumAdvise = NULL;
169 /******************************************************************************
170 * IOleAdviseHolder_SendOnRename
172 static HRESULT WINAPI
173 IOleAdviseHolder_fnSendOnRename (LPOLEADVISEHOLDER iface, IMoniker *pmk)
175 ICOM_THIS(IOleAdviseHolderImpl, iface);
176 FIXME (ole, "(%p)->(%p)\n", This, pmk);
182 /******************************************************************************
183 * IOleAdviseHolder_SendOnSave
185 static HRESULT WINAPI
186 IOleAdviseHolder_fnSendOnSave (LPOLEADVISEHOLDER iface)
188 ICOM_THIS(IOleAdviseHolderImpl, iface);
189 FIXME (ole, "(%p)\n", This);
195 /******************************************************************************
196 * IOleAdviseHolder_SendOnClose
198 static HRESULT WINAPI
199 IOleAdviseHolder_fnSendOnClose (LPOLEADVISEHOLDER iface)
201 ICOM_THIS(IOleAdviseHolderImpl, iface);
202 FIXME (ole, "(%p)\n", This);
208 /***********************************************************************
212 /***********************************************************************
213 * CreateOleAdviseHolder [OLE32.59]
215 HRESULT WINAPI CreateOleAdviseHolder (LPOLEADVISEHOLDER *ppOAHolder)
217 FIXME(ole,"(%p): stub!\n", ppOAHolder);
219 *ppOAHolder = IOleAdviseHolder_Constructor ();
224 return E_OUTOFMEMORY;