SHELL32: implement GetAdvise and SetAdvise
Mike McCormack
mike at codeweavers.com
Thu Jan 20 20:26:33 CST 2005
ChangeLog:
* implement GetAdvise and SetAdvise
-------------- next part --------------
Index: dlls/shell32/shlview.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlview.c,v
retrieving revision 1.108
diff -u -p -r1.108 shlview.c
--- dlls/shell32/shlview.c 14 Jan 2005 16:02:20 -0000 1.108
+++ dlls/shell32/shlview.c 21 Jan 2005 02:24:34 -0000
@@ -97,6 +97,9 @@ typedef struct
LISTVIEW_SORT_INFO ListViewSortInfo;
ULONG hNotify; /* change notification handle */
HANDLE hAccel;
+ DWORD dwAspects;
+ DWORD dwAdvf;
+ IAdviseSink *pAdvSink;
} IShellViewImpl;
static struct IShellViewVtbl svvt;
@@ -1664,9 +1667,12 @@ static ULONG WINAPI IShellView_fnRelease
if(This->pSF2Parent)
IShellFolder2_Release(This->pSF2Parent);
- if (This->apidl)
+ if(This->apidl)
SHFree(This->apidl);
+ if(This->pAdvSink)
+ IAdviseSink_Release(This->pAdvSink);
+
HeapFree(GetProcessHeap(),0,This);
}
return refCount;
@@ -2372,10 +2378,17 @@ static HRESULT WINAPI ISVViewObject_SetA
_ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
- FIXME("Stub: This=%p\n",This);
+ FIXME("partial stub: %p %08lx %08lx %p\n",
+ This, aspects, advf, pAdvSink);
- return E_NOTIMPL;
+ /* FIXME: we set the AdviseSink, but never use it to send any advice */
+ This->pAdvSink = pAdvSink;
+ This->dwAspects = aspects;
+ This->dwAdvf = advf;
+
+ return S_OK;
}
+
static HRESULT WINAPI ISVViewObject_GetAdvise(
IViewObject *iface,
DWORD* pAspects,
@@ -2385,9 +2398,20 @@ static HRESULT WINAPI ISVViewObject_GetA
_ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
- FIXME("Stub: This=%p\n",This);
+ TRACE("This=%p pAspects=%p pAdvf=%p ppAdvSink=%p\n",
+ This, pAspects, pAdvf, ppAdvSink);
- return E_NOTIMPL;
+ if( ppAdvSink )
+ {
+ IAdviseSink_AddRef( This->pAdvSink );
+ *ppAdvSink = This->pAdvSink;
+ }
+ if( pAspects )
+ *pAspects = This->dwAspects;
+ if( pAdvf )
+ *pAdvf = This->dwAdvf;
+
+ return S_OK;
}
More information about the wine-patches
mailing list