- IShellFolder and IEnumIDList are using the new COM headers
- fixed sort order for folders and drives
This commit is contained in:
parent
587729f72a
commit
a3b7a40f56
@ -15,10 +15,12 @@
|
|||||||
#include "commctrl.h"
|
#include "commctrl.h"
|
||||||
#include "spy.h"
|
#include "spy.h"
|
||||||
|
|
||||||
|
#include "shlobj.h"
|
||||||
#include "wine/obj_base.h"
|
#include "wine/obj_base.h"
|
||||||
|
#include "wine/obj_enumidlist.h"
|
||||||
|
#include "wine/obj_shellfolder.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "pidl.h"
|
#include "pidl.h"
|
||||||
#include "shlobj.h"
|
|
||||||
#include "shell32_main.h"
|
#include "shell32_main.h"
|
||||||
#include "shlguid.h"
|
#include "shlguid.h"
|
||||||
|
|
||||||
@ -33,7 +35,7 @@ static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST lpifq, HTREEITEM hPar
|
|||||||
static void InitializeTreeView(HWND hwndParent)
|
static void InitializeTreeView(HWND hwndParent)
|
||||||
{
|
{
|
||||||
HIMAGELIST hImageList;
|
HIMAGELIST hImageList;
|
||||||
LPSHELLFOLDER lpsf;
|
IShellFolder * lpsf;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
hwndTreeView = GetDlgItem (hwndParent, IDD_TREEVIEW);
|
hwndTreeView = GetDlgItem (hwndParent, IDD_TREEVIEW);
|
||||||
@ -45,7 +47,7 @@ static void InitializeTreeView(HWND hwndParent)
|
|||||||
{ TreeView_SetImageList(hwndTreeView, hImageList, 0);
|
{ TreeView_SetImageList(hwndTreeView, hImageList, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr=SHGetDesktopFolder(&lpsf);
|
hr = SHGetDesktopFolder(&lpsf);
|
||||||
|
|
||||||
if (SUCCEEDED(hr) && hwndTreeView)
|
if (SUCCEEDED(hr) && hwndTreeView)
|
||||||
{ TreeView_DeleteAllItems(hwndTreeView);
|
{ TreeView_DeleteAllItems(hwndTreeView);
|
||||||
@ -53,7 +55,7 @@ static void InitializeTreeView(HWND hwndParent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{ lpsf->lpvtbl->fnRelease(lpsf);
|
{ IShellFolder_Release(lpsf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +87,7 @@ static BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPSTR l
|
|||||||
STRRET str;
|
STRRET str;
|
||||||
|
|
||||||
TRACE(shell,"%p %p %lx %p\n", lpsf, lpi, dwFlags, lpFriendlyName);
|
TRACE(shell,"%p %p %lx %p\n", lpsf, lpi, dwFlags, lpFriendlyName);
|
||||||
if (SUCCEEDED(lpsf->lpvtbl->fnGetDisplayNameOf(lpsf, lpi, dwFlags, &str)))
|
if (SUCCEEDED(IShellFolder_GetDisplayNameOf(lpsf, lpi, dwFlags, &str)))
|
||||||
{ bSuccess = StrRetToStrN (lpFriendlyName, MAX_PATH, &str, lpi);
|
{ bSuccess = StrRetToStrN (lpFriendlyName, MAX_PATH, &str, lpi);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -95,12 +97,12 @@ static BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPSTR l
|
|||||||
return bSuccess;
|
return bSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, HTREEITEM hParent)
|
static void FillTreeView(IShellFolder * lpsf, LPITEMIDLIST pidl, HTREEITEM hParent)
|
||||||
{
|
{
|
||||||
TVITEMA tvi;
|
TVITEMA tvi;
|
||||||
TVINSERTSTRUCTA tvins;
|
TVINSERTSTRUCTA tvins;
|
||||||
HTREEITEM hPrev = 0;
|
HTREEITEM hPrev = 0;
|
||||||
LPENUMIDLIST lpe=0;
|
LPENUMIDLIST lpe=0;
|
||||||
LPITEMIDLIST pidlTemp=0;
|
LPITEMIDLIST pidlTemp=0;
|
||||||
LPTV_ITEMDATA lptvid=0;
|
LPTV_ITEMDATA lptvid=0;
|
||||||
ULONG ulFetched;
|
ULONG ulFetched;
|
||||||
@ -113,12 +115,12 @@ static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, HTREEITEM hPare
|
|||||||
SetCapture(GetParent(hwndTreeView));
|
SetCapture(GetParent(hwndTreeView));
|
||||||
SetCursor(LoadCursorA(0, IDC_WAITA));
|
SetCursor(LoadCursorA(0, IDC_WAITA));
|
||||||
|
|
||||||
hr=lpsf->lpvtbl->fnEnumObjects(lpsf,hwnd, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS,&lpe);
|
hr=IShellFolder_EnumObjects(lpsf,hwnd, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS,&lpe);
|
||||||
|
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{ while (NOERROR == lpe->lpvtbl->fnNext(lpe,1,&pidlTemp,&ulFetched))
|
{ while (NOERROR == lpe->lpvtbl->fnNext(lpe,1,&pidlTemp,&ulFetched))
|
||||||
{ ULONG ulAttrs = SFGAO_HASSUBFOLDER | SFGAO_FOLDER;
|
{ ULONG ulAttrs = SFGAO_HASSUBFOLDER | SFGAO_FOLDER;
|
||||||
lpsf->lpvtbl->fnGetAttributesOf(lpsf, 1, &pidlTemp, &ulAttrs);
|
IShellFolder_GetAttributesOf(lpsf, 1, &pidlTemp, &ulAttrs);
|
||||||
if (ulAttrs & (SFGAO_HASSUBFOLDER | SFGAO_FOLDER))
|
if (ulAttrs & (SFGAO_HASSUBFOLDER | SFGAO_FOLDER))
|
||||||
{ if (ulAttrs & SFGAO_FOLDER)
|
{ if (ulAttrs & SFGAO_FOLDER)
|
||||||
{ tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
|
{ tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
|
||||||
@ -138,7 +140,7 @@ static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, HTREEITEM hPare
|
|||||||
tvi.cchTextMax = MAX_PATH;
|
tvi.cchTextMax = MAX_PATH;
|
||||||
tvi.lParam = (LPARAM)lptvid;
|
tvi.lParam = (LPARAM)lptvid;
|
||||||
|
|
||||||
lpsf->lpvtbl->fnAddRef(lpsf);
|
IShellFolder_AddRef(lpsf);
|
||||||
lptvid->lpsfParent = lpsf;
|
lptvid->lpsfParent = lpsf;
|
||||||
lptvid->lpi = ILClone(pidlTemp);
|
lptvid->lpi = ILClone(pidlTemp);
|
||||||
lptvid->lpifq = ILCombine(pidl, pidlTemp);
|
lptvid->lpifq = ILCombine(pidl, pidlTemp);
|
||||||
@ -161,15 +163,17 @@ Done:
|
|||||||
ReleaseCapture();
|
ReleaseCapture();
|
||||||
SetCursor(LoadCursorA(0, IDC_ARROWA));
|
SetCursor(LoadCursorA(0, IDC_ARROWA));
|
||||||
|
|
||||||
if (lpe) lpe->lpvtbl->fnRelease(lpe);
|
if (lpe)
|
||||||
if (pidlTemp ) SHFree(pidlTemp);
|
lpe->lpvtbl->fnRelease(lpe);
|
||||||
|
if (pidlTemp )
|
||||||
|
SHFree(pidlTemp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh)
|
static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh)
|
||||||
{
|
{
|
||||||
NMTREEVIEWA *pnmtv = (NMTREEVIEWA *)lpnmh;
|
NMTREEVIEWA *pnmtv = (NMTREEVIEWA *)lpnmh;
|
||||||
LPTV_ITEMDATA lptvid; //Long pointer to TreeView item data
|
LPTV_ITEMDATA lptvid; //Long pointer to TreeView item data
|
||||||
LPSHELLFOLDER lpsf2=0;
|
IShellFolder * lpsf2=0;
|
||||||
|
|
||||||
|
|
||||||
TRACE(shell,"%x %x %p msg=%x\n", hWnd, CtlID, lpnmh, pnmtv->hdr.code);
|
TRACE(shell,"%x %x %p msg=%x\n", hWnd, CtlID, lpnmh, pnmtv->hdr.code);
|
||||||
@ -180,7 +184,7 @@ static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh)
|
|||||||
{ case TVN_DELETEITEM:
|
{ case TVN_DELETEITEM:
|
||||||
{ FIXME(shell,"TVN_DELETEITEM\n");
|
{ FIXME(shell,"TVN_DELETEITEM\n");
|
||||||
lptvid=(LPTV_ITEMDATA)pnmtv->itemOld.lParam;
|
lptvid=(LPTV_ITEMDATA)pnmtv->itemOld.lParam;
|
||||||
lptvid->lpsfParent->lpvtbl->fnRelease(lptvid->lpsfParent);
|
IShellFolder_Release(lptvid->lpsfParent);
|
||||||
SHFree(lptvid->lpi);
|
SHFree(lptvid->lpi);
|
||||||
SHFree(lptvid->lpifq);
|
SHFree(lptvid->lpifq);
|
||||||
SHFree(lptvid);
|
SHFree(lptvid);
|
||||||
@ -193,7 +197,7 @@ static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
lptvid=(LPTV_ITEMDATA)pnmtv->itemNew.lParam;
|
lptvid=(LPTV_ITEMDATA)pnmtv->itemNew.lParam;
|
||||||
if (SUCCEEDED(lptvid->lpsfParent->lpvtbl->fnBindToObject(lptvid->lpsfParent, lptvid->lpi,0,(REFIID)&IID_IShellFolder,(LPVOID *)&lpsf2)))
|
if (SUCCEEDED(IShellFolder_BindToObject(lptvid->lpsfParent, lptvid->lpi,0,(REFIID)&IID_IShellFolder,(LPVOID *)&lpsf2)))
|
||||||
{ FillTreeView( lpsf2, lptvid->lpifq, pnmtv->itemNew.hItem );
|
{ FillTreeView( lpsf2, lptvid->lpifq, pnmtv->itemNew.hItem );
|
||||||
}
|
}
|
||||||
TreeView_SortChildren(hwndTreeView, pnmtv->itemNew.hItem, FALSE);
|
TreeView_SortChildren(hwndTreeView, pnmtv->itemNew.hItem, FALSE);
|
||||||
|
@ -266,8 +266,8 @@ static HRESULT WINAPI IContextMenu_fnInvokeCommand(IContextMenu *iface, LPCMINVO
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pidlTemp = ILCombine(This->pSFParent->mpidl, This->aPidls[i]);
|
pidlTemp = ILCombine(((IGenericSFImpl*)(This->pSFParent))->mpidl, This->aPidls[i]);
|
||||||
pidlFQ = ILCombine(This->pSFParent->pMyPidl, pidlTemp);
|
pidlFQ = ILCombine(((IGenericSFImpl*)(This->pSFParent))->pMyPidl, pidlTemp);
|
||||||
SHFree(pidlTemp);
|
SHFree(pidlTemp);
|
||||||
|
|
||||||
ZeroMemory(&sei, sizeof(sei));
|
ZeroMemory(&sei, sizeof(sei));
|
||||||
|
@ -177,6 +177,7 @@ static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMAT
|
|||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* IDataObject implementation
|
* IDataObject implementation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
/* IUnknown fields */
|
/* IUnknown fields */
|
||||||
@ -229,7 +230,7 @@ LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPSHELLFOLDER psf, LPITEMID
|
|||||||
dto->ref=1;
|
dto->ref=1;
|
||||||
dto->lpvtbl=&dtovt;
|
dto->lpvtbl=&dtovt;
|
||||||
dto->psf=psf;
|
dto->psf=psf;
|
||||||
dto->pidl=ILClone(psf->pMyPidl); /* FIXME:add a reference and don't copy*/
|
dto->pidl=ILClone(((IGenericSFImpl*)psf)->pMyPidl); /* FIXME:add a reference and don't copy*/
|
||||||
|
|
||||||
/* fill the ItemID List List */
|
/* fill the ItemID List List */
|
||||||
dto->lpill = IDLList_Constructor (8);
|
dto->lpill = IDLList_Constructor (8);
|
||||||
@ -326,7 +327,7 @@ static BOOL32 DATAOBJECT_InitFileGroupDesc(void)
|
|||||||
{ return(TRUE);
|
{ return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
cfFileGroupDesc = RegisterClipboardFormat32A(CFSTR_FILEDESCRIPTORA);
|
cfFileGroupDesc = RegisterClipboardFormatA(CFSTR_FILEDESCRIPTORA);
|
||||||
return(cfFileGroupDesc != 0);
|
return(cfFileGroupDesc != 0);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
@ -342,7 +343,7 @@ static BOOL32 DATAOBJECT_InitFileContents(void)
|
|||||||
{ return(TRUE);
|
{ return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
cfFileContents = RegisterClipboardFormat32A(CFSTR_FILECONTENTS);
|
cfFileContents = RegisterClipboardFormatA(CFSTR_FILECONTENTS);
|
||||||
return(cfFileContents != 0);
|
return(cfFileContents != 0);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
@ -8,48 +8,42 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "wine/obj_base.h"
|
#include "wine/obj_base.h"
|
||||||
|
#include "wine/obj_enumidlist.h"
|
||||||
#include "winerror.h"
|
#include "winerror.h"
|
||||||
|
|
||||||
#include "pidl.h"
|
#include "pidl.h"
|
||||||
#include "shlguid.h"
|
#include "shlguid.h"
|
||||||
#include "shell32_main.h"
|
#include "shell32_main.h"
|
||||||
|
|
||||||
/* IEnumIDList Implementation */
|
typedef struct tagENUMLIST
|
||||||
static HRESULT WINAPI IEnumIDList_QueryInterface(LPENUMIDLIST,REFIID,LPVOID*);
|
{
|
||||||
static ULONG WINAPI IEnumIDList_AddRef(LPENUMIDLIST);
|
struct tagENUMLIST *pNext;
|
||||||
static ULONG WINAPI IEnumIDList_Release(LPENUMIDLIST);
|
LPITEMIDLIST pidl;
|
||||||
static HRESULT WINAPI IEnumIDList_Next(LPENUMIDLIST,ULONG,LPITEMIDLIST*,ULONG*);
|
|
||||||
static HRESULT WINAPI IEnumIDList_Skip(LPENUMIDLIST,ULONG);
|
} ENUMLIST, *LPENUMLIST;
|
||||||
static HRESULT WINAPI IEnumIDList_Reset(LPENUMIDLIST);
|
|
||||||
static HRESULT WINAPI IEnumIDList_Clone(LPENUMIDLIST,LPENUMIDLIST*);
|
typedef struct
|
||||||
static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST,LPCSTR, DWORD);
|
{
|
||||||
static BOOL WINAPI IEnumIDList_AddToEnumList(LPENUMIDLIST,LPITEMIDLIST);
|
ICOM_VTABLE(IEnumIDList)* lpvtbl;
|
||||||
static BOOL WINAPI IEnumIDList_DeleteList(LPENUMIDLIST);
|
DWORD ref;
|
||||||
|
LPENUMLIST mpFirst;
|
||||||
|
LPENUMLIST mpLast;
|
||||||
|
LPENUMLIST mpCurrent;
|
||||||
|
|
||||||
|
} IEnumIDListImpl;
|
||||||
|
|
||||||
|
static struct ICOM_VTABLE(IEnumIDList) eidlvt;
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IEnumIDList_VTable
|
* IEnumIDList_fnConstructor
|
||||||
*/
|
|
||||||
static IEnumIDList_VTable eidlvt =
|
|
||||||
{ IEnumIDList_QueryInterface,
|
|
||||||
IEnumIDList_AddRef,
|
|
||||||
IEnumIDList_Release,
|
|
||||||
IEnumIDList_Next,
|
|
||||||
IEnumIDList_Skip,
|
|
||||||
IEnumIDList_Reset,
|
|
||||||
IEnumIDList_Clone,
|
|
||||||
IEnumIDList_CreateEnumList,
|
|
||||||
IEnumIDList_AddToEnumList,
|
|
||||||
IEnumIDList_DeleteList
|
|
||||||
};
|
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* IEnumIDList_Constructor
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LPENUMIDLIST IEnumIDList_Constructor( LPCSTR lpszPath, DWORD dwFlags)
|
IEnumIDList * IEnumIDList_Constructor(
|
||||||
{ LPENUMIDLIST lpeidl;
|
LPCSTR lpszPath,
|
||||||
|
DWORD dwFlags)
|
||||||
|
{ IEnumIDListImpl* lpeidl;
|
||||||
|
|
||||||
lpeidl = (LPENUMIDLIST)HeapAlloc(GetProcessHeap(),0,sizeof(IEnumIDList));
|
lpeidl = (IEnumIDListImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IEnumIDListImpl));
|
||||||
if (! lpeidl)
|
if (! lpeidl)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@ -61,82 +55,102 @@ LPENUMIDLIST IEnumIDList_Constructor( LPCSTR lpszPath, DWORD dwFlags)
|
|||||||
|
|
||||||
TRACE(shell,"(%p)->(%s flags=0x%08lx)\n",lpeidl,debugstr_a(lpszPath),dwFlags);
|
TRACE(shell,"(%p)->(%s flags=0x%08lx)\n",lpeidl,debugstr_a(lpszPath),dwFlags);
|
||||||
|
|
||||||
if(!IEnumIDList_CreateEnumList(lpeidl, lpszPath, dwFlags))
|
if(!IEnumIDList_CreateEnumList((IEnumIDList*)lpeidl, lpszPath, dwFlags))
|
||||||
{ if (lpeidl)
|
{ if (lpeidl)
|
||||||
{ HeapFree(GetProcessHeap(),0,lpeidl);
|
{ HeapFree(GetProcessHeap(),0,lpeidl);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE(shell,"-- (%p)->()\n",lpeidl);
|
TRACE(shell,"-- (%p)->()\n",lpeidl);
|
||||||
shell32_ObjCount++;
|
shell32_ObjCount++;
|
||||||
return lpeidl;
|
return (IEnumIDList*)lpeidl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* EnumIDList_QueryInterface
|
* EnumIDList_QueryInterface
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IEnumIDList_QueryInterface(
|
static HRESULT WINAPI IEnumIDList_fnQueryInterface(
|
||||||
LPENUMIDLIST this, REFIID riid, LPVOID *ppvObj)
|
IEnumIDList * iface,
|
||||||
{ char xriid[50];
|
REFIID riid,
|
||||||
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
LPVOID *ppvObj)
|
||||||
TRACE(shell,"(%p)->(\n\tIID:\t%s,%p)\n",this,xriid,ppvObj);
|
{
|
||||||
|
ICOM_THIS(IEnumIDListImpl,iface);
|
||||||
|
|
||||||
*ppvObj = NULL;
|
char xriid[50];
|
||||||
|
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
||||||
|
TRACE(shell,"(%p)->(\n\tIID:\t%s,%p)\n",This,xriid,ppvObj);
|
||||||
|
|
||||||
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
|
*ppvObj = NULL;
|
||||||
{ *ppvObj = this;
|
|
||||||
}
|
|
||||||
else if(IsEqualIID(riid, &IID_IEnumIDList)) /*IEnumIDList*/
|
|
||||||
{ *ppvObj = (IEnumIDList*)this;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(*ppvObj)
|
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
|
||||||
{ (*(LPENUMIDLIST*)ppvObj)->lpvtbl->fnAddRef(this);
|
{ *ppvObj = This;
|
||||||
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
}
|
||||||
return S_OK;
|
else if(IsEqualIID(riid, &IID_IEnumIDList)) /*IEnumIDList*/
|
||||||
}
|
{ *ppvObj = (IEnumIDList*)This;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(*ppvObj)
|
||||||
|
{ IEnumIDList_AddRef((IEnumIDList*)*ppvObj);
|
||||||
|
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
TRACE(shell,"-- Interface: E_NOINTERFACE\n");
|
TRACE(shell,"-- Interface: E_NOINTERFACE\n");
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* IEnumIDList_AddRef
|
* IEnumIDList_fnAddRef
|
||||||
*/
|
*/
|
||||||
static ULONG WINAPI IEnumIDList_AddRef(LPENUMIDLIST this)
|
static ULONG WINAPI IEnumIDList_fnAddRef(
|
||||||
{ TRACE(shell,"(%p)->(%lu)\n",this,this->ref);
|
IEnumIDList * iface)
|
||||||
|
{
|
||||||
|
ICOM_THIS(IEnumIDListImpl,iface);
|
||||||
|
|
||||||
|
TRACE(shell,"(%p)->(%lu)\n",This,This->ref);
|
||||||
|
|
||||||
shell32_ObjCount++;
|
shell32_ObjCount++;
|
||||||
return ++(this->ref);
|
return ++(This->ref);
|
||||||
}
|
}
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* IEnumIDList_Release
|
* IEnumIDList_fnRelease
|
||||||
*/
|
*/
|
||||||
static ULONG WINAPI IEnumIDList_Release(LPENUMIDLIST this)
|
static ULONG WINAPI IEnumIDList_fnRelease(
|
||||||
{ TRACE(shell,"(%p)->(%lu)\n",this,this->ref);
|
IEnumIDList * iface)
|
||||||
|
{
|
||||||
|
ICOM_THIS(IEnumIDListImpl,iface);
|
||||||
|
|
||||||
|
TRACE(shell,"(%p)->(%lu)\n",This,This->ref);
|
||||||
|
|
||||||
shell32_ObjCount--;
|
shell32_ObjCount--;
|
||||||
|
|
||||||
if (!--(this->ref))
|
if (!--(This->ref))
|
||||||
{ TRACE(shell," destroying IEnumIDList(%p)\n",this);
|
{ TRACE(shell," destroying IEnumIDList(%p)\n",This);
|
||||||
IEnumIDList_DeleteList(this);
|
IEnumIDList_DeleteList((IEnumIDList*)This);
|
||||||
HeapFree(GetProcessHeap(),0,this);
|
HeapFree(GetProcessHeap(),0,This);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return this->ref;
|
return This->ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IEnumIDList_Next
|
* IEnumIDList_fnNext
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static HRESULT WINAPI IEnumIDList_Next(
|
static HRESULT WINAPI IEnumIDList_fnNext(
|
||||||
LPENUMIDLIST this,ULONG celt,LPITEMIDLIST * rgelt,ULONG *pceltFetched)
|
IEnumIDList * iface,
|
||||||
{ ULONG i;
|
ULONG celt,
|
||||||
|
LPITEMIDLIST * rgelt,
|
||||||
|
ULONG *pceltFetched)
|
||||||
|
{
|
||||||
|
ICOM_THIS(IEnumIDListImpl,iface);
|
||||||
|
|
||||||
|
ULONG i;
|
||||||
HRESULT hr = S_OK;
|
HRESULT hr = S_OK;
|
||||||
LPITEMIDLIST temp;
|
LPITEMIDLIST temp;
|
||||||
|
|
||||||
TRACE(shell,"(%p)->(%ld,%p, %p)\n",this,celt,rgelt,pceltFetched);
|
TRACE(shell,"(%p)->(%ld,%p, %p)\n",This,celt,rgelt,pceltFetched);
|
||||||
|
|
||||||
/* It is valid to leave pceltFetched NULL when celt is 1. Some of explorer's
|
/* It is valid to leave pceltFetched NULL when celt is 1. Some of explorer's
|
||||||
* subsystems actually use it (and so may a third party browser)
|
* subsystems actually use it (and so may a third party browser)
|
||||||
@ -151,13 +165,13 @@ static HRESULT WINAPI IEnumIDList_Next(
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0; i < celt; i++)
|
for(i = 0; i < celt; i++)
|
||||||
{ if(!(this->mpCurrent))
|
{ if(!(This->mpCurrent))
|
||||||
{ hr = S_FALSE;
|
{ hr = S_FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
temp = ILClone(this->mpCurrent->pidl);
|
temp = ILClone(This->mpCurrent->pidl);
|
||||||
rgelt[i] = temp;
|
rgelt[i] = temp;
|
||||||
this->mpCurrent = this->mpCurrent->pNext;
|
This->mpCurrent = This->mpCurrent->pNext;
|
||||||
}
|
}
|
||||||
if(pceltFetched)
|
if(pceltFetched)
|
||||||
{ *pceltFetched = i;
|
{ *pceltFetched = i;
|
||||||
@ -167,38 +181,48 @@ static HRESULT WINAPI IEnumIDList_Next(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IEnumIDList_Skip
|
* IEnumIDList_fnSkip
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IEnumIDList_Skip(
|
static HRESULT WINAPI IEnumIDList_fnSkip(
|
||||||
LPENUMIDLIST this,ULONG celt)
|
IEnumIDList * iface,ULONG celt)
|
||||||
{ DWORD dwIndex;
|
{
|
||||||
HRESULT hr = S_OK;
|
ICOM_THIS(IEnumIDListImpl,iface);
|
||||||
|
|
||||||
TRACE(shell,"(%p)->(%lu)\n",this,celt);
|
DWORD dwIndex;
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
|
||||||
for(dwIndex = 0; dwIndex < celt; dwIndex++)
|
TRACE(shell,"(%p)->(%lu)\n",This,celt);
|
||||||
{ if(!this->mpCurrent)
|
|
||||||
{ hr = S_FALSE;
|
for(dwIndex = 0; dwIndex < celt; dwIndex++)
|
||||||
break;
|
{ if(!This->mpCurrent)
|
||||||
}
|
{ hr = S_FALSE;
|
||||||
this->mpCurrent = this->mpCurrent->pNext;
|
break;
|
||||||
}
|
}
|
||||||
return hr;
|
This->mpCurrent = This->mpCurrent->pNext;
|
||||||
|
}
|
||||||
|
return hr;
|
||||||
}
|
}
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IEnumIDList_Reset
|
* IEnumIDList_fnReset
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IEnumIDList_Reset(LPENUMIDLIST this)
|
static HRESULT WINAPI IEnumIDList_fnReset(
|
||||||
{ TRACE(shell,"(%p)\n",this);
|
IEnumIDList * iface)
|
||||||
this->mpCurrent = this->mpFirst;
|
{
|
||||||
return S_OK;
|
ICOM_THIS(IEnumIDListImpl,iface);
|
||||||
|
|
||||||
|
TRACE(shell,"(%p)\n",This);
|
||||||
|
This->mpCurrent = This->mpFirst;
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IEnumIDList_Clone
|
* IEnumIDList_fnClone
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IEnumIDList_Clone(
|
static HRESULT WINAPI IEnumIDList_fnClone(
|
||||||
LPENUMIDLIST this,LPENUMIDLIST * ppenum)
|
IEnumIDList * iface,LPENUMIDLIST * ppenum)
|
||||||
{ TRACE(shell,"(%p)->() to (%p)->() E_NOTIMPL\n",this,ppenum);
|
{
|
||||||
|
ICOM_THIS(IEnumIDListImpl,iface);
|
||||||
|
|
||||||
|
TRACE(shell,"(%p)->() to (%p)->() E_NOTIMPL\n",This,ppenum);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
@ -206,16 +230,22 @@ static HRESULT WINAPI IEnumIDList_Clone(
|
|||||||
* fixme: devices not handled
|
* fixme: devices not handled
|
||||||
* fixme: add wildcards to path
|
* fixme: add wildcards to path
|
||||||
*/
|
*/
|
||||||
static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPath, DWORD dwFlags)
|
static BOOL WINAPI IEnumIDList_fnCreateEnumList(
|
||||||
{ LPITEMIDLIST pidl=NULL;
|
IEnumIDList * iface,
|
||||||
|
LPCSTR lpszPath,
|
||||||
|
DWORD dwFlags)
|
||||||
|
{
|
||||||
|
ICOM_THIS(IEnumIDListImpl,iface);
|
||||||
|
|
||||||
|
LPITEMIDLIST pidl=NULL;
|
||||||
LPPIDLDATA pData=NULL;
|
LPPIDLDATA pData=NULL;
|
||||||
WIN32_FIND_DATAA stffile;
|
WIN32_FIND_DATAA stffile;
|
||||||
HANDLE hFile;
|
HANDLE hFile;
|
||||||
DWORD dwDrivemap;
|
DWORD dwDrivemap;
|
||||||
CHAR szDriveName[4];
|
CHAR szDriveName[4];
|
||||||
CHAR szPath[MAX_PATH];
|
CHAR szPath[MAX_PATH];
|
||||||
|
|
||||||
TRACE(shell,"(%p)->(path=%s flags=0x%08lx) \n",this,debugstr_a(lpszPath),dwFlags);
|
TRACE(shell,"(%p)->(path=%s flags=0x%08lx) \n",This,debugstr_a(lpszPath),dwFlags);
|
||||||
|
|
||||||
if (lpszPath && lpszPath[0]!='\0')
|
if (lpszPath && lpszPath[0]!='\0')
|
||||||
{ strcpy(szPath, lpszPath);
|
{ strcpy(szPath, lpszPath);
|
||||||
@ -228,23 +258,23 @@ static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPath
|
|||||||
{ /* special case - we can't enumerate the Desktop level Objects (MyComputer,Nethood...
|
{ /* special case - we can't enumerate the Desktop level Objects (MyComputer,Nethood...
|
||||||
so we need to fake an enumeration of those.*/
|
so we need to fake an enumeration of those.*/
|
||||||
if(!lpszPath)
|
if(!lpszPath)
|
||||||
{ TRACE (shell,"-- (%p)-> enumerate SHCONTF_FOLDERS (special) items\n",this);
|
{ TRACE (shell,"-- (%p)-> enumerate SHCONTF_FOLDERS (special) items\n",This);
|
||||||
/*create the pidl for this item */
|
/*create the pidl for This item */
|
||||||
pidl = _ILCreateMyComputer();
|
pidl = _ILCreateMyComputer();
|
||||||
if(pidl)
|
if(pidl)
|
||||||
{ if(!IEnumIDList_AddToEnumList(this, pidl))
|
{ if(!IEnumIDList_AddToEnumList((IEnumIDList*)This, pidl))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (lpszPath[0]=='\0') /* enumerate the drives*/
|
else if (lpszPath[0]=='\0') /* enumerate the drives*/
|
||||||
{ TRACE (shell,"-- (%p)-> enumerate SHCONTF_FOLDERS (drives)\n",this);
|
{ TRACE (shell,"-- (%p)-> enumerate SHCONTF_FOLDERS (drives)\n",This);
|
||||||
dwDrivemap = GetLogicalDrives();
|
dwDrivemap = GetLogicalDrives();
|
||||||
strcpy (szDriveName,"A:\\");
|
strcpy (szDriveName,"A:\\");
|
||||||
while (szDriveName[0]<='Z')
|
while (szDriveName[0]<='Z')
|
||||||
{ if(dwDrivemap & 0x00000001L)
|
{ if(dwDrivemap & 0x00000001L)
|
||||||
{ pidl = _ILCreateDrive(szDriveName);
|
{ pidl = _ILCreateDrive(szDriveName);
|
||||||
if(pidl)
|
if(pidl)
|
||||||
{ if(!IEnumIDList_AddToEnumList(this, pidl))
|
{ if(!IEnumIDList_AddToEnumList((IEnumIDList*)This, pidl))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -252,8 +282,8 @@ static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPath
|
|||||||
dwDrivemap = dwDrivemap >> 1;
|
dwDrivemap = dwDrivemap >> 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ TRACE (shell,"-- (%p)-> enumerate SHCONTF_FOLDERS of %s\n",this,debugstr_a(szPath));
|
{ TRACE (shell,"-- (%p)-> enumerate SHCONTF_FOLDERS of %s\n",This,debugstr_a(szPath));
|
||||||
hFile = FindFirstFileA(szPath,&stffile);
|
hFile = FindFirstFileA(szPath,&stffile);
|
||||||
if ( hFile != INVALID_HANDLE_VALUE )
|
if ( hFile != INVALID_HANDLE_VALUE )
|
||||||
{ do
|
{ do
|
||||||
@ -261,10 +291,10 @@ static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPath
|
|||||||
{ pidl = _ILCreateFolder( stffile.cAlternateFileName, stffile.cFileName);
|
{ pidl = _ILCreateFolder( stffile.cAlternateFileName, stffile.cFileName);
|
||||||
if(pidl)
|
if(pidl)
|
||||||
{ pData = _ILGetDataPointer(pidl);
|
{ pData = _ILGetDataPointer(pidl);
|
||||||
FileTimeToDosDateTime(&stffile.ftLastWriteTime,&pData->u.folder.uFileDate,&pData->u.folder.uFileTime);
|
FileTimeToDosDateTime(&stffile.ftLastWriteTime,&pData->u.folder.uFileDate,&pData->u.folder.uFileTime);
|
||||||
pData->u.folder.dwFileSize = stffile.nFileSizeLow;
|
pData->u.folder.dwFileSize = stffile.nFileSizeLow;
|
||||||
pData->u.folder.uFileAttribs=stffile.dwFileAttributes;
|
pData->u.folder.uFileAttribs=stffile.dwFileAttributes;
|
||||||
if(!IEnumIDList_AddToEnumList(this, pidl))
|
if(!IEnumIDList_AddToEnumList((IEnumIDList*)This, pidl))
|
||||||
{ return FALSE;
|
{ return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -280,7 +310,7 @@ static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPath
|
|||||||
/*enumerate the non-folder items (values) */
|
/*enumerate the non-folder items (values) */
|
||||||
if(dwFlags & SHCONTF_NONFOLDERS)
|
if(dwFlags & SHCONTF_NONFOLDERS)
|
||||||
{ if(lpszPath)
|
{ if(lpszPath)
|
||||||
{ TRACE (shell,"-- (%p)-> enumerate SHCONTF_NONFOLDERS of %s\n",this,debugstr_a(szPath));
|
{ TRACE (shell,"-- (%p)-> enumerate SHCONTF_NONFOLDERS of %s\n",This,debugstr_a(szPath));
|
||||||
hFile = FindFirstFileA(szPath,&stffile);
|
hFile = FindFirstFileA(szPath,&stffile);
|
||||||
if ( hFile != INVALID_HANDLE_VALUE )
|
if ( hFile != INVALID_HANDLE_VALUE )
|
||||||
{ do
|
{ do
|
||||||
@ -288,10 +318,10 @@ static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPath
|
|||||||
{ pidl = _ILCreateValue( stffile.cAlternateFileName, stffile.cFileName);
|
{ pidl = _ILCreateValue( stffile.cAlternateFileName, stffile.cFileName);
|
||||||
if(pidl)
|
if(pidl)
|
||||||
{ pData = _ILGetDataPointer(pidl);
|
{ pData = _ILGetDataPointer(pidl);
|
||||||
FileTimeToDosDateTime(&stffile.ftLastWriteTime,&pData->u.file.uFileDate,&pData->u.file.uFileTime);
|
FileTimeToDosDateTime(&stffile.ftLastWriteTime,&pData->u.file.uFileDate,&pData->u.file.uFileTime);
|
||||||
pData->u.file.dwFileSize = stffile.nFileSizeLow;
|
pData->u.file.dwFileSize = stffile.nFileSizeLow;
|
||||||
pData->u.file.uFileAttribs=stffile.dwFileAttributes;
|
pData->u.file.uFileAttribs=stffile.dwFileAttributes;
|
||||||
if(!IEnumIDList_AddToEnumList(this, pidl))
|
if(!IEnumIDList_AddToEnumList((IEnumIDList*)This, pidl))
|
||||||
{ return FALSE;
|
{ return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -310,30 +340,35 @@ static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPath
|
|||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* EnumIDList_AddToEnumList()
|
* EnumIDList_AddToEnumList()
|
||||||
*/
|
*/
|
||||||
static BOOL WINAPI IEnumIDList_AddToEnumList(LPENUMIDLIST this,LPITEMIDLIST pidl)
|
static BOOL WINAPI IEnumIDList_fnAddToEnumList(
|
||||||
{ LPENUMLIST pNew;
|
IEnumIDList * iface,
|
||||||
|
LPITEMIDLIST pidl)
|
||||||
|
{
|
||||||
|
ICOM_THIS(IEnumIDListImpl,iface);
|
||||||
|
|
||||||
TRACE(shell,"(%p)->(pidl=%p)\n",this,pidl);
|
LPENUMLIST pNew;
|
||||||
|
|
||||||
|
TRACE(shell,"(%p)->(pidl=%p)\n",This,pidl);
|
||||||
pNew = (LPENUMLIST)SHAlloc(sizeof(ENUMLIST));
|
pNew = (LPENUMLIST)SHAlloc(sizeof(ENUMLIST));
|
||||||
if(pNew)
|
if(pNew)
|
||||||
{ /*set the next pointer */
|
{ /*set the next pointer */
|
||||||
pNew->pNext = NULL;
|
pNew->pNext = NULL;
|
||||||
pNew->pidl = pidl;
|
pNew->pidl = pidl;
|
||||||
|
|
||||||
/*is this the first item in the list? */
|
/*is This the first item in the list? */
|
||||||
if(!this->mpFirst)
|
if(!This->mpFirst)
|
||||||
{ this->mpFirst = pNew;
|
{ This->mpFirst = pNew;
|
||||||
this->mpCurrent = pNew;
|
This->mpCurrent = pNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this->mpLast)
|
if(This->mpLast)
|
||||||
{ /*add the new item to the end of the list */
|
{ /*add the new item to the end of the list */
|
||||||
this->mpLast->pNext = pNew;
|
This->mpLast->pNext = pNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*update the last item pointer */
|
/*update the last item pointer */
|
||||||
this->mpLast = pNew;
|
This->mpLast = pNew;
|
||||||
TRACE(shell,"-- (%p)->(first=%p, last=%p)\n",this,this->mpFirst,this->mpLast);
|
TRACE(shell,"-- (%p)->(first=%p, last=%p)\n",This,This->mpFirst,This->mpLast);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -341,17 +376,37 @@ static BOOL WINAPI IEnumIDList_AddToEnumList(LPENUMIDLIST this,LPITEMIDLIST pidl
|
|||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* EnumIDList_DeleteList()
|
* EnumIDList_DeleteList()
|
||||||
*/
|
*/
|
||||||
static BOOL WINAPI IEnumIDList_DeleteList(LPENUMIDLIST this)
|
static BOOL WINAPI IEnumIDList_fnDeleteList(
|
||||||
{ LPENUMLIST pDelete;
|
IEnumIDList * iface)
|
||||||
|
{
|
||||||
|
ICOM_THIS(IEnumIDListImpl,iface);
|
||||||
|
|
||||||
TRACE(shell,"(%p)->()\n",this);
|
LPENUMLIST pDelete;
|
||||||
|
|
||||||
|
TRACE(shell,"(%p)->()\n",This);
|
||||||
|
|
||||||
while(this->mpFirst)
|
while(This->mpFirst)
|
||||||
{ pDelete = this->mpFirst;
|
{ pDelete = This->mpFirst;
|
||||||
this->mpFirst = pDelete->pNext;
|
This->mpFirst = pDelete->pNext;
|
||||||
SHFree(pDelete->pidl);
|
SHFree(pDelete->pidl);
|
||||||
SHFree(pDelete);
|
SHFree(pDelete);
|
||||||
}
|
}
|
||||||
this->mpFirst = this->mpLast = this->mpCurrent = NULL;
|
This->mpFirst = This->mpLast = This->mpCurrent = NULL;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* IEnumIDList_fnVTable
|
||||||
|
*/
|
||||||
|
static ICOM_VTABLE (IEnumIDList) eidlvt =
|
||||||
|
{ IEnumIDList_fnQueryInterface,
|
||||||
|
IEnumIDList_fnAddRef,
|
||||||
|
IEnumIDList_fnRelease,
|
||||||
|
IEnumIDList_fnNext,
|
||||||
|
IEnumIDList_fnSkip,
|
||||||
|
IEnumIDList_fnReset,
|
||||||
|
IEnumIDList_fnClone,
|
||||||
|
IEnumIDList_fnCreateEnumList,
|
||||||
|
IEnumIDList_fnAddToEnumList,
|
||||||
|
IEnumIDList_fnDeleteList
|
||||||
|
};
|
||||||
|
@ -74,7 +74,6 @@ HANDLE WINAPI SHFreeShared(HANDLE hmem, DWORD procID);
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Class constructors
|
* Class constructors
|
||||||
*/
|
*/
|
||||||
#ifdef __WINE__
|
|
||||||
extern LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPSHELLFOLDER psf, LPITEMIDLIST * apidl, UINT cidl);
|
extern LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPSHELLFOLDER psf, LPITEMIDLIST * apidl, UINT cidl);
|
||||||
extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []);
|
extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []);
|
||||||
|
|
||||||
@ -83,12 +82,23 @@ extern LPCLASSFACTORY IShellLinkW_CF_Constructor(void);
|
|||||||
|
|
||||||
extern LPCLASSFACTORY IClassFactory_Constructor(void);
|
extern LPCLASSFACTORY IClassFactory_Constructor(void);
|
||||||
extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT);
|
extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT);
|
||||||
extern LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER,LPITEMIDLIST);
|
|
||||||
extern LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER, LPCITEMIDLIST);
|
extern LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER, LPCITEMIDLIST);
|
||||||
extern LPSHELLLINK IShellLink_Constructor(void);
|
extern LPSHELLLINK IShellLink_Constructor(void);
|
||||||
extern LPSHELLLINKW IShellLinkW_Constructor(void);
|
extern LPSHELLLINKW IShellLinkW_Constructor(void);
|
||||||
extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD);
|
extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD);
|
||||||
extern LPEXTRACTICON IExtractIcon_Constructor(LPITEMIDLIST);
|
extern LPEXTRACTICON IExtractIcon_Constructor(LPITEMIDLIST);
|
||||||
#endif
|
|
||||||
|
/* elements of this structure are accessed directly from within shell32 */
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
ICOM_VTABLE(IShellFolder)* lpvtbl;
|
||||||
|
DWORD ref;
|
||||||
|
ICOM_VTABLE(IPersistFolder)* lpvtblPersistFolder;
|
||||||
|
|
||||||
|
LPSTR sMyPath;
|
||||||
|
LPITEMIDLIST pMyPidl;
|
||||||
|
LPITEMIDLIST mpidl;
|
||||||
|
} IGenericSFImpl;
|
||||||
|
extern LPSHELLFOLDER IShellFolder_Constructor(IGenericSFImpl*,LPITEMIDLIST);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -7,4 +7,17 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#define INITGUID
|
#define INITGUID
|
||||||
#include "shlguid.h"
|
|
||||||
|
/* #include "shlguid.h" */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Francis Beaudet <francis@macadamian.com>
|
||||||
|
*
|
||||||
|
* I moved the contents of this file to the ole/guid.c file.
|
||||||
|
*
|
||||||
|
* I know that the purpose of this file being here is that it would
|
||||||
|
* separate the definitions reserved to the shell DLL into one place. *
|
||||||
|
However, until the shell DLL is a real DLL, as long as it is *
|
||||||
|
statically linked with the rest of wine, the initializer of it's * GUIDs
|
||||||
|
will have to be in the same place as everybody else. This is * the same
|
||||||
|
problem as with "real" Windows programs. */
|
||||||
|
@ -16,25 +16,11 @@
|
|||||||
#include "shlguid.h"
|
#include "shlguid.h"
|
||||||
|
|
||||||
#include "pidl.h"
|
#include "pidl.h"
|
||||||
#include "shlobj.h"
|
#include "wine/obj_base.h"
|
||||||
|
#include "wine/obj_dragdrop.h"
|
||||||
|
#include "wine/obj_shellfolder.h"
|
||||||
#include "shell32_main.h"
|
#include "shell32_main.h"
|
||||||
|
|
||||||
static HRESULT WINAPI IShellFolder_QueryInterface(LPSHELLFOLDER,REFIID,LPVOID*);
|
|
||||||
static ULONG WINAPI IShellFolder_AddRef(LPSHELLFOLDER);
|
|
||||||
static ULONG WINAPI IShellFolder_Release(LPSHELLFOLDER);
|
|
||||||
static HRESULT WINAPI WINE_UNUSED IShellFolder_Initialize(LPSHELLFOLDER,LPCITEMIDLIST);
|
|
||||||
static HRESULT WINAPI IShellFolder_ParseDisplayName(LPSHELLFOLDER,HWND,LPBC,LPOLESTR,DWORD*,LPITEMIDLIST*,DWORD*);
|
|
||||||
static HRESULT WINAPI IShellFolder_EnumObjects(LPSHELLFOLDER,HWND,DWORD,LPENUMIDLIST*);
|
|
||||||
static HRESULT WINAPI IShellFolder_BindToObject(LPSHELLFOLDER,LPCITEMIDLIST,LPBC,REFIID,LPVOID*);
|
|
||||||
static HRESULT WINAPI IShellFolder_BindToStorage(LPSHELLFOLDER,LPCITEMIDLIST,LPBC,REFIID,LPVOID*);
|
|
||||||
static HRESULT WINAPI IShellFolder_CompareIDs(LPSHELLFOLDER,LPARAM,LPCITEMIDLIST,LPCITEMIDLIST);
|
|
||||||
static HRESULT WINAPI IShellFolder_CreateViewObject(LPSHELLFOLDER,HWND,REFIID,LPVOID*);
|
|
||||||
static HRESULT WINAPI IShellFolder_GetAttributesOf(LPSHELLFOLDER,UINT,LPCITEMIDLIST*,DWORD*);
|
|
||||||
static HRESULT WINAPI IShellFolder_GetUIObjectOf(LPSHELLFOLDER,HWND,UINT,LPCITEMIDLIST*,REFIID,UINT*,LPVOID*);
|
|
||||||
static HRESULT WINAPI IShellFolder_GetDisplayNameOf(LPSHELLFOLDER,LPCITEMIDLIST,DWORD,LPSTRRET);
|
|
||||||
static HRESULT WINAPI IShellFolder_SetNameOf(LPSHELLFOLDER,HWND,LPCITEMIDLIST,LPCOLESTR,DWORD,LPITEMIDLIST*);
|
|
||||||
static BOOL WINAPI IShellFolder_GetFolderPath(LPSHELLFOLDER,LPSTR,DWORD);
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* IDropTarget interface definition for the ShellFolder
|
* IDropTarget interface definition for the ShellFolder
|
||||||
*/
|
*/
|
||||||
@ -226,32 +212,28 @@ LPSTR GetNextElement(LPSTR pszNext,LPSTR pszOut,DWORD dwOut)
|
|||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* IShellFolder implementation
|
* IShellFolder implementation
|
||||||
*/
|
*/
|
||||||
static struct IShellFolder_VTable sfvt =
|
|
||||||
{ IShellFolder_QueryInterface,
|
static struct ICOM_VTABLE(IShellFolder) sfvt;
|
||||||
IShellFolder_AddRef,
|
static struct ICOM_VTABLE(IPersistFolder) psfvt;
|
||||||
IShellFolder_Release,
|
|
||||||
IShellFolder_ParseDisplayName,
|
#define _IPersistFolder_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblPersistFolder)))
|
||||||
IShellFolder_EnumObjects,
|
#define _ICOM_THIS_From_IPersistFolder(class, name) class* This = (class*)(((void*)name)-_IPersistFolder_Offset);
|
||||||
IShellFolder_BindToObject,
|
|
||||||
IShellFolder_BindToStorage,
|
|
||||||
IShellFolder_CompareIDs,
|
|
||||||
IShellFolder_CreateViewObject,
|
|
||||||
IShellFolder_GetAttributesOf,
|
|
||||||
IShellFolder_GetUIObjectOf,
|
|
||||||
IShellFolder_GetDisplayNameOf,
|
|
||||||
IShellFolder_SetNameOf,
|
|
||||||
IShellFolder_GetFolderPath
|
|
||||||
};
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IShellFolder_Constructor
|
* IShellFolder_Constructor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER pParent,LPITEMIDLIST pidl)
|
IShellFolder * IShellFolder_Constructor(
|
||||||
{ LPSHELLFOLDER sf;
|
IGenericSFImpl * pParent,
|
||||||
DWORD dwSize=0;
|
LPITEMIDLIST pidl)
|
||||||
sf=(LPSHELLFOLDER)HeapAlloc(GetProcessHeap(),0,sizeof(IShellFolder));
|
{
|
||||||
|
IGenericSFImpl * sf;
|
||||||
|
DWORD dwSize=0;
|
||||||
|
|
||||||
|
sf=(IGenericSFImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IGenericSFImpl));
|
||||||
sf->ref=1;
|
sf->ref=1;
|
||||||
sf->lpvtbl=&sfvt;
|
sf->lpvtbl=&sfvt;
|
||||||
|
sf->lpvtblPersistFolder=&psfvt;
|
||||||
sf->sMyPath=NULL; /* path of the folder */
|
sf->sMyPath=NULL; /* path of the folder */
|
||||||
sf->pMyPidl=NULL; /* my qualified pidl */
|
sf->pMyPidl=NULL; /* my qualified pidl */
|
||||||
|
|
||||||
@ -261,7 +243,7 @@ LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER pParent,LPITEMIDLIST pidl)
|
|||||||
/* keep a copy of the pidl in the instance*/
|
/* keep a copy of the pidl in the instance*/
|
||||||
sf->mpidl = ILClone(pidl); /* my short pidl */
|
sf->mpidl = ILClone(pidl); /* my short pidl */
|
||||||
|
|
||||||
if(sf->mpidl) /* do we have a pidl? */
|
if(sf->mpidl) /* do we have a pidl? */
|
||||||
{ dwSize = 0;
|
{ dwSize = 0;
|
||||||
if(pParent->sMyPath) /* get the size of the parents path */
|
if(pParent->sMyPath) /* get the size of the parents path */
|
||||||
{ dwSize += strlen(pParent->sMyPath) ;
|
{ dwSize += strlen(pParent->sMyPath) ;
|
||||||
@ -284,31 +266,40 @@ LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER pParent,LPITEMIDLIST pidl)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
shell32_ObjCount++;
|
shell32_ObjCount++;
|
||||||
return sf;
|
return (IShellFolder *)sf;
|
||||||
}
|
}
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IShellFolder::QueryInterface
|
* IShellFolder_fnQueryInterface
|
||||||
* PARAMETERS
|
*
|
||||||
* REFIID riid, //[in ] Requested InterfaceID
|
* PARAMETERS
|
||||||
* LPVOID* ppvObject) //[out] Interface* to hold the result
|
* REFIID riid [in ] Requested InterfaceID
|
||||||
*/
|
* LPVOID* ppvObject [out] Interface* to hold the result
|
||||||
static HRESULT WINAPI IShellFolder_QueryInterface(
|
*/
|
||||||
LPSHELLFOLDER this, REFIID riid, LPVOID *ppvObj)
|
static HRESULT WINAPI IShellFolder_fnQueryInterface(
|
||||||
{ char xriid[50];
|
IShellFolder * iface,
|
||||||
|
REFIID riid,
|
||||||
|
LPVOID *ppvObj)
|
||||||
|
{
|
||||||
|
ICOM_THIS(IGenericSFImpl, iface);
|
||||||
|
|
||||||
|
char xriid[50];
|
||||||
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
||||||
TRACE(shell,"(%p)->(\n\tIID:\t%s,%p)\n",this,xriid,ppvObj);
|
TRACE(shell,"(%p)->(\n\tIID:\t%s,%p)\n",This,xriid,ppvObj);
|
||||||
|
|
||||||
*ppvObj = NULL;
|
*ppvObj = NULL;
|
||||||
|
|
||||||
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
|
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
|
||||||
{ *ppvObj = this;
|
{ *ppvObj = This;
|
||||||
}
|
}
|
||||||
else if(IsEqualIID(riid, &IID_IShellFolder)) /*IShellFolder*/
|
else if(IsEqualIID(riid, &IID_IShellFolder)) /*IShellFolder*/
|
||||||
{ *ppvObj = (IShellFolder*)this;
|
{ *ppvObj = (IShellFolder*)This;
|
||||||
|
}
|
||||||
|
else if(IsEqualIID(riid, &IID_IPersistFolder)) /*IPersistFolder*/
|
||||||
|
{ *ppvObj = (IPersistFolder*)&(This->lpvtblPersistFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(*ppvObj)
|
if(*ppvObj)
|
||||||
{ (*(LPSHELLFOLDER*)ppvObj)->lpvtbl->fnAddRef(this);
|
{ IShellFolder_AddRef((IShellFolder*)*ppvObj);
|
||||||
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
@ -320,44 +311,51 @@ static HRESULT WINAPI IShellFolder_QueryInterface(
|
|||||||
* IShellFolder::AddRef
|
* IShellFolder::AddRef
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static ULONG WINAPI IShellFolder_AddRef(LPSHELLFOLDER this)
|
static ULONG WINAPI IShellFolder_fnAddRef(IShellFolder * iface)
|
||||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
{
|
||||||
|
ICOM_THIS(IGenericSFImpl, iface);
|
||||||
|
|
||||||
|
TRACE(shell,"(%p)->(count=%lu)\n",This,This->ref);
|
||||||
|
|
||||||
shell32_ObjCount++;
|
shell32_ObjCount++;
|
||||||
return ++(this->ref);
|
return ++(This->ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IShellFolder_Release
|
* IShellFolder_fnRelease
|
||||||
*/
|
*/
|
||||||
static ULONG WINAPI IShellFolder_Release(LPSHELLFOLDER this)
|
static ULONG WINAPI IShellFolder_fnRelease(IShellFolder * iface)
|
||||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
{
|
||||||
|
ICOM_THIS(IGenericSFImpl, iface);
|
||||||
|
|
||||||
|
TRACE(shell,"(%p)->(count=%lu)\n",This,This->ref);
|
||||||
|
|
||||||
shell32_ObjCount--;
|
shell32_ObjCount--;
|
||||||
if (!--(this->ref))
|
if (!--(This->ref))
|
||||||
{ TRACE(shell,"-- destroying IShellFolder(%p)\n",this);
|
{ TRACE(shell,"-- destroying IShellFolder(%p)\n",This);
|
||||||
|
|
||||||
if (pdesktopfolder==this)
|
if (pdesktopfolder == iface)
|
||||||
{ pdesktopfolder=NULL;
|
{ pdesktopfolder=NULL;
|
||||||
TRACE(shell,"-- destroyed IShellFolder(%p) was Desktopfolder\n",this);
|
TRACE(shell,"-- destroyed IShellFolder(%p) was Desktopfolder\n",This);
|
||||||
}
|
}
|
||||||
if(this->pMyPidl)
|
if(This->pMyPidl)
|
||||||
{ SHFree(this->pMyPidl);
|
{ SHFree(This->pMyPidl);
|
||||||
}
|
}
|
||||||
if(this->mpidl)
|
if(This->mpidl)
|
||||||
{ SHFree(this->mpidl);
|
{ SHFree(This->mpidl);
|
||||||
}
|
}
|
||||||
if(this->sMyPath)
|
if(This->sMyPath)
|
||||||
{ SHFree(this->sMyPath);
|
{ SHFree(This->sMyPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(),0,this);
|
HeapFree(GetProcessHeap(),0,This);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return this->ref;
|
return This->ref;
|
||||||
}
|
}
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IShellFolder_ParseDisplayName
|
* IShellFolder_fnParseDisplayName
|
||||||
* PARAMETERS
|
* PARAMETERS
|
||||||
* HWND hwndOwner, //[in ] Parent window for any message's
|
* HWND hwndOwner, //[in ] Parent window for any message's
|
||||||
* LPBC pbc, //[in ] reserved
|
* LPBC pbc, //[in ] reserved
|
||||||
@ -369,23 +367,26 @@ static ULONG WINAPI IShellFolder_Release(LPSHELLFOLDER this)
|
|||||||
* FIXME:
|
* FIXME:
|
||||||
* pdwAttributes: not used
|
* pdwAttributes: not used
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IShellFolder_ParseDisplayName(
|
static HRESULT WINAPI IShellFolder_fnParseDisplayName(
|
||||||
LPSHELLFOLDER this,
|
IShellFolder * iface,
|
||||||
HWND hwndOwner,
|
HWND hwndOwner,
|
||||||
LPBC pbcReserved,
|
LPBC pbcReserved,
|
||||||
LPOLESTR lpszDisplayName,
|
LPOLESTR lpszDisplayName,
|
||||||
DWORD *pchEaten,
|
DWORD *pchEaten,
|
||||||
LPITEMIDLIST *ppidl,
|
LPITEMIDLIST *ppidl,
|
||||||
DWORD *pdwAttributes)
|
DWORD *pdwAttributes)
|
||||||
{ HRESULT hr=E_OUTOFMEMORY;
|
{
|
||||||
LPITEMIDLIST pidlFull=NULL, pidlTemp = NULL, pidlOld = NULL;
|
ICOM_THIS(IGenericSFImpl, iface);
|
||||||
LPSTR pszNext=NULL;
|
|
||||||
CHAR szTemp[MAX_PATH],szElement[MAX_PATH];
|
HRESULT hr=E_OUTOFMEMORY;
|
||||||
BOOL bIsFile;
|
LPITEMIDLIST pidlFull=NULL, pidlTemp = NULL, pidlOld = NULL;
|
||||||
|
LPSTR pszNext=NULL;
|
||||||
|
CHAR szTemp[MAX_PATH],szElement[MAX_PATH];
|
||||||
|
BOOL bIsFile;
|
||||||
|
|
||||||
TRACE(shell,"(%p)->(HWND=0x%08x,%p,%p=%s,%p,pidl=%p,%p)\n",
|
TRACE(shell,"(%p)->(HWND=0x%08x,%p,%p=%s,%p,pidl=%p,%p)\n",
|
||||||
this,hwndOwner,pbcReserved,lpszDisplayName,
|
This,hwndOwner,pbcReserved,lpszDisplayName,
|
||||||
debugstr_w(lpszDisplayName),pchEaten,ppidl,pdwAttributes);
|
debugstr_w(lpszDisplayName),pchEaten,ppidl,pdwAttributes);
|
||||||
|
|
||||||
{ hr = E_FAIL;
|
{ hr = E_FAIL;
|
||||||
WideCharToLocal(szTemp, lpszDisplayName, lstrlenW(lpszDisplayName) + 1);
|
WideCharToLocal(szTemp, lpszDisplayName, lstrlenW(lpszDisplayName) + 1);
|
||||||
@ -398,12 +399,12 @@ static HRESULT WINAPI IShellFolder_ParseDisplayName(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ if (!PathIsRootA(szTemp))
|
{ if (!PathIsRootA(szTemp))
|
||||||
{ if (this->sMyPath && strlen (this->sMyPath))
|
{ if (This->sMyPath && strlen (This->sMyPath))
|
||||||
{ if (strcmp(this->sMyPath,"My Computer"))
|
{ if (strcmp(This->sMyPath,"My Computer"))
|
||||||
{ strcpy (szElement,this->sMyPath);
|
{ strcpy (szElement,This->sMyPath);
|
||||||
PathAddBackslashA (szElement);
|
PathAddBackslashA (szElement);
|
||||||
strcat (szElement, szTemp);
|
strcat (szElement, szTemp);
|
||||||
strcpy (szTemp, szElement);
|
strcpy (szTemp, szElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -417,7 +418,7 @@ static HRESULT WINAPI IShellFolder_ParseDisplayName(
|
|||||||
pidlOld = pidlFull;
|
pidlOld = pidlFull;
|
||||||
pidlFull = ILCombine(pidlFull,pidlTemp);
|
pidlFull = ILCombine(pidlFull,pidlTemp);
|
||||||
SHFree(pidlOld);
|
SHFree(pidlOld);
|
||||||
|
|
||||||
if(pidlFull)
|
if(pidlFull)
|
||||||
{ while((pszNext=GetNextElement(pszNext, szElement, MAX_PATH)))
|
{ while((pszNext=GetNextElement(pszNext, szElement, MAX_PATH)))
|
||||||
{ if(!*pszNext && bIsFile)
|
{ if(!*pszNext && bIsFile)
|
||||||
@ -440,94 +441,93 @@ static HRESULT WINAPI IShellFolder_ParseDisplayName(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IShellFolder_EnumObjects
|
* IShellFolder_fnEnumObjects
|
||||||
* PARAMETERS
|
* PARAMETERS
|
||||||
* HWND hwndOwner, //[in ] Parent Window
|
* HWND hwndOwner, //[in ] Parent Window
|
||||||
* DWORD grfFlags, //[in ] SHCONTF enumeration mask
|
* DWORD grfFlags, //[in ] SHCONTF enumeration mask
|
||||||
* LPENUMIDLIST* ppenumIDList //[out] IEnumIDList interface
|
* LPENUMIDLIST* ppenumIDList //[out] IEnumIDList interface
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IShellFolder_EnumObjects(
|
static HRESULT WINAPI IShellFolder_fnEnumObjects(
|
||||||
LPSHELLFOLDER this,
|
IShellFolder * iface,
|
||||||
HWND hwndOwner,
|
HWND hwndOwner,
|
||||||
DWORD dwFlags,
|
DWORD dwFlags,
|
||||||
LPENUMIDLIST* ppEnumIDList)
|
LPENUMIDLIST* ppEnumIDList)
|
||||||
{ TRACE(shell,"(%p)->(HWND=0x%08x flags=0x%08lx pplist=%p)\n",this,hwndOwner,dwFlags,ppEnumIDList);
|
{
|
||||||
|
ICOM_THIS(IGenericSFImpl, iface);
|
||||||
|
|
||||||
|
TRACE(shell,"(%p)->(HWND=0x%08x flags=0x%08lx pplist=%p)\n",This,hwndOwner,dwFlags,ppEnumIDList);
|
||||||
|
|
||||||
*ppEnumIDList = NULL;
|
*ppEnumIDList = NULL;
|
||||||
*ppEnumIDList = IEnumIDList_Constructor (this->sMyPath, dwFlags);
|
*ppEnumIDList = IEnumIDList_Constructor (This->sMyPath, dwFlags);
|
||||||
TRACE(shell,"-- (%p)->(new ID List: %p)\n",this,*ppEnumIDList);
|
TRACE(shell,"-- (%p)->(new ID List: %p)\n",This,*ppEnumIDList);
|
||||||
if(!*ppEnumIDList)
|
if(!*ppEnumIDList)
|
||||||
{ return E_OUTOFMEMORY;
|
{ return E_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
/**************************************************************************
|
|
||||||
* IShellFolder_Initialize()
|
|
||||||
* IPersistFolder Method
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WINE_UNUSED IShellFolder_Initialize( LPSHELLFOLDER this,LPCITEMIDLIST pidl)
|
|
||||||
{ TRACE(shell,"(%p)->(pidl=%p)\n",this,pidl);
|
|
||||||
|
|
||||||
if(this->pMyPidl)
|
|
||||||
{ SHFree(this->pMyPidl);
|
|
||||||
this->pMyPidl = NULL;
|
|
||||||
}
|
|
||||||
this->pMyPidl = ILClone(pidl);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IShellFolder_BindToObject
|
* IShellFolder_fnBindToObject
|
||||||
* PARAMETERS
|
* PARAMETERS
|
||||||
* LPCITEMIDLIST pidl, //[in ] complex pidl to open
|
* LPCITEMIDLIST pidl, //[in ] complex pidl to open
|
||||||
* LPBC pbc, //[in ] reserved
|
* LPBC pbc, //[in ] reserved
|
||||||
* REFIID riid, //[in ] Initial Interface
|
* REFIID riid, //[in ] Initial Interface
|
||||||
* LPVOID* ppvObject //[out] Interface*
|
* LPVOID* ppvObject //[out] Interface*
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IShellFolder_BindToObject( LPSHELLFOLDER this, LPCITEMIDLIST pidl,
|
static HRESULT WINAPI IShellFolder_fnBindToObject( IShellFolder * iface, LPCITEMIDLIST pidl,
|
||||||
LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
|
LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
|
||||||
{ char xriid[50];
|
{
|
||||||
HRESULT hr;
|
ICOM_THIS(IGenericSFImpl, iface);
|
||||||
LPSHELLFOLDER pShellFolder;
|
|
||||||
|
char xriid[50];
|
||||||
|
HRESULT hr;
|
||||||
|
LPSHELLFOLDER pShellFolder;
|
||||||
|
|
||||||
WINE_StringFromCLSID(riid,xriid);
|
WINE_StringFromCLSID(riid,xriid);
|
||||||
|
|
||||||
TRACE(shell,"(%p)->(pidl=%p,%p,\n\tIID:%s,%p)\n",this,pidl,pbcReserved,xriid,ppvOut);
|
TRACE(shell,"(%p)->(pidl=%p,%p,\n\tIID:%s,%p)\n",This,pidl,pbcReserved,xriid,ppvOut);
|
||||||
|
|
||||||
*ppvOut = NULL;
|
*ppvOut = NULL;
|
||||||
|
|
||||||
pShellFolder = IShellFolder_Constructor(this, pidl);
|
pShellFolder = IShellFolder_Constructor(This, pidl);
|
||||||
|
|
||||||
if(!pShellFolder)
|
if(!pShellFolder)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
hr = pShellFolder->lpvtbl->fnQueryInterface(pShellFolder, riid, ppvOut);
|
hr = pShellFolder->lpvtbl->fnQueryInterface(pShellFolder, riid, ppvOut);
|
||||||
pShellFolder->lpvtbl->fnRelease(pShellFolder);
|
pShellFolder->lpvtbl->fnRelease(pShellFolder);
|
||||||
TRACE(shell,"-- (%p)->(interface=%p)\n",this, ppvOut);
|
TRACE(shell,"-- (%p)->(interface=%p)\n",This, ppvOut);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IShellFolder_BindToStorage
|
* IShellFolder_fnBindToStorage
|
||||||
* PARAMETERS
|
* PARAMETERS
|
||||||
* LPCITEMIDLIST pidl, //[in ] complex pidl to store
|
* LPCITEMIDLIST pidl, //[in ] complex pidl to store
|
||||||
* LPBC pbc, //[in ] reserved
|
* LPBC pbc, //[in ] reserved
|
||||||
* REFIID riid, //[in ] Initial storage interface
|
* REFIID riid, //[in ] Initial storage interface
|
||||||
* LPVOID* ppvObject //[out] Interface* returned
|
* LPVOID* ppvObject //[out] Interface* returned
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IShellFolder_BindToStorage(LPSHELLFOLDER this,
|
static HRESULT WINAPI IShellFolder_fnBindToStorage(
|
||||||
LPCITEMIDLIST pidl,LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
IShellFolder * iface,
|
||||||
{ char xriid[50];
|
LPCITEMIDLIST pidl,
|
||||||
|
LPBC pbcReserved,
|
||||||
|
REFIID riid,
|
||||||
|
LPVOID *ppvOut)
|
||||||
|
{
|
||||||
|
ICOM_THIS(IGenericSFImpl, iface);
|
||||||
|
|
||||||
|
char xriid[50];
|
||||||
WINE_StringFromCLSID(riid,xriid);
|
WINE_StringFromCLSID(riid,xriid);
|
||||||
|
|
||||||
FIXME(shell,"(%p)->(pidl=%p,%p,\n\tIID:%s,%p) stub\n",this,pidl,pbcReserved,xriid,ppvOut);
|
FIXME(shell,"(%p)->(pidl=%p,%p,\n\tIID:%s,%p) stub\n",This,pidl,pbcReserved,xriid,ppvOut);
|
||||||
|
|
||||||
*ppvOut = NULL;
|
*ppvOut = NULL;
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IShellFolder_CompareIDs
|
* IShellFolder_fnCompareIDs
|
||||||
*
|
*
|
||||||
* PARMETERS
|
* PARMETERS
|
||||||
* LPARAM lParam, //[in ] Column?
|
* LPARAM lParam, //[in ] Column?
|
||||||
@ -541,58 +541,64 @@ static HRESULT WINAPI IShellFolder_BindToStorage(LPSHELLFOLDER this,
|
|||||||
* FIXME
|
* FIXME
|
||||||
* we have to handle simple pidl's only (?)
|
* we have to handle simple pidl's only (?)
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IShellFolder_CompareIDs(LPSHELLFOLDER this,
|
static HRESULT WINAPI IShellFolder_fnCompareIDs(
|
||||||
LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
|
IShellFolder * iface,
|
||||||
{ CHAR szString1[MAX_PATH] = "";
|
LPARAM lParam,
|
||||||
CHAR szString2[MAX_PATH] = "";
|
LPCITEMIDLIST pidl1,
|
||||||
int nReturn;
|
LPCITEMIDLIST pidl2)
|
||||||
LPCITEMIDLIST pidlTemp1 = pidl1, pidlTemp2 = pidl2;
|
{
|
||||||
|
ICOM_THIS(IGenericSFImpl, iface);
|
||||||
|
|
||||||
TRACE(shell,"(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n",this,lParam,pidl1,pidl2);
|
CHAR szString1[MAX_PATH] = "";
|
||||||
pdump (pidl1);
|
CHAR szString2[MAX_PATH] = "";
|
||||||
pdump (pidl2);
|
int nReturn;
|
||||||
|
LPCITEMIDLIST pidlTemp1 = pidl1, pidlTemp2 = pidl2;
|
||||||
|
|
||||||
if (!pidl1 && !pidl2)
|
TRACE(shell,"(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n",This,lParam,pidl1,pidl2);
|
||||||
return 0;
|
pdump (pidl1);
|
||||||
if (!pidl1) /* Desktop < anything */
|
pdump (pidl2);
|
||||||
return -1;
|
|
||||||
if (!pidl2)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
/* get the last item in each list */
|
|
||||||
while((ILGetNext(pidlTemp1))->mkid.cb)
|
|
||||||
pidlTemp1 = ILGetNext(pidlTemp1);
|
|
||||||
while((ILGetNext(pidlTemp2))->mkid.cb)
|
|
||||||
pidlTemp2 = ILGetNext(pidlTemp2);
|
|
||||||
|
|
||||||
/* at this point, both pidlTemp1 and pidlTemp2 point to the last item in the list */
|
if (!pidl1 && !pidl2)
|
||||||
if(_ILIsValue(pidlTemp1) != _ILIsValue(pidlTemp2))
|
return 0;
|
||||||
{ if(_ILIsValue(pidlTemp1))
|
if (!pidl1) /* Desktop < anything */
|
||||||
return 1;
|
return -1;
|
||||||
return -1;
|
if (!pidl2)
|
||||||
}
|
return 1;
|
||||||
|
|
||||||
_ILGetDrive( pidl1,szString1,sizeof(szString1));
|
/* get the last item in each list */
|
||||||
_ILGetDrive( pidl2,szString1,sizeof(szString2));
|
while((ILGetNext(pidlTemp1))->mkid.cb)
|
||||||
nReturn = strcasecmp(szString1, szString2);
|
pidlTemp1 = ILGetNext(pidlTemp1);
|
||||||
|
while((ILGetNext(pidlTemp2))->mkid.cb)
|
||||||
|
pidlTemp2 = ILGetNext(pidlTemp2);
|
||||||
|
|
||||||
if(nReturn)
|
/* at This point, both pidlTemp1 and pidlTemp2 point to the last item in the list */
|
||||||
return nReturn;
|
if(_ILIsValue(pidlTemp1) != _ILIsValue(pidlTemp2))
|
||||||
|
{ if(_ILIsValue(pidlTemp1))
|
||||||
|
return 1;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
_ILGetFolderText( pidl1,szString1,sizeof(szString1));
|
_ILGetDrive( pidl1,szString1,sizeof(szString1));
|
||||||
_ILGetFolderText( pidl2,szString2,sizeof(szString2));
|
_ILGetDrive( pidl2,szString2,sizeof(szString2));
|
||||||
nReturn = strcasecmp(szString1, szString2);
|
nReturn = strcasecmp(szString2, szString1);
|
||||||
|
|
||||||
if(nReturn)
|
if(nReturn)
|
||||||
return nReturn;
|
return nReturn;
|
||||||
|
|
||||||
_ILGetValueText(pidl1,szString1,sizeof(szString1));
|
_ILGetFolderText( pidl1,szString1,sizeof(szString1));
|
||||||
_ILGetValueText(pidl2,szString2,sizeof(szString2));
|
_ILGetFolderText( pidl2,szString2,sizeof(szString2));
|
||||||
return strcasecmp(szString1, szString2);
|
nReturn = strcasecmp(szString2, szString1);
|
||||||
|
|
||||||
|
if(nReturn)
|
||||||
|
return nReturn;
|
||||||
|
|
||||||
|
_ILGetValueText(pidl1,szString1,sizeof(szString1));
|
||||||
|
_ILGetValueText(pidl2,szString2,sizeof(szString2));
|
||||||
|
return strcasecmp(szString1, szString2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IShellFolder_CreateViewObject
|
* IShellFolder_fnCreateViewObject
|
||||||
* Creates an View Object representing the ShellFolder
|
* Creates an View Object representing the ShellFolder
|
||||||
* IShellView / IShellBrowser / IContextMenu
|
* IShellView / IShellBrowser / IContextMenu
|
||||||
*
|
*
|
||||||
@ -604,30 +610,33 @@ static HRESULT WINAPI IShellFolder_CompareIDs(LPSHELLFOLDER this,
|
|||||||
* NOTES
|
* NOTES
|
||||||
* the same as SHCreateShellFolderViewEx ???
|
* the same as SHCreateShellFolderViewEx ???
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IShellFolder_CreateViewObject( LPSHELLFOLDER this,
|
static HRESULT WINAPI IShellFolder_fnCreateViewObject( IShellFolder * iface,
|
||||||
HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
|
HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
|
||||||
{ LPSHELLVIEW pShellView;
|
{
|
||||||
|
ICOM_THIS(IGenericSFImpl, iface);
|
||||||
|
|
||||||
|
LPSHELLVIEW pShellView;
|
||||||
char xriid[50];
|
char xriid[50];
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
WINE_StringFromCLSID(riid,xriid);
|
WINE_StringFromCLSID(riid,xriid);
|
||||||
TRACE(shell,"(%p)->(hwnd=0x%x,\n\tIID:\t%s,%p)\n",this,hwndOwner,xriid,ppvOut);
|
TRACE(shell,"(%p)->(hwnd=0x%x,\n\tIID:\t%s,%p)\n",This,hwndOwner,xriid,ppvOut);
|
||||||
|
|
||||||
*ppvOut = NULL;
|
*ppvOut = NULL;
|
||||||
|
|
||||||
pShellView = IShellView_Constructor(this, this->mpidl);
|
pShellView = IShellView_Constructor((IShellFolder *) This, This->mpidl);
|
||||||
|
|
||||||
if(!pShellView)
|
if(!pShellView)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
hr = pShellView->lpvtbl->fnQueryInterface(pShellView, riid, ppvOut);
|
hr = pShellView->lpvtbl->fnQueryInterface(pShellView, riid, ppvOut);
|
||||||
pShellView->lpvtbl->fnRelease(pShellView);
|
pShellView->lpvtbl->fnRelease(pShellView);
|
||||||
TRACE(shell,"-- (%p)->(interface=%p)\n",this, ppvOut);
|
TRACE(shell,"-- (%p)->(interface=%p)\n",This, ppvOut);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IShellFolder_GetAttributesOf
|
* IShellFolder_fnGetAttributesOf
|
||||||
*
|
*
|
||||||
* PARAMETERS
|
* PARAMETERS
|
||||||
* UINT cidl, //[in ] num elements in pidl array
|
* UINT cidl, //[in ] num elements in pidl array
|
||||||
@ -636,55 +645,58 @@ static HRESULT WINAPI IShellFolder_CreateViewObject( LPSHELLFOLDER this,
|
|||||||
*
|
*
|
||||||
* FIXME: quick hack
|
* FIXME: quick hack
|
||||||
* Note: rgfInOut is documented as being an array of ULONGS.
|
* Note: rgfInOut is documented as being an array of ULONGS.
|
||||||
* This does not seem to be the case. Testing this function using the shell to
|
* This does not seem to be the case. Testing This function using the shell to
|
||||||
* call it with cidl > 1 (by deleting multiple items) reveals that the shell
|
* call it with cidl > 1 (by deleting multiple items) reveals that the shell
|
||||||
* passes ONE element in the array and writing to further elements will
|
* passes ONE element in the array and writing to further elements will
|
||||||
* cause the shell to fail later.
|
* cause the shell to fail later.
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IShellFolder_GetAttributesOf(LPSHELLFOLDER this,UINT cidl,LPCITEMIDLIST *apidl,DWORD *rgfInOut)
|
static HRESULT WINAPI IShellFolder_fnGetAttributesOf(IShellFolder * iface,UINT cidl,LPCITEMIDLIST *apidl,DWORD *rgfInOut)
|
||||||
{ LPCITEMIDLIST * pidltemp;
|
{
|
||||||
DWORD i;
|
ICOM_THIS(IGenericSFImpl, iface);
|
||||||
|
|
||||||
TRACE(shell,"(%p)->(%d,%p,%p)\n",this,cidl,apidl,rgfInOut);
|
LPCITEMIDLIST * pidltemp;
|
||||||
|
DWORD i;
|
||||||
|
|
||||||
if ((! cidl )| (!apidl) | (!rgfInOut))
|
TRACE(shell,"(%p)->(%d,%p,%p)\n",This,cidl,apidl,rgfInOut);
|
||||||
return E_INVALIDARG;
|
|
||||||
|
|
||||||
pidltemp=apidl;
|
if ((! cidl )| (!apidl) | (!rgfInOut))
|
||||||
*rgfInOut = 0x00;
|
return E_INVALIDARG;
|
||||||
i=cidl;
|
|
||||||
|
|
||||||
TRACE(shell,"-- mask=0x%08lx\n",*rgfInOut);
|
pidltemp=apidl;
|
||||||
|
*rgfInOut = 0x00;
|
||||||
do
|
i=cidl;
|
||||||
{ if (*pidltemp)
|
|
||||||
{ pdump (*pidltemp);
|
|
||||||
if (_ILIsDesktop( *pidltemp))
|
|
||||||
{ *rgfInOut |= ( SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANLINK );
|
|
||||||
}
|
|
||||||
else if (_ILIsMyComputer( *pidltemp))
|
|
||||||
{ *rgfInOut |= ( SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR
|
|
||||||
| SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANRENAME | SFGAO_CANLINK );
|
|
||||||
}
|
|
||||||
else if (_ILIsDrive( *pidltemp))
|
|
||||||
{ *rgfInOut |= ( SFGAO_HASSUBFOLDER | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR |
|
|
||||||
SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANLINK );
|
|
||||||
}
|
|
||||||
else if (_ILIsFolder( *pidltemp))
|
|
||||||
{ *rgfInOut |= ( SFGAO_HASSUBFOLDER | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_CAPABILITYMASK );
|
|
||||||
}
|
|
||||||
else if (_ILIsValue( *pidltemp))
|
|
||||||
{ *rgfInOut |= (SFGAO_FILESYSTEM | SFGAO_CAPABILITYMASK );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pidltemp++;
|
|
||||||
cidl--;
|
|
||||||
} while (cidl > 0 && *pidltemp);
|
|
||||||
|
|
||||||
return S_OK;
|
TRACE(shell,"-- mask=0x%08lx\n",*rgfInOut);
|
||||||
|
|
||||||
|
do
|
||||||
|
{ if (*pidltemp)
|
||||||
|
{ pdump (*pidltemp);
|
||||||
|
if (_ILIsDesktop( *pidltemp))
|
||||||
|
{ *rgfInOut |= ( SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANLINK );
|
||||||
|
}
|
||||||
|
else if (_ILIsMyComputer( *pidltemp))
|
||||||
|
{ *rgfInOut |= ( SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR |
|
||||||
|
SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANRENAME | SFGAO_CANLINK );
|
||||||
|
}
|
||||||
|
else if (_ILIsDrive( *pidltemp))
|
||||||
|
{ *rgfInOut |= ( SFGAO_HASSUBFOLDER | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR |
|
||||||
|
SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANLINK );
|
||||||
|
}
|
||||||
|
else if (_ILIsFolder( *pidltemp))
|
||||||
|
{ *rgfInOut |= ( SFGAO_HASSUBFOLDER | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_CAPABILITYMASK );
|
||||||
|
}
|
||||||
|
else if (_ILIsValue( *pidltemp))
|
||||||
|
{ *rgfInOut |= (SFGAO_FILESYSTEM | SFGAO_CAPABILITYMASK );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pidltemp++;
|
||||||
|
cidl--;
|
||||||
|
} while (cidl > 0 && *pidltemp);
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IShellFolder_GetUIObjectOf
|
* IShellFolder_fnGetUIObjectOf
|
||||||
*
|
*
|
||||||
* PARAMETERS
|
* PARAMETERS
|
||||||
* HWND hwndOwner, //[in ] Parent window for any output
|
* HWND hwndOwner, //[in ] Parent window for any output
|
||||||
@ -704,15 +716,17 @@ static HRESULT WINAPI IShellFolder_GetAttributesOf(LPSHELLFOLDER this,UINT cidl,
|
|||||||
* a barely documented "Icon positions" structure to SetData when the drag starts,
|
* a barely documented "Icon positions" structure to SetData when the drag starts,
|
||||||
* and GetData's it if the drop is in another explorer window that needs the positions.
|
* and GetData's it if the drop is in another explorer window that needs the positions.
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IShellFolder_GetUIObjectOf(
|
static HRESULT WINAPI IShellFolder_fnGetUIObjectOf(
|
||||||
LPSHELLFOLDER this,
|
IShellFolder * iface,
|
||||||
HWND hwndOwner,
|
HWND hwndOwner,
|
||||||
UINT cidl,
|
UINT cidl,
|
||||||
LPCITEMIDLIST * apidl,
|
LPCITEMIDLIST * apidl,
|
||||||
REFIID riid,
|
REFIID riid,
|
||||||
UINT * prgfInOut,
|
UINT * prgfInOut,
|
||||||
LPVOID * ppvOut)
|
LPVOID * ppvOut)
|
||||||
{
|
{
|
||||||
|
ICOM_THIS(IGenericSFImpl, iface);
|
||||||
|
|
||||||
char xclsid[50];
|
char xclsid[50];
|
||||||
LPITEMIDLIST pidl;
|
LPITEMIDLIST pidl;
|
||||||
LPUNKNOWN pObj = NULL;
|
LPUNKNOWN pObj = NULL;
|
||||||
@ -720,7 +734,7 @@ static HRESULT WINAPI IShellFolder_GetUIObjectOf(
|
|||||||
WINE_StringFromCLSID(riid,xclsid);
|
WINE_StringFromCLSID(riid,xclsid);
|
||||||
|
|
||||||
TRACE(shell,"(%p)->(%u,%u,apidl=%p,\n\tIID:%s,%p,%p)\n",
|
TRACE(shell,"(%p)->(%u,%u,apidl=%p,\n\tIID:%s,%p,%p)\n",
|
||||||
this,hwndOwner,cidl,apidl,xclsid,prgfInOut,ppvOut);
|
This,hwndOwner,cidl,apidl,xclsid,prgfInOut,ppvOut);
|
||||||
|
|
||||||
*ppvOut = NULL;
|
*ppvOut = NULL;
|
||||||
|
|
||||||
@ -729,21 +743,21 @@ static HRESULT WINAPI IShellFolder_GetUIObjectOf(
|
|||||||
if(cidl < 1)
|
if(cidl < 1)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
pObj = (LPUNKNOWN)IContextMenu_Constructor(this, apidl, cidl);
|
pObj = (LPUNKNOWN)IContextMenu_Constructor((IShellFolder *)This, apidl, cidl);
|
||||||
}
|
}
|
||||||
else if (IsEqualIID(riid, &IID_IDataObject))
|
else if (IsEqualIID(riid, &IID_IDataObject))
|
||||||
{
|
{
|
||||||
if (cidl < 1)
|
if (cidl < 1)
|
||||||
return(E_INVALIDARG);
|
return(E_INVALIDARG);
|
||||||
|
|
||||||
pObj = (LPUNKNOWN)IDataObject_Constructor (hwndOwner, this, apidl, cidl);
|
pObj = (LPUNKNOWN)IDataObject_Constructor (hwndOwner, (IShellFolder *)This, apidl, cidl);
|
||||||
}
|
}
|
||||||
else if(IsEqualIID(riid, &IID_IExtractIcon))
|
else if(IsEqualIID(riid, &IID_IExtractIcon))
|
||||||
{
|
{
|
||||||
if (cidl != 1)
|
if (cidl != 1)
|
||||||
return(E_INVALIDARG);
|
return(E_INVALIDARG);
|
||||||
|
|
||||||
pidl = ILCombine(this->pMyPidl,apidl[0]);
|
pidl = ILCombine(This->pMyPidl,apidl[0]);
|
||||||
pObj = (LPUNKNOWN)IExtractIcon_Constructor( pidl );
|
pObj = (LPUNKNOWN)IExtractIcon_Constructor( pidl );
|
||||||
SHFree(pidl);
|
SHFree(pidl);
|
||||||
}
|
}
|
||||||
@ -756,7 +770,7 @@ static HRESULT WINAPI IShellFolder_GetUIObjectOf(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ERR(shell,"(%p)->E_NOINTERFACE\n",this);
|
ERR(shell,"(%p)->E_NOINTERFACE\n",This);
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -767,7 +781,7 @@ static HRESULT WINAPI IShellFolder_GetUIObjectOf(
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IShellFolder_GetDisplayNameOf
|
* IShellFolder_fnGetDisplayNameOf
|
||||||
* Retrieves the display name for the specified file object or subfolder
|
* Retrieves the display name for the specified file object or subfolder
|
||||||
*
|
*
|
||||||
* PARAMETERS
|
* PARAMETERS
|
||||||
@ -781,8 +795,15 @@ static HRESULT WINAPI IShellFolder_GetUIObjectOf(
|
|||||||
#define GET_SHGDN_FOR(dwFlags) ((DWORD)dwFlags & (DWORD)0x0000FF00)
|
#define GET_SHGDN_FOR(dwFlags) ((DWORD)dwFlags & (DWORD)0x0000FF00)
|
||||||
#define GET_SHGDN_RELATION(dwFlags) ((DWORD)dwFlags & (DWORD)0x000000FF)
|
#define GET_SHGDN_RELATION(dwFlags) ((DWORD)dwFlags & (DWORD)0x000000FF)
|
||||||
|
|
||||||
static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET lpName)
|
static HRESULT WINAPI IShellFolder_fnGetDisplayNameOf(
|
||||||
{ CHAR szText[MAX_PATH];
|
IShellFolder * iface,
|
||||||
|
LPCITEMIDLIST pidl,
|
||||||
|
DWORD dwFlags,
|
||||||
|
LPSTRRET lpName)
|
||||||
|
{
|
||||||
|
ICOM_THIS(IGenericSFImpl, iface);
|
||||||
|
|
||||||
|
CHAR szText[MAX_PATH];
|
||||||
CHAR szTemp[MAX_PATH];
|
CHAR szTemp[MAX_PATH];
|
||||||
CHAR szSpecial[MAX_PATH];
|
CHAR szSpecial[MAX_PATH];
|
||||||
CHAR szDrive[MAX_PATH];
|
CHAR szDrive[MAX_PATH];
|
||||||
@ -790,7 +811,7 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
|
|||||||
LPITEMIDLIST pidlTemp=NULL;
|
LPITEMIDLIST pidlTemp=NULL;
|
||||||
BOOL bSimplePidl=FALSE;
|
BOOL bSimplePidl=FALSE;
|
||||||
|
|
||||||
TRACE(shell,"(%p)->(pidl=%p,0x%08lx,%p)\n",this,pidl,dwFlags,lpName);
|
TRACE(shell,"(%p)->(pidl=%p,0x%08lx,%p)\n",This,pidl,dwFlags,lpName);
|
||||||
pdump(pidl);
|
pdump(pidl);
|
||||||
|
|
||||||
szSpecial[0]=0x00;
|
szSpecial[0]=0x00;
|
||||||
@ -849,9 +870,9 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
|
|||||||
{ /* if the IShellFolder has parents, get the path from the
|
{ /* if the IShellFolder has parents, get the path from the
|
||||||
parent and add the ItemName*/
|
parent and add the ItemName*/
|
||||||
szText[0]=0x00;
|
szText[0]=0x00;
|
||||||
if (this->sMyPath && strlen (this->sMyPath))
|
if (This->sMyPath && strlen (This->sMyPath))
|
||||||
{ if (strcmp(this->sMyPath,"My Computer"))
|
{ if (strcmp(This->sMyPath,"My Computer"))
|
||||||
{ strcpy (szText,this->sMyPath);
|
{ strcpy (szText,This->sMyPath);
|
||||||
PathAddBackslashA (szText);
|
PathAddBackslashA (szText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -877,7 +898,7 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE(shell,"-- (%p)->(%s)\n",this,szText);
|
TRACE(shell,"-- (%p)->(%s)\n",This,szText);
|
||||||
|
|
||||||
if(!(lpName))
|
if(!(lpName))
|
||||||
{ return E_OUTOFMEMORY;
|
{ return E_OUTOFMEMORY;
|
||||||
@ -888,7 +909,7 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IShellFolder_SetNameOf
|
* IShellFolder_fnSetNameOf
|
||||||
* Changes the name of a file object or subfolder, possibly changing its item
|
* Changes the name of a file object or subfolder, possibly changing its item
|
||||||
* identifier in the process.
|
* identifier in the process.
|
||||||
*
|
*
|
||||||
@ -899,41 +920,156 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
|
|||||||
* DWORD dwFlags, //[in ] SHGNO formatting flags
|
* DWORD dwFlags, //[in ] SHGNO formatting flags
|
||||||
* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned
|
* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IShellFolder_SetNameOf(
|
static HRESULT WINAPI IShellFolder_fnSetNameOf(
|
||||||
LPSHELLFOLDER this,
|
IShellFolder * iface,
|
||||||
HWND hwndOwner,
|
HWND hwndOwner,
|
||||||
LPCITEMIDLIST pidl, /*simple pidl*/
|
LPCITEMIDLIST pidl, /*simple pidl*/
|
||||||
LPCOLESTR lpName,
|
LPCOLESTR lpName,
|
||||||
DWORD dw,
|
DWORD dw,
|
||||||
LPITEMIDLIST *pPidlOut)
|
LPITEMIDLIST *pPidlOut)
|
||||||
{ FIXME(shell,"(%p)->(%u,pidl=%p,%s,%lu,%p),stub!\n",
|
{
|
||||||
this,hwndOwner,pidl,debugstr_w(lpName),dw,pPidlOut);
|
ICOM_THIS(IGenericSFImpl, iface);
|
||||||
return E_NOTIMPL;
|
|
||||||
|
FIXME(shell,"(%p)->(%u,pidl=%p,%s,%lu,%p),stub!\n",
|
||||||
|
This,hwndOwner,pidl,debugstr_w(lpName),dw,pPidlOut);
|
||||||
|
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* IShellFolder_GetFolderPath
|
* IShellFolder_fnGetFolderPath
|
||||||
* FIXME: drive not included
|
* FIXME: drive not included
|
||||||
*/
|
*/
|
||||||
static BOOL WINAPI IShellFolder_GetFolderPath(LPSHELLFOLDER this, LPSTR lpszOut, DWORD dwOutSize)
|
static HRESULT WINAPI IShellFolder_fnGetFolderPath(IShellFolder * iface, LPSTR lpszOut, DWORD dwOutSize)
|
||||||
{ DWORD dwSize;
|
{
|
||||||
|
ICOM_THIS(IGenericSFImpl, iface);
|
||||||
TRACE(shell,"(%p)->(%p %lu)\n",this, lpszOut, dwOutSize);
|
DWORD dwSize;
|
||||||
|
|
||||||
|
TRACE(shell,"(%p)->(%p %lu)\n",This, lpszOut, dwOutSize);
|
||||||
if (!lpszOut)
|
if (!lpszOut)
|
||||||
{ return FALSE;
|
{ return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
*lpszOut=0;
|
*lpszOut=0;
|
||||||
|
|
||||||
if (! this->sMyPath)
|
if (! This->sMyPath)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
dwSize = strlen (this->sMyPath) +1;
|
dwSize = strlen (This->sMyPath) +1;
|
||||||
if ( dwSize > dwOutSize)
|
if ( dwSize > dwOutSize)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
strcpy(lpszOut, this->sMyPath);
|
strcpy(lpszOut, This->sMyPath);
|
||||||
|
|
||||||
TRACE(shell,"-- (%p)->(return=%s)\n",this, lpszOut);
|
TRACE(shell,"-- (%p)->(return=%s)\n",This, lpszOut);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static ICOM_VTABLE(IShellFolder) sfvt =
|
||||||
|
{ IShellFolder_fnQueryInterface,
|
||||||
|
IShellFolder_fnAddRef,
|
||||||
|
IShellFolder_fnRelease,
|
||||||
|
IShellFolder_fnParseDisplayName,
|
||||||
|
IShellFolder_fnEnumObjects,
|
||||||
|
IShellFolder_fnBindToObject,
|
||||||
|
IShellFolder_fnBindToStorage,
|
||||||
|
IShellFolder_fnCompareIDs,
|
||||||
|
IShellFolder_fnCreateViewObject,
|
||||||
|
IShellFolder_fnGetAttributesOf,
|
||||||
|
IShellFolder_fnGetUIObjectOf,
|
||||||
|
IShellFolder_fnGetDisplayNameOf,
|
||||||
|
IShellFolder_fnSetNameOf,
|
||||||
|
IShellFolder_fnGetFolderPath
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* ISFPersistFolder_QueryInterface (IUnknown)
|
||||||
|
*
|
||||||
|
* See Windows documentation for more details on IUnknown methods.
|
||||||
|
*/
|
||||||
|
static HRESULT WINAPI ISFPersistFolder_QueryInterface(
|
||||||
|
IPersistFolder * iface,
|
||||||
|
REFIID iid,
|
||||||
|
LPVOID* ppvObj)
|
||||||
|
{
|
||||||
|
_ICOM_THIS_From_IPersistFolder(IGenericSFImpl, iface);
|
||||||
|
|
||||||
|
return IShellFolder_QueryInterface((IShellFolder*)This, iid, ppvObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* ISFPersistFolder_AddRef (IUnknown)
|
||||||
|
*
|
||||||
|
* See Windows documentation for more details on IUnknown methods.
|
||||||
|
*/
|
||||||
|
static ULONG WINAPI ISFPersistFolder_AddRef(
|
||||||
|
IPersistFolder * iface)
|
||||||
|
{
|
||||||
|
_ICOM_THIS_From_IPersistFolder(IShellFolder, iface);
|
||||||
|
|
||||||
|
return IShellFolder_AddRef((IShellFolder*)This);
|
||||||
|
}
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* ISFPersistFolder_Release (IUnknown)
|
||||||
|
*
|
||||||
|
* See Windows documentation for more details on IUnknown methods.
|
||||||
|
*/
|
||||||
|
static ULONG WINAPI ISFPersistFolder_Release(
|
||||||
|
IPersistFolder * iface)
|
||||||
|
{
|
||||||
|
_ICOM_THIS_From_IPersistFolder(IGenericSFImpl, iface);
|
||||||
|
|
||||||
|
return IShellFolder_Release((IShellFolder*)This);
|
||||||
|
}
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* ISFPersistFolder_GetClassID (IPersist)
|
||||||
|
*
|
||||||
|
* See Windows documentation for more details on IPersist methods.
|
||||||
|
*/
|
||||||
|
static HRESULT WINAPI ISFPersistFolder_GetClassID(
|
||||||
|
const IPersistFolder * iface,
|
||||||
|
LPCLSID lpClassId)
|
||||||
|
{
|
||||||
|
/* This ID is not documented anywhere but some tests in Windows tell
|
||||||
|
* me that This is the ID for the "standard" implementation of the
|
||||||
|
* IFolder interface.
|
||||||
|
*/
|
||||||
|
|
||||||
|
CLSID StdFolderID = { 0xF3364BA0, 0x65B9, 0x11CE, {0xA9, 0xBA, 0x00, 0xAA, 0x00, 0x4A, 0xE8, 0x37} };
|
||||||
|
|
||||||
|
if (lpClassId==NULL)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
|
memcpy(lpClassId, &StdFolderID, sizeof(StdFolderID));
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* ISFPersistFolder_Initialize (IPersistFolder)
|
||||||
|
*
|
||||||
|
* See Windows documentation for more details on IPersistFolder methods.
|
||||||
|
*/
|
||||||
|
static HRESULT WINAPI ISFPersistFolder_Initialize(
|
||||||
|
IPersistFolder * iface,
|
||||||
|
LPCITEMIDLIST pidl)
|
||||||
|
{
|
||||||
|
_ICOM_THIS_From_IPersistFolder(IGenericSFImpl, iface);
|
||||||
|
|
||||||
|
if(This->pMyPidl)
|
||||||
|
{ SHFree(This->pMyPidl);
|
||||||
|
This->pMyPidl = NULL;
|
||||||
|
}
|
||||||
|
This->pMyPidl = ILClone(pidl);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static ICOM_VTABLE(IPersistFolder) psfvt =
|
||||||
|
{
|
||||||
|
ISFPersistFolder_QueryInterface,
|
||||||
|
ISFPersistFolder_AddRef,
|
||||||
|
ISFPersistFolder_Release,
|
||||||
|
ISFPersistFolder_GetClassID,
|
||||||
|
ISFPersistFolder_Initialize
|
||||||
|
};
|
||||||
|
@ -20,22 +20,18 @@ DEFINE_SHLGUID(IID_IShellBrowser, 0x000214E2L, 0, 0);
|
|||||||
DEFINE_SHLGUID(IID_IShellView, 0x000214E3L, 0, 0);
|
DEFINE_SHLGUID(IID_IShellView, 0x000214E3L, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
|
DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_IShellIcon, 0x000214E5L, 0, 0);
|
DEFINE_SHLGUID(IID_IShellIcon, 0x000214E5L, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
|
|
||||||
DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0);
|
DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
|
DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_IExtractIcon, 0x000214EBL, 0, 0);
|
DEFINE_SHLGUID(IID_IExtractIcon, 0x000214EBL, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_IShellLink, 0x000214EEL, 0, 0);
|
|
||||||
DEFINE_SHLGUID(IID_IShellCopyHook, 0x000214EFL, 0, 0);
|
DEFINE_SHLGUID(IID_IShellCopyHook, 0x000214EFL, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_IFileViewer, 0x000214F0L, 0, 0);
|
DEFINE_SHLGUID(IID_IFileViewer, 0x000214F0L, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0);
|
DEFINE_SHLGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
|
|
||||||
DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
|
DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_IContextMenu2, 0x000214F4L, 0, 0);
|
DEFINE_SHLGUID(IID_IContextMenu2, 0x000214F4L, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0);
|
DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0);
|
DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0);
|
DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_IFileViewerW, 0x000214F8L, 0, 0);
|
DEFINE_SHLGUID(IID_IFileViewerW, 0x000214F8L, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_IShellLinkW, 0x000214F9L, 0, 0);
|
|
||||||
DEFINE_SHLGUID(IID_IExtractIconW, 0x000214FAL, 0, 0);
|
DEFINE_SHLGUID(IID_IExtractIconW, 0x000214FAL, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0);
|
DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0);
|
||||||
DEFINE_SHLGUID(IID_IShellCopyHookW, 0x000214FCL, 0, 0);
|
DEFINE_SHLGUID(IID_IShellCopyHookW, 0x000214FCL, 0, 0);
|
||||||
|
145
include/shlobj.h
145
include/shlobj.h
@ -5,6 +5,7 @@
|
|||||||
#include "winbase.h" /* WIN32_FIND_* */
|
#include "winbase.h" /* WIN32_FIND_* */
|
||||||
#include "wine/obj_base.h"
|
#include "wine/obj_base.h"
|
||||||
#include "wine/obj_shelllink.h"
|
#include "wine/obj_shelllink.h"
|
||||||
|
#include "wine/obj_shellfolder.h"
|
||||||
#include "ole2.h"
|
#include "ole2.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "commctrl.h"
|
#include "commctrl.h"
|
||||||
@ -26,36 +27,12 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID,REFIID,LPVOID*);
|
|||||||
/* foreward declaration of the objects*/
|
/* foreward declaration of the objects*/
|
||||||
typedef struct IContextMenu IContextMenu, *LPCONTEXTMENU;
|
typedef struct IContextMenu IContextMenu, *LPCONTEXTMENU;
|
||||||
typedef struct tagSHELLEXTINIT *LPSHELLEXTINIT,IShellExtInit;
|
typedef struct tagSHELLEXTINIT *LPSHELLEXTINIT,IShellExtInit;
|
||||||
typedef struct tagENUMIDLIST *LPENUMIDLIST, IEnumIDList;
|
|
||||||
typedef struct tagSHELLFOLDER *LPSHELLFOLDER, IShellFolder;
|
|
||||||
typedef struct tagSHELLVIEW *LPSHELLVIEW, IShellView;
|
typedef struct tagSHELLVIEW *LPSHELLVIEW, IShellView;
|
||||||
typedef struct tagSHELLBROWSER *LPSHELLBROWSER,IShellBrowser;
|
typedef struct tagSHELLBROWSER *LPSHELLBROWSER,IShellBrowser;
|
||||||
typedef struct tagSHELLICON *LPSHELLICON, IShellIcon;
|
typedef struct tagSHELLICON *LPSHELLICON, IShellIcon;
|
||||||
typedef struct tagDOCKINGWINDOWFRAME *LPDOCKINGWINDOWFRAME, IDockingWindowFrame;
|
typedef struct tagDOCKINGWINDOWFRAME *LPDOCKINGWINDOWFRAME, IDockingWindowFrame;
|
||||||
typedef struct tagCOMMDLGBROWSER *LPCOMMDLGBROWSER, ICommDlgBrowser;
|
typedef struct tagCOMMDLGBROWSER *LPCOMMDLGBROWSER, ICommDlgBrowser;
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* STRRET
|
|
||||||
*/
|
|
||||||
#define STRRET_WSTR 0x0000
|
|
||||||
#define STRRET_OFFSETA 0x0001
|
|
||||||
#define STRRET_CSTRA 0x0002
|
|
||||||
#define STRRET_ASTR 0X0003
|
|
||||||
#define STRRET_OFFSETW 0X0004
|
|
||||||
#define STRRET_CSTRW 0X0005
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _STRRET
|
|
||||||
{ UINT uType; /* STRRET_xxx */
|
|
||||||
union
|
|
||||||
{ LPWSTR pOleStr; /* OLESTR that will be freed */
|
|
||||||
LPSTR pStr;
|
|
||||||
UINT uOffset; /* OffsetINT32o SHITEMID (ANSI) */
|
|
||||||
char cStr[MAX_PATH]; /* Buffer to fill in */
|
|
||||||
WCHAR cStrW[MAX_PATH];
|
|
||||||
}u;
|
|
||||||
} STRRET,*LPSTRRET;
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* IContextMenu interface
|
* IContextMenu interface
|
||||||
@ -270,46 +247,6 @@ struct tagSHELLEXTINIT
|
|||||||
|
|
||||||
#undef THIS
|
#undef THIS
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* IEnumIDList interface
|
|
||||||
*/
|
|
||||||
#define THIS LPENUMIDLIST me
|
|
||||||
|
|
||||||
typedef struct tagENUMLIST
|
|
||||||
{ struct tagENUMLIST *pNext;
|
|
||||||
LPITEMIDLIST pidl;
|
|
||||||
} ENUMLIST, *LPENUMLIST;
|
|
||||||
|
|
||||||
typedef struct IEnumIDList_VTable
|
|
||||||
{ /* *** IUnknown methods *** */
|
|
||||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
|
||||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
|
||||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
|
||||||
|
|
||||||
/* *** IEnumIDList methods *** */
|
|
||||||
STDMETHOD(Next) (THIS_ ULONG celt,
|
|
||||||
LPITEMIDLIST *rgelt,
|
|
||||||
ULONG *pceltFetched) PURE;
|
|
||||||
STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
|
|
||||||
STDMETHOD(Reset) (THIS) PURE;
|
|
||||||
STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
|
|
||||||
/* *** private methods *** */
|
|
||||||
STDMETHOD_(BOOL,CreateEnumList)(THIS_ LPCSTR, DWORD) PURE;
|
|
||||||
STDMETHOD_(BOOL,AddToEnumList)(THIS_ LPITEMIDLIST) PURE;
|
|
||||||
STDMETHOD_(BOOL,DeleteList)(THIS) PURE;
|
|
||||||
|
|
||||||
|
|
||||||
} IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
|
|
||||||
|
|
||||||
struct tagENUMIDLIST
|
|
||||||
{ LPENUMIDLIST_VTABLE lpvtbl;
|
|
||||||
DWORD ref;
|
|
||||||
LPENUMLIST mpFirst;
|
|
||||||
LPENUMLIST mpLast;
|
|
||||||
LPENUMLIST mpCurrent;
|
|
||||||
};
|
|
||||||
|
|
||||||
#undef THIS
|
|
||||||
/*-------------------------------------------------------------------------- */
|
/*-------------------------------------------------------------------------- */
|
||||||
/* */
|
/* */
|
||||||
/* FOLDERSETTINGS */
|
/* FOLDERSETTINGS */
|
||||||
@ -357,86 +294,6 @@ typedef struct
|
|||||||
|
|
||||||
typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
|
typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
|
||||||
|
|
||||||
/************************************************************************
|
|
||||||
* IShellFolder interface
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define THIS LPSHELLFOLDER me
|
|
||||||
|
|
||||||
/* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
|
|
||||||
typedef enum
|
|
||||||
{ SHGDN_NORMAL = 0, /* default (display purpose) */
|
|
||||||
SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
|
|
||||||
SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
|
|
||||||
} SHGNO;
|
|
||||||
|
|
||||||
/* IShellFolder::EnumObjects */
|
|
||||||
typedef enum tagSHCONTF
|
|
||||||
{ SHCONTF_FOLDERS = 32, /* for shell browser */
|
|
||||||
SHCONTF_NONFOLDERS = 64, /* for default view */
|
|
||||||
SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
|
|
||||||
} SHCONTF;
|
|
||||||
|
|
||||||
/* IShellFolder::GetAttributesOf flags */
|
|
||||||
#define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
|
|
||||||
#define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
|
|
||||||
#define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
|
|
||||||
#define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
|
|
||||||
#define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
|
|
||||||
#define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
|
|
||||||
#define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
|
|
||||||
#define SFGAO_CAPABILITYMASK 0x00000177L
|
|
||||||
#define SFGAO_LINK 0x00010000L /* Shortcut (link) */
|
|
||||||
#define SFGAO_SHARE 0x00020000L /* shared */
|
|
||||||
#define SFGAO_READONLY 0x00040000L /* read-only */
|
|
||||||
#define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
|
|
||||||
#define SFGAO_DISPLAYATTRMASK 0x000F0000L
|
|
||||||
#define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
|
|
||||||
#define SFGAO_FOLDER 0x20000000L /* It's a folder. */
|
|
||||||
#define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
|
|
||||||
#define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
|
|
||||||
#define SFGAO_CONTENTSMASK 0x80000000L
|
|
||||||
#define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
|
|
||||||
#define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
|
|
||||||
|
|
||||||
typedef struct IShellFolder_VTable {
|
|
||||||
/* *** IUnknown methods *** */
|
|
||||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
|
||||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
|
||||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
|
||||||
|
|
||||||
/* *** IShellFolder methods *** */
|
|
||||||
STDMETHOD(ParseDisplayName) (THIS_ HWND hwndOwner,LPBC pbcReserved, LPOLESTR lpszDisplayName,ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
|
|
||||||
STDMETHOD(EnumObjects)( THIS_ HWND hwndOwner, DWORD grfFlags, LPENUMIDLIST * ppenumIDList) PURE;
|
|
||||||
STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvOut) PURE;
|
|
||||||
STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvObj) PURE;
|
|
||||||
STDMETHOD(CompareIDs)(THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
|
|
||||||
STDMETHOD(CreateViewObject)(THIS_ HWND hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
|
|
||||||
STDMETHOD(GetAttributesOf)(THIS_ UINT cidl, LPCITEMIDLIST * apidl,ULONG * rgfInOut) PURE;
|
|
||||||
STDMETHOD(GetUIObjectOf)(THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) PURE;
|
|
||||||
STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
|
|
||||||
STDMETHOD(SetNameOf)(THIS_ HWND hwndOwner, LPCITEMIDLIST pidl,LPCOLESTR lpszName, DWORD uFlags,LPITEMIDLIST * ppidlOut) PURE;
|
|
||||||
|
|
||||||
/* utility functions */
|
|
||||||
STDMETHOD_(BOOL,GetFolderPath)(THIS_ LPSTR, DWORD);
|
|
||||||
|
|
||||||
} *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
|
|
||||||
|
|
||||||
struct tagSHELLFOLDER {
|
|
||||||
LPSHELLFOLDER_VTABLE lpvtbl;
|
|
||||||
DWORD ref;
|
|
||||||
LPSTR sMyPath;
|
|
||||||
LPITEMIDLIST pMyPidl;
|
|
||||||
LPITEMIDLIST mpidl;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern LPSHELLFOLDER pdesktopfolder;
|
|
||||||
|
|
||||||
/************************
|
|
||||||
* Shellfolder API
|
|
||||||
*/
|
|
||||||
DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *);
|
|
||||||
#undef THIS
|
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* IShellBrowser interface
|
* IShellBrowser interface
|
||||||
|
50
include/wine/obj_enumidlist.h
Normal file
50
include/wine/obj_enumidlist.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* Defines the COM interfaces and APIs related to EnumIDList
|
||||||
|
*
|
||||||
|
* Depends on 'obj_base.h'.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __WINE_WINE_OBJ_ENUMIDLIST_H
|
||||||
|
#define __WINE_WINE_OBJ_ENUMIDLIST_H
|
||||||
|
|
||||||
|
#include "wine/obj_base.h"
|
||||||
|
#include "shell.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Predeclare the interfaces
|
||||||
|
*/
|
||||||
|
DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
|
||||||
|
typedef struct IEnumIDList IEnumIDList, *LPENUMIDLIST;
|
||||||
|
|
||||||
|
#define ICOM_INTERFACE IEnumIDList
|
||||||
|
#define IEnumIDList_METHODS \
|
||||||
|
ICOM_METHOD3(HRESULT, Next, ULONG, celt, LPITEMIDLIST*, rgelt, ULONG*, pceltFetched) \
|
||||||
|
ICOM_METHOD1(HRESULT, Skip, ULONG, celt) \
|
||||||
|
ICOM_METHOD (HRESULT, Reset) \
|
||||||
|
ICOM_METHOD1(HRESULT, Clone, IEnumIDList**, ppenum) \
|
||||||
|
ICOM_METHOD2(BOOL, CreateEnumList, LPCSTR,, DWORD,) \
|
||||||
|
ICOM_METHOD1(BOOL, AddToEnumList, LPITEMIDLIST,) \
|
||||||
|
ICOM_METHOD (BOOL, DeleteList)
|
||||||
|
#define IEnumIDList_IMETHODS \
|
||||||
|
IUnknown_IMETHODS \
|
||||||
|
IEnumIDList_METHODS
|
||||||
|
ICOM_DEFINE(IEnumIDList,IUnknown)
|
||||||
|
#undef ICOM_INTERFACE
|
||||||
|
|
||||||
|
#ifdef ICOM_CINTERFACE
|
||||||
|
/*** IUnknown methods ***/
|
||||||
|
#define IEnumIDList_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
||||||
|
#define IEnumIDList_AddRef(p) ICOM_CALL (AddRef,p)
|
||||||
|
#define IEnumIDList_Release(p) ICOM_CALL (Release,p)
|
||||||
|
/*** IEnumIDList methods ***/
|
||||||
|
#define IEnumIDList_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
|
||||||
|
#define IEnumIDList_Skip(p,a) ICOM_CALL1(Skip,p,a)
|
||||||
|
#define IEnumIDList_Reset(p) ICOM_CALL(Reset,p)
|
||||||
|
#define IEnumIDList_Clone(p,a) ICOM_CALL1(Clone,p,a)
|
||||||
|
#define IEnumIDList_CreateEnumList(p,a,b) ICOM_CALL2(CreateEnumList,p,a,b)
|
||||||
|
#define IEnumIDList_AddToEnumList(p,a) ICOM_CALL1(AddToEnumList,p,a)
|
||||||
|
#define IEnumIDList_DeleteList(p) ICOM_CALL(DeleteList,p)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __WINE_WINE_OBJ_ENUMIDLIST_H */
|
163
include/wine/obj_shellfolder.h
Normal file
163
include/wine/obj_shellfolder.h
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
/*
|
||||||
|
* Defines the COM interfaces and APIs related to IShellFolder
|
||||||
|
*
|
||||||
|
* Depends on 'obj_base.h'.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __WINE_WINE_OBJ_SHELLFOLDER_H
|
||||||
|
#define __WINE_WINE_OBJ_SHELLFOLDER_H
|
||||||
|
|
||||||
|
#include "wine/obj_base.h"
|
||||||
|
#include "wine/obj_moniker.h" /* for LPBC */
|
||||||
|
#include "wine/obj_enumidlist.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "shell.h"
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* STRRET (temporary, move it away)
|
||||||
|
*/
|
||||||
|
#define STRRET_WSTR 0x0000
|
||||||
|
#define STRRET_OFFSETA 0x0001
|
||||||
|
#define STRRET_CSTRA 0x0002
|
||||||
|
#define STRRET_ASTR 0X0003
|
||||||
|
#define STRRET_OFFSETW 0X0004
|
||||||
|
#define STRRET_CSTRW 0X0005
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _STRRET
|
||||||
|
{ UINT uType; /* STRRET_xxx */
|
||||||
|
union
|
||||||
|
{ LPWSTR pOleStr; /* OLESTR that will be freed */
|
||||||
|
LPSTR pStr;
|
||||||
|
UINT uOffset; /* OffsetINT32o SHITEMID (ANSI) */
|
||||||
|
char cStr[MAX_PATH]; /* Buffer to fill in */
|
||||||
|
WCHAR cStrW[MAX_PATH];
|
||||||
|
}u;
|
||||||
|
} STRRET,*LPSTRRET;
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Predeclare the interfaces
|
||||||
|
*/
|
||||||
|
DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
|
||||||
|
typedef struct IShellFolder IShellFolder, *LPSHELLFOLDER;
|
||||||
|
|
||||||
|
DEFINE_SHLGUID(IID_IPersistFolder, 0x000214EAL, 0, 0);
|
||||||
|
typedef struct IPersistFolder IPersistFolder, *LPPERSISTFOLDER;
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* IShellFolder::GetDisplayNameOf/SetNameOf uFlags
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{ SHGDN_NORMAL = 0, /* default (display purpose) */
|
||||||
|
SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
|
||||||
|
SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
|
||||||
|
} SHGNO;
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* IShellFolder::EnumObjects
|
||||||
|
*/
|
||||||
|
typedef enum tagSHCONTF
|
||||||
|
{ SHCONTF_FOLDERS = 32, /* for shell browser */
|
||||||
|
SHCONTF_NONFOLDERS = 64, /* for default view */
|
||||||
|
SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
|
||||||
|
} SHCONTF;
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* IShellFolder::GetAttributesOf flags
|
||||||
|
*/
|
||||||
|
#define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
|
||||||
|
#define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
|
||||||
|
#define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
|
||||||
|
#define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
|
||||||
|
#define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
|
||||||
|
#define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
|
||||||
|
#define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
|
||||||
|
#define SFGAO_CAPABILITYMASK 0x00000177L
|
||||||
|
#define SFGAO_LINK 0x00010000L /* Shortcut (link) */
|
||||||
|
#define SFGAO_SHARE 0x00020000L /* shared */
|
||||||
|
#define SFGAO_READONLY 0x00040000L /* read-only */
|
||||||
|
#define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
|
||||||
|
#define SFGAO_DISPLAYATTRMASK 0x000F0000L
|
||||||
|
#define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
|
||||||
|
#define SFGAO_FOLDER 0x20000000L /* It's a folder. */
|
||||||
|
#define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
|
||||||
|
#define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
|
||||||
|
#define SFGAO_CONTENTSMASK 0x80000000L
|
||||||
|
#define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
|
||||||
|
#define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* Desktopfolder
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern IShellFolder * pdesktopfolder;
|
||||||
|
|
||||||
|
DWORD WINAPI SHGetDesktopFolder(IShellFolder * *);
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* IShellFolder interface
|
||||||
|
*/
|
||||||
|
#define ICOM_INTERFACE IShellFolder
|
||||||
|
#define IShellFolder_METHODS \
|
||||||
|
ICOM_METHOD6( HRESULT, ParseDisplayName, HWND, hwndOwner,LPBC, pbcReserved, LPOLESTR, lpszDisplayName, ULONG *, pchEaten, LPITEMIDLIST *, ppidl, ULONG *, pdwAttributes) \
|
||||||
|
ICOM_METHOD3( HRESULT, EnumObjects, HWND, hwndOwner, DWORD, grfFlags, LPENUMIDLIST *, ppenumIDList)\
|
||||||
|
ICOM_METHOD4( HRESULT, BindToObject, LPCITEMIDLIST, pidl, LPBC, pbcReserved, REFIID, riid, LPVOID *, ppvOut)\
|
||||||
|
ICOM_METHOD4( HRESULT, BindToStorage, LPCITEMIDLIST, pidl, LPBC, pbcReserved, REFIID, riid, LPVOID *, ppvObj)\
|
||||||
|
ICOM_METHOD3( HRESULT, CompareIDs, LPARAM, lParam, LPCITEMIDLIST, pidl1, LPCITEMIDLIST, pidl2)\
|
||||||
|
ICOM_METHOD3( HRESULT, CreateViewObject, HWND, hwndOwner, REFIID, riid, LPVOID *, ppvOut)\
|
||||||
|
ICOM_METHOD3( HRESULT, GetAttributesOf, UINT, cidl, LPCITEMIDLIST *, apidl, ULONG *, rgfInOut)\
|
||||||
|
ICOM_METHOD6( HRESULT, GetUIObjectOf, HWND, hwndOwner, UINT, cidl, LPCITEMIDLIST *, apidl, REFIID, riid, UINT *, prgfInOut, LPVOID *, ppvOut)\
|
||||||
|
ICOM_METHOD3( HRESULT, GetDisplayNameOf, LPCITEMIDLIST, pidl, DWORD, uFlags, LPSTRRET, lpName)\
|
||||||
|
ICOM_METHOD5( HRESULT, SetNameOf, HWND, hwndOwner, LPCITEMIDLIST, pidl,LPCOLESTR, lpszName, DWORD, uFlags,LPITEMIDLIST *, ppidlOut)\
|
||||||
|
ICOM_METHOD2( HRESULT, GetFolderPath, LPSTR, lpszOut, DWORD, dwOutSize)
|
||||||
|
#define IShellFolder_IMETHODS \
|
||||||
|
IUnknown_IMETHODS \
|
||||||
|
IShellFolder_METHODS
|
||||||
|
ICOM_DEFINE(IShellFolder,IUnknown)
|
||||||
|
#undef ICOM_INTERFACE
|
||||||
|
|
||||||
|
#ifdef ICOM_CINTERFACE
|
||||||
|
/*** IUnknown methods ***/
|
||||||
|
#define IShellFolder_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
||||||
|
#define IShellFolder_AddRef(p) ICOM_CALL (AddRef,p)
|
||||||
|
#define IShellFolder_Release(p) ICOM_CALL (Release,p)
|
||||||
|
/*** IShellFolder methods ***/
|
||||||
|
#define IShellFolder_ParseDisplayName(p,a,b,c,d,e,f) ICOM_CALL6(ParseDisplayName,p,a,b,c,d,e,f)
|
||||||
|
#define IShellFolder_EnumObjects(p,a,b,c) ICOM_CALL3(EnumObjects,p,a,b,c)
|
||||||
|
#define IShellFolder_BindToObject(p,a,b,c,d) ICOM_CALL4(BindToObject,p,a,b,c,d)
|
||||||
|
#define IShellFolder_BindToStorage(p,a,b,c,d) ICOM_CALL4(BindToStorage,p,a,b,c,d)
|
||||||
|
#define IShellFolder_CompareIDs(p,a,b,c) ICOM_CALL3(CompareIDs,p,a,b,c)
|
||||||
|
#define IShellFolder_CreateViewObject(p,a,b,c) ICOM_CALL3(CreateViewObject,p,a,b,c)
|
||||||
|
#define IShellFolder_GetAttributesOf(p,a,b,c) ICOM_CALL3(GetAttributesOf,p,a,b,c)
|
||||||
|
#define IShellFolder_GetUIObjectOf(p,a,b,c,d,e,f) ICOM_CALL6(GetUIObjectOf,p,a,b,c,d,e,f)
|
||||||
|
#define IShellFolder_GetDisplayNameOf(p,a,b,c) ICOM_CALL3(GetDisplayNameOf,p,a,b,c)
|
||||||
|
#define IShellFolder_SetNameOf(p,a,b,c,d,e) ICOM_CALL5(SetNameOf,p,a,b,c,d,e)
|
||||||
|
#define IShellFolder_GetFolderPath(p,a,b) ICOM_CALL2(GetDisplayNameOf,p,a,b)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* IPersistFolder interface
|
||||||
|
*/
|
||||||
|
#define ICOM_INTERFACE IPersistFolder
|
||||||
|
#define IPersistFolder_METHODS \
|
||||||
|
ICOM_METHOD1( HRESULT, Initialize, LPCITEMIDLIST, pidl)
|
||||||
|
#define IPersistFolder_IMETHODS \
|
||||||
|
IPersist_IMETHODS \
|
||||||
|
IPersistFolder_METHODS
|
||||||
|
ICOM_DEFINE(IPersistFolder, IPersist)
|
||||||
|
#undef ICOM_INTERFACE
|
||||||
|
|
||||||
|
#ifdef ICOM_CINTERFACE
|
||||||
|
/*** IUnknown methods ***/
|
||||||
|
#define IPersistFolder_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
||||||
|
#define IPersistFolder_AddRef(p) ICOM_CALL (AddRef,p)
|
||||||
|
#define IPersistFolder_Release(p) ICOM_CALL (Release,p)
|
||||||
|
/*** IPersist methods ***/
|
||||||
|
#define IPersistFolder_GetClassID(p,a) ICOM_CALL1(GetClassID,p,a)
|
||||||
|
/*** IPersistFolder methods ***/
|
||||||
|
#define IPersistFolder_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __WINE_WINE_OBJ_SHELLLINK_H */
|
@ -18,5 +18,7 @@
|
|||||||
#include "dsound.h"
|
#include "dsound.h"
|
||||||
#include "dplay.h"
|
#include "dplay.h"
|
||||||
#include "vfw.h"
|
#include "vfw.h"
|
||||||
|
#include "shlguid.h"
|
||||||
|
#include "shlobj.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user