4 * Copyright 1997 Marcus Meissner
6 * currently work in progress on IShellFolders,IEnumIDList and pidl handling
7 * <contact juergen.schmied@metronet.de, 980624>
17 #include "interfaces.h"
21 /******************************************************************************
22 * IEnumIDList implementation
25 static ULONG WINAPI
IEnumIDList_AddRef(LPENUMIDLIST
this) {
26 TRACE(ole
,"(%p)->()\n",this);
30 static ULONG WINAPI
IEnumIDList_Release(LPENUMIDLIST
this) {
31 TRACE(ole
,"(%p)->()\n",this);
33 WARN(ole
," freeing IEnumIDList(%p)\n",this);
34 HeapFree(GetProcessHeap(),0,this);
40 static HRESULT WINAPI
IEnumIDList_Next(
41 LPENUMIDLIST
this,ULONG celt
,LPITEMIDLIST
*rgelt
,ULONG
*pceltFetched
43 FIXME(ole
,"(%p)->(%ld,%p,%p),stub!\n",
44 this,celt
,rgelt
,pceltFetched
46 *pceltFetched
= 0; /* we don't have any ... */
50 static IEnumIDList_VTable eidlvt
= {
60 LPENUMIDLIST
IEnumIDList_Constructor() {
63 lpeidl
= (LPENUMIDLIST
)HeapAlloc(GetProcessHeap(),0,sizeof(IEnumIDList
));
65 lpeidl
->lpvtbl
= &eidlvt
;
69 /******************************************************************************
70 * IShellFolder implementation
72 static ULONG WINAPI
IShellFolder_Release(LPSHELLFOLDER
this) {
73 TRACE(ole
,"(%p)->(count=%lu)\n",this,this->ref
);
75 WARN(ole
," freeing IShellFolder(%p)\n",this);
76 HeapFree(GetProcessHeap(),0,this);
82 static ULONG WINAPI
IShellFolder_AddRef(LPSHELLFOLDER
this) {
83 TRACE(ole
,"(%p)->(count=%lu)\n",this,(this->ref
)+1);
87 static HRESULT WINAPI
IShellFolder_GetAttributesOf(
88 LPSHELLFOLDER
this,UINT32 cidl
,LPCITEMIDLIST
*apidl
,DWORD
*rgfInOut
90 FIXME(ole
,"\n (%p)->(%d,%p->(%p),%p),stub!\n",
91 this,cidl
,apidl
,*apidl
,rgfInOut
96 /*---------------------------------------------------------------
97 ! IShellFolder_BindToObject
100 static HRESULT WINAPI
IShellFolder_BindToObject(
101 LPSHELLFOLDER
this,LPCITEMIDLIST pidl
,LPBC pbcReserved
,
102 REFIID riid
,LPVOID
* ppvOut
)
105 WINE_StringFromCLSID(riid
,xclsid
);
107 FIXME(ole
,"(%p)->(pidl:%p,%p,%s,%p),stub!\n",this,pidl
,pbcReserved
,xclsid
,ppvOut
);
108 *ppvOut
= IShellFolder_Constructor();
112 /*---------------------------------------------------------------
113 ! IShellFolder_ParseDisplayName
116 static HRESULT WINAPI
IShellFolder_ParseDisplayName(
117 LPSHELLFOLDER
this,HWND32 hwndOwner
,LPBC pbcReserved
,
118 LPOLESTR32 lpszDisplayName
,DWORD
*pchEaten
,LPITEMIDLIST
*ppidl
,
120 ) { TRACE(ole
,"(%p)->(%08x,%p,%p=%s,%p,%p,%p)\n",
121 this,hwndOwner
,pbcReserved
,lpszDisplayName
,debugstr_w(lpszDisplayName
),pchEaten
,ppidl
,pdwAttributes
124 // *(DWORD*)pbcReserved = 0;
126 *ppidl
= (LPITEMIDLIST
)HeapAlloc(GetProcessHeap(),0,sizeof(ITEMIDLIST
));
127 (*ppidl
)->mkid
.cb
= 0x0; /*the first ITEMIDLIST*/
128 (*ppidl
)->mkid
.abID
[0] = 0x0; /*the first ITEMIDLIST*/
130 // ((LPITEMIDLIST) (((LPBYTE)ppidl)+4) )->mkid.cb=0; /*the second ITEMIDLIST*/
131 // ((LPITEMIDLIST) (((LPBYTE)ppidl)+4) )->mkid.abID[0]=0; /*the second ITEMIDLIST*/
132 FIXME(shell
, "return dummy ITEMIDLIST only (pidl %p)\n",*ppidl
);
134 /* it is NULL if the caller don't request attributes*/
136 { *pdwAttributes
=SFGAO_FOLDER
;
139 //*pchEaten = lstrlen32W(lpszDisplayName); /* number of char's parsed*/
140 //TRACE(shell,"%1 chars parsed",*pchEaten)
144 static HRESULT WINAPI
IShellFolder_EnumObjects(
145 LPSHELLFOLDER
this,HWND32 hwndOwner
,DWORD grfFlags
,
146 LPENUMIDLIST
* ppenumIDList
148 FIXME(ole
,"(%p)->(0x%04x,0x%08lx,%p),stub!\n",
149 this,hwndOwner
,grfFlags
,ppenumIDList
151 *ppenumIDList
= IEnumIDList_Constructor();
155 static HRESULT WINAPI
IShellFolder_CreateViewObject(
156 LPSHELLFOLDER
this,HWND32 hwndOwner
,REFIID riid
,LPVOID
*ppv
160 WINE_StringFromCLSID(riid
,xclsid
);
161 FIXME(ole
,"(%p)->(0x%04x,%s,%p),stub!\n",
162 this,hwndOwner
,xclsid
,ppv
169 static struct IShellFolder_VTable sfvt
= {
172 IShellFolder_Release
,
173 IShellFolder_ParseDisplayName
,
174 IShellFolder_EnumObjects
,
175 IShellFolder_BindToObject
,
178 IShellFolder_CreateViewObject
,
179 IShellFolder_GetAttributesOf
,
185 LPSHELLFOLDER
IShellFolder_Constructor() {
187 sf
= (LPSHELLFOLDER
)HeapAlloc(GetProcessHeap(),0,sizeof(IShellFolder
));
190 TRACE(ole
,"(%p)->()\n",sf
);
194 static struct IShellLink_VTable slvt
= {
218 LPSHELLLINK
IShellLink_Constructor() {
221 sl
= (LPSHELLLINK
)HeapAlloc(GetProcessHeap(),0,sizeof(IShellLink
));