4 * Copyright 1998 Eric Kohl
11 #include "wine/obj_base.h"
12 #include "wine/obj_storage.h"
13 #include "wine/obj_moniker.h"
14 #include "wine/obj_dataobject.h"
19 /**************************************************************************
20 * IOleAdviseHolder Implementation
22 static HRESULT WINAPI
IOleAdviseHolder_QueryInterface(LPOLEADVISEHOLDER
,REFIID
,LPVOID
*);
23 static ULONG WINAPI
IOleAdviseHolder_AddRef(LPOLEADVISEHOLDER
);
24 static ULONG WINAPI
IOleAdviseHolder_Release(LPOLEADVISEHOLDER
);
25 static HRESULT WINAPI
IOleAdviseHolder_Advise(LPOLEADVISEHOLDER
, IAdviseSink
*, DWORD
*);
26 static HRESULT WINAPI
IOleAdviseHolder_Unadvise (LPOLEADVISEHOLDER
, DWORD
);
27 static HRESULT WINAPI
IOleAdviseHolder_EnumAdvise (LPOLEADVISEHOLDER
, IEnumSTATDATA
**);
28 static HRESULT WINAPI
IOleAdviseHolder_SendOnRename (LPOLEADVISEHOLDER
, IMoniker
*);
29 static HRESULT WINAPI
IOleAdviseHolder_SendOnSave (LPOLEADVISEHOLDER
this);
30 static HRESULT WINAPI
IOleAdviseHolder_SendOnClose (LPOLEADVISEHOLDER
this);
33 /**************************************************************************
34 * IOleAdviseHolder_VTable
36 static IOleAdviseHolder_VTable oahvt
=
38 IOleAdviseHolder_QueryInterface
,
39 IOleAdviseHolder_AddRef
,
40 IOleAdviseHolder_Release
,
41 IOleAdviseHolder_Advise
,
42 IOleAdviseHolder_Unadvise
,
43 IOleAdviseHolder_EnumAdvise
,
44 IOleAdviseHolder_SendOnRename
,
45 IOleAdviseHolder_SendOnSave
,
46 IOleAdviseHolder_SendOnClose
49 /**************************************************************************
50 * IOleAdviseHolder_Constructor
53 LPOLEADVISEHOLDER
IOleAdviseHolder_Constructor()
55 LPOLEADVISEHOLDER lpoah
;
57 lpoah
= (LPOLEADVISEHOLDER
)HeapAlloc(GetProcessHeap(),0,sizeof(IOleAdviseHolder
));
59 lpoah
->lpvtbl
= &oahvt
;
60 FIXME (ole
, "(%p)->()\n", lpoah
);
65 /**************************************************************************
66 * IOleAdviseHolder_QueryInterface
69 IOleAdviseHolder_QueryInterface (LPOLEADVISEHOLDER
this, REFIID riid
, LPVOID
*ppvObj
)
72 WINE_StringFromCLSID((LPCLSID
)riid
,xriid
);
73 FIXME (ole
, "(%p)->(\n\tIID:\t%s)\n", this, xriid
);
77 if(IsEqualIID(riid
, &IID_IUnknown
)) {
81 else if(IsEqualIID(riid
, &IID_IOleAdviseHolder
)) {
82 /* IOleAdviseHolder */
83 *ppvObj
= (IOleAdviseHolder
*) this;
87 (*(LPOLEADVISEHOLDER
*)ppvObj
)->lpvtbl
->fnAddRef(this);
88 FIXME (ole
, "-- Interface: (%p)->(%p)\n", ppvObj
, *ppvObj
);
92 FIXME (ole
, "-- Interface: E_NOINTERFACE\n");
96 /******************************************************************************
97 * IOleAdviseHolder_AddRef
100 IOleAdviseHolder_AddRef (LPOLEADVISEHOLDER
this)
102 FIXME (ole
, "(%p)->(count=%lu)\n", this, this->ref
);
103 return ++(this->ref
);
106 /******************************************************************************
107 * IOleAdviseHolder_Release
110 IOleAdviseHolder_Release (LPOLEADVISEHOLDER
this)
112 FIXME (ole
, "(%p)->(count=%lu)\n", this, this->ref
);
113 if (!--(this->ref
)) {
114 FIXME (ole
, "-- destroying IOleAdviseHolder(%p)\n", this);
115 HeapFree(GetProcessHeap(),0,this);
121 /******************************************************************************
122 * IOleAdviseHolder_Advise
124 static HRESULT WINAPI
125 IOleAdviseHolder_Advise (LPOLEADVISEHOLDER
this,
126 IAdviseSink
*pAdvise
, DWORD
*pdwConnection
)
128 FIXME (ole
, "(%p)->(%p %p)\n", this, pAdvise
, pdwConnection
);
135 /******************************************************************************
136 * IOleAdviseHolder_Unadvise
138 static HRESULT WINAPI
139 IOleAdviseHolder_Unadvise (LPOLEADVISEHOLDER
this, DWORD dwConnection
)
141 FIXME (ole
, "(%p)->(%lu)\n", this, dwConnection
);
146 /******************************************************************************
147 * IOleAdviseHolder_EnumAdvise
149 static HRESULT WINAPI
150 IOleAdviseHolder_EnumAdvise (LPOLEADVISEHOLDER
this, IEnumSTATDATA
**ppenumAdvise
)
152 FIXME (ole
, "(%p)->(%p)\n", this, ppenumAdvise
);
154 *ppenumAdvise
= NULL
;
159 /******************************************************************************
160 * IOleAdviseHolder_SendOnRename
162 static HRESULT WINAPI
163 IOleAdviseHolder_SendOnRename (LPOLEADVISEHOLDER
this, IMoniker
*pmk
)
165 FIXME (ole
, "(%p)->(%p)\n", this, pmk
);
171 /******************************************************************************
172 * IOleAdviseHolder_SendOnSave
174 static HRESULT WINAPI
175 IOleAdviseHolder_SendOnSave (LPOLEADVISEHOLDER
this)
177 FIXME (ole
, "(%p)\n", this);
183 /******************************************************************************
184 * IOleAdviseHolder_SendOnClose
186 static HRESULT WINAPI
187 IOleAdviseHolder_SendOnClose (LPOLEADVISEHOLDER
this)
189 FIXME (ole
, "(%p)\n", this);
195 /***********************************************************************
199 /***********************************************************************
200 * CreateOleAdviseHolder [OLE32.59]
202 HRESULT WINAPI
CreateOleAdviseHolder (LPOLEADVISEHOLDER
*ppOAHolder
)
204 FIXME(ole
,"(%p): stub!\n", ppOAHolder
);
206 *ppOAHolder
= IOleAdviseHolder_Constructor ();
211 return E_OUTOFMEMORY
;