mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 22:56:17 +00:00
- 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 "spy.h"
|
||||
|
||||
#include "shlobj.h"
|
||||
#include "wine/obj_base.h"
|
||||
#include "wine/obj_enumidlist.h"
|
||||
#include "wine/obj_shellfolder.h"
|
||||
#include "shell.h"
|
||||
#include "pidl.h"
|
||||
#include "shlobj.h"
|
||||
#include "shell32_main.h"
|
||||
#include "shlguid.h"
|
||||
|
||||
|
@ -33,7 +35,7 @@ static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST lpifq, HTREEITEM hPar
|
|||
static void InitializeTreeView(HWND hwndParent)
|
||||
{
|
||||
HIMAGELIST hImageList;
|
||||
LPSHELLFOLDER lpsf;
|
||||
IShellFolder * lpsf;
|
||||
HRESULT hr;
|
||||
|
||||
hwndTreeView = GetDlgItem (hwndParent, IDD_TREEVIEW);
|
||||
|
@ -45,7 +47,7 @@ static void InitializeTreeView(HWND hwndParent)
|
|||
{ TreeView_SetImageList(hwndTreeView, hImageList, 0);
|
||||
}
|
||||
|
||||
hr=SHGetDesktopFolder(&lpsf);
|
||||
hr = SHGetDesktopFolder(&lpsf);
|
||||
|
||||
if (SUCCEEDED(hr) && hwndTreeView)
|
||||
{ TreeView_DeleteAllItems(hwndTreeView);
|
||||
|
@ -53,7 +55,7 @@ static void InitializeTreeView(HWND hwndParent)
|
|||
}
|
||||
|
||||
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;
|
||||
|
||||
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);
|
||||
}
|
||||
else
|
||||
|
@ -95,12 +97,12 @@ static BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPSTR l
|
|||
return bSuccess;
|
||||
}
|
||||
|
||||
static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, HTREEITEM hParent)
|
||||
static void FillTreeView(IShellFolder * lpsf, LPITEMIDLIST pidl, HTREEITEM hParent)
|
||||
{
|
||||
TVITEMA tvi;
|
||||
TVINSERTSTRUCTA tvins;
|
||||
HTREEITEM hPrev = 0;
|
||||
LPENUMIDLIST lpe=0;
|
||||
TVITEMA tvi;
|
||||
TVINSERTSTRUCTA tvins;
|
||||
HTREEITEM hPrev = 0;
|
||||
LPENUMIDLIST lpe=0;
|
||||
LPITEMIDLIST pidlTemp=0;
|
||||
LPTV_ITEMDATA lptvid=0;
|
||||
ULONG ulFetched;
|
||||
|
@ -113,12 +115,12 @@ static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, HTREEITEM hPare
|
|||
SetCapture(GetParent(hwndTreeView));
|
||||
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))
|
||||
{ while (NOERROR == lpe->lpvtbl->fnNext(lpe,1,&pidlTemp,&ulFetched))
|
||||
{ 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_FOLDER)
|
||||
{ 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.lParam = (LPARAM)lptvid;
|
||||
|
||||
lpsf->lpvtbl->fnAddRef(lpsf);
|
||||
IShellFolder_AddRef(lpsf);
|
||||
lptvid->lpsfParent = lpsf;
|
||||
lptvid->lpi = ILClone(pidlTemp);
|
||||
lptvid->lpifq = ILCombine(pidl, pidlTemp);
|
||||
|
@ -161,15 +163,17 @@ Done:
|
|||
ReleaseCapture();
|
||||
SetCursor(LoadCursorA(0, IDC_ARROWA));
|
||||
|
||||
if (lpe) lpe->lpvtbl->fnRelease(lpe);
|
||||
if (pidlTemp ) SHFree(pidlTemp);
|
||||
if (lpe)
|
||||
lpe->lpvtbl->fnRelease(lpe);
|
||||
if (pidlTemp )
|
||||
SHFree(pidlTemp);
|
||||
}
|
||||
|
||||
static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh)
|
||||
{
|
||||
NMTREEVIEWA *pnmtv = (NMTREEVIEWA *)lpnmh;
|
||||
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);
|
||||
|
@ -180,7 +184,7 @@ static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh)
|
|||
{ case TVN_DELETEITEM:
|
||||
{ FIXME(shell,"TVN_DELETEITEM\n");
|
||||
lptvid=(LPTV_ITEMDATA)pnmtv->itemOld.lParam;
|
||||
lptvid->lpsfParent->lpvtbl->fnRelease(lptvid->lpsfParent);
|
||||
IShellFolder_Release(lptvid->lpsfParent);
|
||||
SHFree(lptvid->lpi);
|
||||
SHFree(lptvid->lpifq);
|
||||
SHFree(lptvid);
|
||||
|
@ -193,7 +197,7 @@ static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh)
|
|||
break;
|
||||
|
||||
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 );
|
||||
}
|
||||
TreeView_SortChildren(hwndTreeView, pnmtv->itemNew.hItem, FALSE);
|
||||
|
|
|
@ -266,8 +266,8 @@ static HRESULT WINAPI IContextMenu_fnInvokeCommand(IContextMenu *iface, LPCMINVO
|
|||
break;
|
||||
}
|
||||
|
||||
pidlTemp = ILCombine(This->pSFParent->mpidl, This->aPidls[i]);
|
||||
pidlFQ = ILCombine(This->pSFParent->pMyPidl, pidlTemp);
|
||||
pidlTemp = ILCombine(((IGenericSFImpl*)(This->pSFParent))->mpidl, This->aPidls[i]);
|
||||
pidlFQ = ILCombine(((IGenericSFImpl*)(This->pSFParent))->pMyPidl, pidlTemp);
|
||||
SHFree(pidlTemp);
|
||||
|
||||
ZeroMemory(&sei, sizeof(sei));
|
||||
|
|
|
@ -177,6 +177,7 @@ static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMAT
|
|||
/***********************************************************************
|
||||
* IDataObject implementation
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
|
@ -229,7 +230,7 @@ LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPSHELLFOLDER psf, LPITEMID
|
|||
dto->ref=1;
|
||||
dto->lpvtbl=&dtovt;
|
||||
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 */
|
||||
dto->lpill = IDLList_Constructor (8);
|
||||
|
@ -326,7 +327,7 @@ static BOOL32 DATAOBJECT_InitFileGroupDesc(void)
|
|||
{ return(TRUE);
|
||||
}
|
||||
|
||||
cfFileGroupDesc = RegisterClipboardFormat32A(CFSTR_FILEDESCRIPTORA);
|
||||
cfFileGroupDesc = RegisterClipboardFormatA(CFSTR_FILEDESCRIPTORA);
|
||||
return(cfFileGroupDesc != 0);
|
||||
}
|
||||
*/
|
||||
|
@ -342,7 +343,7 @@ static BOOL32 DATAOBJECT_InitFileContents(void)
|
|||
{ return(TRUE);
|
||||
}
|
||||
|
||||
cfFileContents = RegisterClipboardFormat32A(CFSTR_FILECONTENTS);
|
||||
cfFileContents = RegisterClipboardFormatA(CFSTR_FILECONTENTS);
|
||||
return(cfFileContents != 0);
|
||||
}
|
||||
*/
|
||||
|
|
|
@ -8,48 +8,42 @@
|
|||
#include <string.h>
|
||||
#include "debug.h"
|
||||
#include "wine/obj_base.h"
|
||||
#include "wine/obj_enumidlist.h"
|
||||
#include "winerror.h"
|
||||
|
||||
#include "pidl.h"
|
||||
#include "shlguid.h"
|
||||
#include "shell32_main.h"
|
||||
|
||||
/* IEnumIDList Implementation */
|
||||
static HRESULT WINAPI IEnumIDList_QueryInterface(LPENUMIDLIST,REFIID,LPVOID*);
|
||||
static ULONG WINAPI IEnumIDList_AddRef(LPENUMIDLIST);
|
||||
static ULONG WINAPI IEnumIDList_Release(LPENUMIDLIST);
|
||||
static HRESULT WINAPI IEnumIDList_Next(LPENUMIDLIST,ULONG,LPITEMIDLIST*,ULONG*);
|
||||
static HRESULT WINAPI IEnumIDList_Skip(LPENUMIDLIST,ULONG);
|
||||
static HRESULT WINAPI IEnumIDList_Reset(LPENUMIDLIST);
|
||||
static HRESULT WINAPI IEnumIDList_Clone(LPENUMIDLIST,LPENUMIDLIST*);
|
||||
static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST,LPCSTR, DWORD);
|
||||
static BOOL WINAPI IEnumIDList_AddToEnumList(LPENUMIDLIST,LPITEMIDLIST);
|
||||
static BOOL WINAPI IEnumIDList_DeleteList(LPENUMIDLIST);
|
||||
typedef struct tagENUMLIST
|
||||
{
|
||||
struct tagENUMLIST *pNext;
|
||||
LPITEMIDLIST pidl;
|
||||
|
||||
} ENUMLIST, *LPENUMLIST;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ICOM_VTABLE(IEnumIDList)* lpvtbl;
|
||||
DWORD ref;
|
||||
LPENUMLIST mpFirst;
|
||||
LPENUMLIST mpLast;
|
||||
LPENUMLIST mpCurrent;
|
||||
|
||||
} IEnumIDListImpl;
|
||||
|
||||
static struct ICOM_VTABLE(IEnumIDList) eidlvt;
|
||||
|
||||
/**************************************************************************
|
||||
* IEnumIDList_VTable
|
||||
*/
|
||||
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
|
||||
* IEnumIDList_fnConstructor
|
||||
*/
|
||||
|
||||
LPENUMIDLIST IEnumIDList_Constructor( LPCSTR lpszPath, DWORD dwFlags)
|
||||
{ LPENUMIDLIST lpeidl;
|
||||
IEnumIDList * IEnumIDList_Constructor(
|
||||
LPCSTR lpszPath,
|
||||
DWORD dwFlags)
|
||||
{ IEnumIDListImpl* lpeidl;
|
||||
|
||||
lpeidl = (LPENUMIDLIST)HeapAlloc(GetProcessHeap(),0,sizeof(IEnumIDList));
|
||||
lpeidl = (IEnumIDListImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IEnumIDListImpl));
|
||||
if (! lpeidl)
|
||||
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);
|
||||
|
||||
if(!IEnumIDList_CreateEnumList(lpeidl, lpszPath, dwFlags))
|
||||
if(!IEnumIDList_CreateEnumList((IEnumIDList*)lpeidl, lpszPath, dwFlags))
|
||||
{ if (lpeidl)
|
||||
{ HeapFree(GetProcessHeap(),0,lpeidl);
|
||||
}
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TRACE(shell,"-- (%p)->()\n",lpeidl);
|
||||
shell32_ObjCount++;
|
||||
return lpeidl;
|
||||
return (IEnumIDList*)lpeidl;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* EnumIDList_QueryInterface
|
||||
*/
|
||||
static HRESULT WINAPI IEnumIDList_QueryInterface(
|
||||
LPENUMIDLIST this, REFIID riid, LPVOID *ppvObj)
|
||||
{ char xriid[50];
|
||||
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
||||
TRACE(shell,"(%p)->(\n\tIID:\t%s,%p)\n",this,xriid,ppvObj);
|
||||
static HRESULT WINAPI IEnumIDList_fnQueryInterface(
|
||||
IEnumIDList * iface,
|
||||
REFIID riid,
|
||||
LPVOID *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 = this;
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IEnumIDList)) /*IEnumIDList*/
|
||||
{ *ppvObj = (IEnumIDList*)this;
|
||||
}
|
||||
*ppvObj = NULL;
|
||||
|
||||
if(*ppvObj)
|
||||
{ (*(LPENUMIDLIST*)ppvObj)->lpvtbl->fnAddRef(this);
|
||||
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
||||
return S_OK;
|
||||
}
|
||||
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
|
||||
{ *ppvObj = This;
|
||||
}
|
||||
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");
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* IEnumIDList_AddRef
|
||||
* IEnumIDList_fnAddRef
|
||||
*/
|
||||
static ULONG WINAPI IEnumIDList_AddRef(LPENUMIDLIST this)
|
||||
{ TRACE(shell,"(%p)->(%lu)\n",this,this->ref);
|
||||
static ULONG WINAPI IEnumIDList_fnAddRef(
|
||||
IEnumIDList * iface)
|
||||
{
|
||||
ICOM_THIS(IEnumIDListImpl,iface);
|
||||
|
||||
TRACE(shell,"(%p)->(%lu)\n",This,This->ref);
|
||||
|
||||
shell32_ObjCount++;
|
||||
return ++(this->ref);
|
||||
return ++(This->ref);
|
||||
}
|
||||
/******************************************************************************
|
||||
* IEnumIDList_Release
|
||||
* IEnumIDList_fnRelease
|
||||
*/
|
||||
static ULONG WINAPI IEnumIDList_Release(LPENUMIDLIST this)
|
||||
{ TRACE(shell,"(%p)->(%lu)\n",this,this->ref);
|
||||
static ULONG WINAPI IEnumIDList_fnRelease(
|
||||
IEnumIDList * iface)
|
||||
{
|
||||
ICOM_THIS(IEnumIDListImpl,iface);
|
||||
|
||||
TRACE(shell,"(%p)->(%lu)\n",This,This->ref);
|
||||
|
||||
shell32_ObjCount--;
|
||||
|
||||
if (!--(this->ref))
|
||||
{ TRACE(shell," destroying IEnumIDList(%p)\n",this);
|
||||
IEnumIDList_DeleteList(this);
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
if (!--(This->ref))
|
||||
{ TRACE(shell," destroying IEnumIDList(%p)\n",This);
|
||||
IEnumIDList_DeleteList((IEnumIDList*)This);
|
||||
HeapFree(GetProcessHeap(),0,This);
|
||||
return 0;
|
||||
}
|
||||
return this->ref;
|
||||
return This->ref;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* IEnumIDList_Next
|
||||
* IEnumIDList_fnNext
|
||||
*/
|
||||
|
||||
static HRESULT WINAPI IEnumIDList_Next(
|
||||
LPENUMIDLIST this,ULONG celt,LPITEMIDLIST * rgelt,ULONG *pceltFetched)
|
||||
{ ULONG i;
|
||||
static HRESULT WINAPI IEnumIDList_fnNext(
|
||||
IEnumIDList * iface,
|
||||
ULONG celt,
|
||||
LPITEMIDLIST * rgelt,
|
||||
ULONG *pceltFetched)
|
||||
{
|
||||
ICOM_THIS(IEnumIDListImpl,iface);
|
||||
|
||||
ULONG i;
|
||||
HRESULT hr = S_OK;
|
||||
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
|
||||
* 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++)
|
||||
{ if(!(this->mpCurrent))
|
||||
{ if(!(This->mpCurrent))
|
||||
{ hr = S_FALSE;
|
||||
break;
|
||||
}
|
||||
temp = ILClone(this->mpCurrent->pidl);
|
||||
temp = ILClone(This->mpCurrent->pidl);
|
||||
rgelt[i] = temp;
|
||||
this->mpCurrent = this->mpCurrent->pNext;
|
||||
This->mpCurrent = This->mpCurrent->pNext;
|
||||
}
|
||||
if(pceltFetched)
|
||||
{ *pceltFetched = i;
|
||||
|
@ -167,38 +181,48 @@ static HRESULT WINAPI IEnumIDList_Next(
|
|||
}
|
||||
|
||||
/**************************************************************************
|
||||
* IEnumIDList_Skip
|
||||
* IEnumIDList_fnSkip
|
||||
*/
|
||||
static HRESULT WINAPI IEnumIDList_Skip(
|
||||
LPENUMIDLIST this,ULONG celt)
|
||||
{ DWORD dwIndex;
|
||||
HRESULT hr = S_OK;
|
||||
static HRESULT WINAPI IEnumIDList_fnSkip(
|
||||
IEnumIDList * iface,ULONG celt)
|
||||
{
|
||||
ICOM_THIS(IEnumIDListImpl,iface);
|
||||
|
||||
TRACE(shell,"(%p)->(%lu)\n",this,celt);
|
||||
DWORD dwIndex;
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
for(dwIndex = 0; dwIndex < celt; dwIndex++)
|
||||
{ if(!this->mpCurrent)
|
||||
{ hr = S_FALSE;
|
||||
break;
|
||||
}
|
||||
this->mpCurrent = this->mpCurrent->pNext;
|
||||
}
|
||||
return hr;
|
||||
TRACE(shell,"(%p)->(%lu)\n",This,celt);
|
||||
|
||||
for(dwIndex = 0; dwIndex < celt; dwIndex++)
|
||||
{ if(!This->mpCurrent)
|
||||
{ hr = S_FALSE;
|
||||
break;
|
||||
}
|
||||
This->mpCurrent = This->mpCurrent->pNext;
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
/**************************************************************************
|
||||
* IEnumIDList_Reset
|
||||
* IEnumIDList_fnReset
|
||||
*/
|
||||
static HRESULT WINAPI IEnumIDList_Reset(LPENUMIDLIST this)
|
||||
{ TRACE(shell,"(%p)\n",this);
|
||||
this->mpCurrent = this->mpFirst;
|
||||
return S_OK;
|
||||
static HRESULT WINAPI IEnumIDList_fnReset(
|
||||
IEnumIDList * iface)
|
||||
{
|
||||
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(
|
||||
LPENUMIDLIST this,LPENUMIDLIST * ppenum)
|
||||
{ TRACE(shell,"(%p)->() to (%p)->() E_NOTIMPL\n",this,ppenum);
|
||||
static HRESULT WINAPI IEnumIDList_fnClone(
|
||||
IEnumIDList * iface,LPENUMIDLIST * ppenum)
|
||||
{
|
||||
ICOM_THIS(IEnumIDListImpl,iface);
|
||||
|
||||
TRACE(shell,"(%p)->() to (%p)->() E_NOTIMPL\n",This,ppenum);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
/**************************************************************************
|
||||
|
@ -206,16 +230,22 @@ static HRESULT WINAPI IEnumIDList_Clone(
|
|||
* fixme: devices not handled
|
||||
* fixme: add wildcards to path
|
||||
*/
|
||||
static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPath, DWORD dwFlags)
|
||||
{ LPITEMIDLIST pidl=NULL;
|
||||
static BOOL WINAPI IEnumIDList_fnCreateEnumList(
|
||||
IEnumIDList * iface,
|
||||
LPCSTR lpszPath,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
ICOM_THIS(IEnumIDListImpl,iface);
|
||||
|
||||
LPITEMIDLIST pidl=NULL;
|
||||
LPPIDLDATA pData=NULL;
|
||||
WIN32_FIND_DATAA stffile;
|
||||
HANDLE hFile;
|
||||
DWORD dwDrivemap;
|
||||
CHAR szDriveName[4];
|
||||
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')
|
||||
{ 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...
|
||||
so we need to fake an enumeration of those.*/
|
||||
if(!lpszPath)
|
||||
{ TRACE (shell,"-- (%p)-> enumerate SHCONTF_FOLDERS (special) items\n",this);
|
||||
/*create the pidl for this item */
|
||||
{ TRACE (shell,"-- (%p)-> enumerate SHCONTF_FOLDERS (special) items\n",This);
|
||||
/*create the pidl for This item */
|
||||
pidl = _ILCreateMyComputer();
|
||||
if(pidl)
|
||||
{ if(!IEnumIDList_AddToEnumList(this, pidl))
|
||||
{ if(!IEnumIDList_AddToEnumList((IEnumIDList*)This, pidl))
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
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();
|
||||
strcpy (szDriveName,"A:\\");
|
||||
while (szDriveName[0]<='Z')
|
||||
{ if(dwDrivemap & 0x00000001L)
|
||||
{ pidl = _ILCreateDrive(szDriveName);
|
||||
if(pidl)
|
||||
{ if(!IEnumIDList_AddToEnumList(this, pidl))
|
||||
{ if(!IEnumIDList_AddToEnumList((IEnumIDList*)This, pidl))
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -252,8 +282,8 @@ static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPath
|
|||
dwDrivemap = dwDrivemap >> 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{ TRACE (shell,"-- (%p)-> enumerate SHCONTF_FOLDERS of %s\n",this,debugstr_a(szPath));
|
||||
else
|
||||
{ TRACE (shell,"-- (%p)-> enumerate SHCONTF_FOLDERS of %s\n",This,debugstr_a(szPath));
|
||||
hFile = FindFirstFileA(szPath,&stffile);
|
||||
if ( hFile != INVALID_HANDLE_VALUE )
|
||||
{ do
|
||||
|
@ -261,10 +291,10 @@ static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPath
|
|||
{ pidl = _ILCreateFolder( stffile.cAlternateFileName, stffile.cFileName);
|
||||
if(pidl)
|
||||
{ pData = _ILGetDataPointer(pidl);
|
||||
FileTimeToDosDateTime(&stffile.ftLastWriteTime,&pData->u.folder.uFileDate,&pData->u.folder.uFileTime);
|
||||
pData->u.folder.dwFileSize = stffile.nFileSizeLow;
|
||||
pData->u.folder.uFileAttribs=stffile.dwFileAttributes;
|
||||
if(!IEnumIDList_AddToEnumList(this, pidl))
|
||||
FileTimeToDosDateTime(&stffile.ftLastWriteTime,&pData->u.folder.uFileDate,&pData->u.folder.uFileTime);
|
||||
pData->u.folder.dwFileSize = stffile.nFileSizeLow;
|
||||
pData->u.folder.uFileAttribs=stffile.dwFileAttributes;
|
||||
if(!IEnumIDList_AddToEnumList((IEnumIDList*)This, pidl))
|
||||
{ return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -280,7 +310,7 @@ static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPath
|
|||
/*enumerate the non-folder items (values) */
|
||||
if(dwFlags & SHCONTF_NONFOLDERS)
|
||||
{ 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);
|
||||
if ( hFile != INVALID_HANDLE_VALUE )
|
||||
{ do
|
||||
|
@ -288,10 +318,10 @@ static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPath
|
|||
{ pidl = _ILCreateValue( stffile.cAlternateFileName, stffile.cFileName);
|
||||
if(pidl)
|
||||
{ pData = _ILGetDataPointer(pidl);
|
||||
FileTimeToDosDateTime(&stffile.ftLastWriteTime,&pData->u.file.uFileDate,&pData->u.file.uFileTime);
|
||||
pData->u.file.dwFileSize = stffile.nFileSizeLow;
|
||||
pData->u.file.uFileAttribs=stffile.dwFileAttributes;
|
||||
if(!IEnumIDList_AddToEnumList(this, pidl))
|
||||
FileTimeToDosDateTime(&stffile.ftLastWriteTime,&pData->u.file.uFileDate,&pData->u.file.uFileTime);
|
||||
pData->u.file.dwFileSize = stffile.nFileSizeLow;
|
||||
pData->u.file.uFileAttribs=stffile.dwFileAttributes;
|
||||
if(!IEnumIDList_AddToEnumList((IEnumIDList*)This, pidl))
|
||||
{ return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -310,30 +340,35 @@ static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPath
|
|||
/**************************************************************************
|
||||
* EnumIDList_AddToEnumList()
|
||||
*/
|
||||
static BOOL WINAPI IEnumIDList_AddToEnumList(LPENUMIDLIST this,LPITEMIDLIST pidl)
|
||||
{ LPENUMLIST pNew;
|
||||
static BOOL WINAPI IEnumIDList_fnAddToEnumList(
|
||||
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));
|
||||
if(pNew)
|
||||
{ /*set the next pointer */
|
||||
pNew->pNext = NULL;
|
||||
pNew->pidl = pidl;
|
||||
|
||||
/*is this the first item in the list? */
|
||||
if(!this->mpFirst)
|
||||
{ this->mpFirst = pNew;
|
||||
this->mpCurrent = pNew;
|
||||
/*is This the first item in the list? */
|
||||
if(!This->mpFirst)
|
||||
{ This->mpFirst = pNew;
|
||||
This->mpCurrent = pNew;
|
||||
}
|
||||
|
||||
if(this->mpLast)
|
||||
if(This->mpLast)
|
||||
{ /*add the new item to the end of the list */
|
||||
this->mpLast->pNext = pNew;
|
||||
This->mpLast->pNext = pNew;
|
||||
}
|
||||
|
||||
/*update the last item pointer */
|
||||
this->mpLast = pNew;
|
||||
TRACE(shell,"-- (%p)->(first=%p, last=%p)\n",this,this->mpFirst,this->mpLast);
|
||||
This->mpLast = pNew;
|
||||
TRACE(shell,"-- (%p)->(first=%p, last=%p)\n",This,This->mpFirst,This->mpLast);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
@ -341,17 +376,37 @@ static BOOL WINAPI IEnumIDList_AddToEnumList(LPENUMIDLIST this,LPITEMIDLIST pidl
|
|||
/**************************************************************************
|
||||
* EnumIDList_DeleteList()
|
||||
*/
|
||||
static BOOL WINAPI IEnumIDList_DeleteList(LPENUMIDLIST this)
|
||||
{ LPENUMLIST pDelete;
|
||||
static BOOL WINAPI IEnumIDList_fnDeleteList(
|
||||
IEnumIDList * iface)
|
||||
{
|
||||
ICOM_THIS(IEnumIDListImpl,iface);
|
||||
|
||||
TRACE(shell,"(%p)->()\n",this);
|
||||
LPENUMLIST pDelete;
|
||||
|
||||
TRACE(shell,"(%p)->()\n",This);
|
||||
|
||||
while(this->mpFirst)
|
||||
{ pDelete = this->mpFirst;
|
||||
this->mpFirst = pDelete->pNext;
|
||||
SHFree(pDelete->pidl);
|
||||
SHFree(pDelete);
|
||||
}
|
||||
this->mpFirst = this->mpLast = this->mpCurrent = NULL;
|
||||
return TRUE;
|
||||
while(This->mpFirst)
|
||||
{ pDelete = This->mpFirst;
|
||||
This->mpFirst = pDelete->pNext;
|
||||
SHFree(pDelete->pidl);
|
||||
SHFree(pDelete);
|
||||
}
|
||||
This->mpFirst = This->mpLast = This->mpCurrent = NULL;
|
||||
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
|
||||
*/
|
||||
#ifdef __WINE__
|
||||
extern LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPSHELLFOLDER psf, LPITEMIDLIST * apidl, UINT cidl);
|
||||
extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []);
|
||||
|
||||
|
@ -83,12 +82,23 @@ extern LPCLASSFACTORY IShellLinkW_CF_Constructor(void);
|
|||
|
||||
extern LPCLASSFACTORY IClassFactory_Constructor(void);
|
||||
extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT);
|
||||
extern LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER,LPITEMIDLIST);
|
||||
extern LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER, LPCITEMIDLIST);
|
||||
extern LPSHELLLINK IShellLink_Constructor(void);
|
||||
extern LPSHELLLINKW IShellLinkW_Constructor(void);
|
||||
extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD);
|
||||
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
|
||||
|
|
|
@ -7,4 +7,17 @@
|
|||
*
|
||||
*/
|
||||
#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 "pidl.h"
|
||||
#include "shlobj.h"
|
||||
#include "wine/obj_base.h"
|
||||
#include "wine/obj_dragdrop.h"
|
||||
#include "wine/obj_shellfolder.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
|
||||
*/
|
||||
|
@ -226,32 +212,28 @@ LPSTR GetNextElement(LPSTR pszNext,LPSTR pszOut,DWORD dwOut)
|
|||
/***********************************************************************
|
||||
* IShellFolder implementation
|
||||
*/
|
||||
static struct IShellFolder_VTable sfvt =
|
||||
{ IShellFolder_QueryInterface,
|
||||
IShellFolder_AddRef,
|
||||
IShellFolder_Release,
|
||||
IShellFolder_ParseDisplayName,
|
||||
IShellFolder_EnumObjects,
|
||||
IShellFolder_BindToObject,
|
||||
IShellFolder_BindToStorage,
|
||||
IShellFolder_CompareIDs,
|
||||
IShellFolder_CreateViewObject,
|
||||
IShellFolder_GetAttributesOf,
|
||||
IShellFolder_GetUIObjectOf,
|
||||
IShellFolder_GetDisplayNameOf,
|
||||
IShellFolder_SetNameOf,
|
||||
IShellFolder_GetFolderPath
|
||||
};
|
||||
|
||||
static struct ICOM_VTABLE(IShellFolder) sfvt;
|
||||
static struct ICOM_VTABLE(IPersistFolder) psfvt;
|
||||
|
||||
#define _IPersistFolder_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblPersistFolder)))
|
||||
#define _ICOM_THIS_From_IPersistFolder(class, name) class* This = (class*)(((void*)name)-_IPersistFolder_Offset);
|
||||
|
||||
/**************************************************************************
|
||||
* IShellFolder_Constructor
|
||||
*/
|
||||
|
||||
LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER pParent,LPITEMIDLIST pidl)
|
||||
{ LPSHELLFOLDER sf;
|
||||
DWORD dwSize=0;
|
||||
sf=(LPSHELLFOLDER)HeapAlloc(GetProcessHeap(),0,sizeof(IShellFolder));
|
||||
IShellFolder * IShellFolder_Constructor(
|
||||
IGenericSFImpl * pParent,
|
||||
LPITEMIDLIST pidl)
|
||||
{
|
||||
IGenericSFImpl * sf;
|
||||
DWORD dwSize=0;
|
||||
|
||||
sf=(IGenericSFImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IGenericSFImpl));
|
||||
sf->ref=1;
|
||||
sf->lpvtbl=&sfvt;
|
||||
sf->lpvtblPersistFolder=&psfvt;
|
||||
sf->sMyPath=NULL; /* path of the folder */
|
||||
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*/
|
||||
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;
|
||||
if(pParent->sMyPath) /* get the size of the parents path */
|
||||
{ dwSize += strlen(pParent->sMyPath) ;
|
||||
|
@ -284,31 +266,40 @@ LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER pParent,LPITEMIDLIST pidl)
|
|||
}
|
||||
}
|
||||
shell32_ObjCount++;
|
||||
return sf;
|
||||
return (IShellFolder *)sf;
|
||||
}
|
||||
/**************************************************************************
|
||||
* IShellFolder::QueryInterface
|
||||
* PARAMETERS
|
||||
* REFIID riid, //[in ] Requested InterfaceID
|
||||
* LPVOID* ppvObject) //[out] Interface* to hold the result
|
||||
*/
|
||||
static HRESULT WINAPI IShellFolder_QueryInterface(
|
||||
LPSHELLFOLDER this, REFIID riid, LPVOID *ppvObj)
|
||||
{ char xriid[50];
|
||||
* IShellFolder_fnQueryInterface
|
||||
*
|
||||
* PARAMETERS
|
||||
* REFIID riid [in ] Requested InterfaceID
|
||||
* LPVOID* ppvObject [out] Interface* to hold the result
|
||||
*/
|
||||
static HRESULT WINAPI IShellFolder_fnQueryInterface(
|
||||
IShellFolder * iface,
|
||||
REFIID riid,
|
||||
LPVOID *ppvObj)
|
||||
{
|
||||
ICOM_THIS(IGenericSFImpl, iface);
|
||||
|
||||
char xriid[50];
|
||||
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;
|
||||
|
||||
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
|
||||
{ *ppvObj = this;
|
||||
{ *ppvObj = This;
|
||||
}
|
||||
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)
|
||||
{ (*(LPSHELLFOLDER*)ppvObj)->lpvtbl->fnAddRef(this);
|
||||
{ IShellFolder_AddRef((IShellFolder*)*ppvObj);
|
||||
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -320,44 +311,51 @@ static HRESULT WINAPI IShellFolder_QueryInterface(
|
|||
* IShellFolder::AddRef
|
||||
*/
|
||||
|
||||
static ULONG WINAPI IShellFolder_AddRef(LPSHELLFOLDER this)
|
||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
static ULONG WINAPI IShellFolder_fnAddRef(IShellFolder * iface)
|
||||
{
|
||||
ICOM_THIS(IGenericSFImpl, iface);
|
||||
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",This,This->ref);
|
||||
|
||||
shell32_ObjCount++;
|
||||
return ++(this->ref);
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* IShellFolder_Release
|
||||
* IShellFolder_fnRelease
|
||||
*/
|
||||
static ULONG WINAPI IShellFolder_Release(LPSHELLFOLDER this)
|
||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
|
||||
static ULONG WINAPI IShellFolder_fnRelease(IShellFolder * iface)
|
||||
{
|
||||
ICOM_THIS(IGenericSFImpl, iface);
|
||||
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",This,This->ref);
|
||||
|
||||
shell32_ObjCount--;
|
||||
if (!--(this->ref))
|
||||
{ TRACE(shell,"-- destroying IShellFolder(%p)\n",this);
|
||||
if (!--(This->ref))
|
||||
{ TRACE(shell,"-- destroying IShellFolder(%p)\n",This);
|
||||
|
||||
if (pdesktopfolder==this)
|
||||
if (pdesktopfolder == iface)
|
||||
{ pdesktopfolder=NULL;
|
||||
TRACE(shell,"-- destroyed IShellFolder(%p) was Desktopfolder\n",this);
|
||||
TRACE(shell,"-- destroyed IShellFolder(%p) was Desktopfolder\n",This);
|
||||
}
|
||||
if(this->pMyPidl)
|
||||
{ SHFree(this->pMyPidl);
|
||||
if(This->pMyPidl)
|
||||
{ SHFree(This->pMyPidl);
|
||||
}
|
||||
if(this->mpidl)
|
||||
{ SHFree(this->mpidl);
|
||||
if(This->mpidl)
|
||||
{ SHFree(This->mpidl);
|
||||
}
|
||||
if(this->sMyPath)
|
||||
{ SHFree(this->sMyPath);
|
||||
if(This->sMyPath)
|
||||
{ SHFree(This->sMyPath);
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
HeapFree(GetProcessHeap(),0,This);
|
||||
|
||||
return 0;
|
||||
}
|
||||
return this->ref;
|
||||
return This->ref;
|
||||
}
|
||||
/**************************************************************************
|
||||
* IShellFolder_ParseDisplayName
|
||||
* IShellFolder_fnParseDisplayName
|
||||
* PARAMETERS
|
||||
* HWND hwndOwner, //[in ] Parent window for any message's
|
||||
* LPBC pbc, //[in ] reserved
|
||||
|
@ -369,23 +367,26 @@ static ULONG WINAPI IShellFolder_Release(LPSHELLFOLDER this)
|
|||
* FIXME:
|
||||
* pdwAttributes: not used
|
||||
*/
|
||||
static HRESULT WINAPI IShellFolder_ParseDisplayName(
|
||||
LPSHELLFOLDER this,
|
||||
static HRESULT WINAPI IShellFolder_fnParseDisplayName(
|
||||
IShellFolder * iface,
|
||||
HWND hwndOwner,
|
||||
LPBC pbcReserved,
|
||||
LPOLESTR lpszDisplayName,
|
||||
DWORD *pchEaten,
|
||||
LPITEMIDLIST *ppidl,
|
||||
DWORD *pdwAttributes)
|
||||
{ HRESULT hr=E_OUTOFMEMORY;
|
||||
LPITEMIDLIST pidlFull=NULL, pidlTemp = NULL, pidlOld = NULL;
|
||||
LPSTR pszNext=NULL;
|
||||
CHAR szTemp[MAX_PATH],szElement[MAX_PATH];
|
||||
BOOL bIsFile;
|
||||
|
||||
{
|
||||
ICOM_THIS(IGenericSFImpl, iface);
|
||||
|
||||
HRESULT hr=E_OUTOFMEMORY;
|
||||
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",
|
||||
this,hwndOwner,pbcReserved,lpszDisplayName,
|
||||
debugstr_w(lpszDisplayName),pchEaten,ppidl,pdwAttributes);
|
||||
This,hwndOwner,pbcReserved,lpszDisplayName,
|
||||
debugstr_w(lpszDisplayName),pchEaten,ppidl,pdwAttributes);
|
||||
|
||||
{ hr = E_FAIL;
|
||||
WideCharToLocal(szTemp, lpszDisplayName, lstrlenW(lpszDisplayName) + 1);
|
||||
|
@ -398,12 +399,12 @@ static HRESULT WINAPI IShellFolder_ParseDisplayName(
|
|||
}
|
||||
else
|
||||
{ if (!PathIsRootA(szTemp))
|
||||
{ if (this->sMyPath && strlen (this->sMyPath))
|
||||
{ if (strcmp(this->sMyPath,"My Computer"))
|
||||
{ strcpy (szElement,this->sMyPath);
|
||||
{ if (This->sMyPath && strlen (This->sMyPath))
|
||||
{ if (strcmp(This->sMyPath,"My Computer"))
|
||||
{ strcpy (szElement,This->sMyPath);
|
||||
PathAddBackslashA (szElement);
|
||||
strcat (szElement, szTemp);
|
||||
strcpy (szTemp, szElement);
|
||||
strcat (szElement, szTemp);
|
||||
strcpy (szTemp, szElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -417,7 +418,7 @@ static HRESULT WINAPI IShellFolder_ParseDisplayName(
|
|||
pidlOld = pidlFull;
|
||||
pidlFull = ILCombine(pidlFull,pidlTemp);
|
||||
SHFree(pidlOld);
|
||||
|
||||
|
||||
if(pidlFull)
|
||||
{ while((pszNext=GetNextElement(pszNext, szElement, MAX_PATH)))
|
||||
{ if(!*pszNext && bIsFile)
|
||||
|
@ -440,94 +441,93 @@ static HRESULT WINAPI IShellFolder_ParseDisplayName(
|
|||
}
|
||||
|
||||
/**************************************************************************
|
||||
* IShellFolder_EnumObjects
|
||||
* IShellFolder_fnEnumObjects
|
||||
* PARAMETERS
|
||||
* HWND hwndOwner, //[in ] Parent Window
|
||||
* DWORD grfFlags, //[in ] SHCONTF enumeration mask
|
||||
* LPENUMIDLIST* ppenumIDList //[out] IEnumIDList interface
|
||||
*/
|
||||
static HRESULT WINAPI IShellFolder_EnumObjects(
|
||||
LPSHELLFOLDER this,
|
||||
static HRESULT WINAPI IShellFolder_fnEnumObjects(
|
||||
IShellFolder * iface,
|
||||
HWND hwndOwner,
|
||||
DWORD dwFlags,
|
||||
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 = IEnumIDList_Constructor (this->sMyPath, dwFlags);
|
||||
TRACE(shell,"-- (%p)->(new ID List: %p)\n",this,*ppEnumIDList);
|
||||
*ppEnumIDList = IEnumIDList_Constructor (This->sMyPath, dwFlags);
|
||||
TRACE(shell,"-- (%p)->(new ID List: %p)\n",This,*ppEnumIDList);
|
||||
if(!*ppEnumIDList)
|
||||
{ return E_OUTOFMEMORY;
|
||||
}
|
||||
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
|
||||
* LPCITEMIDLIST pidl, //[in ] complex pidl to open
|
||||
* LPBC pbc, //[in ] reserved
|
||||
* REFIID riid, //[in ] Initial 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)
|
||||
{ char xriid[50];
|
||||
HRESULT hr;
|
||||
LPSHELLFOLDER pShellFolder;
|
||||
{
|
||||
ICOM_THIS(IGenericSFImpl, iface);
|
||||
|
||||
char xriid[50];
|
||||
HRESULT hr;
|
||||
LPSHELLFOLDER pShellFolder;
|
||||
|
||||
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;
|
||||
|
||||
pShellFolder = IShellFolder_Constructor(this, pidl);
|
||||
pShellFolder = IShellFolder_Constructor(This, pidl);
|
||||
|
||||
if(!pShellFolder)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
hr = pShellFolder->lpvtbl->fnQueryInterface(pShellFolder, riid, ppvOut);
|
||||
pShellFolder->lpvtbl->fnRelease(pShellFolder);
|
||||
TRACE(shell,"-- (%p)->(interface=%p)\n",this, ppvOut);
|
||||
pShellFolder->lpvtbl->fnRelease(pShellFolder);
|
||||
TRACE(shell,"-- (%p)->(interface=%p)\n",This, ppvOut);
|
||||
return hr;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* IShellFolder_BindToStorage
|
||||
* IShellFolder_fnBindToStorage
|
||||
* PARAMETERS
|
||||
* LPCITEMIDLIST pidl, //[in ] complex pidl to store
|
||||
* LPBC pbc, //[in ] reserved
|
||||
* REFIID riid, //[in ] Initial storage interface
|
||||
* LPVOID* ppvObject //[out] Interface* returned
|
||||
*/
|
||||
static HRESULT WINAPI IShellFolder_BindToStorage(LPSHELLFOLDER this,
|
||||
LPCITEMIDLIST pidl,LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
|
||||
{ char xriid[50];
|
||||
static HRESULT WINAPI IShellFolder_fnBindToStorage(
|
||||
IShellFolder * iface,
|
||||
LPCITEMIDLIST pidl,
|
||||
LPBC pbcReserved,
|
||||
REFIID riid,
|
||||
LPVOID *ppvOut)
|
||||
{
|
||||
ICOM_THIS(IGenericSFImpl, iface);
|
||||
|
||||
char xriid[50];
|
||||
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;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* IShellFolder_CompareIDs
|
||||
* IShellFolder_fnCompareIDs
|
||||
*
|
||||
* PARMETERS
|
||||
* LPARAM lParam, //[in ] Column?
|
||||
|
@ -541,58 +541,64 @@ static HRESULT WINAPI IShellFolder_BindToStorage(LPSHELLFOLDER this,
|
|||
* FIXME
|
||||
* we have to handle simple pidl's only (?)
|
||||
*/
|
||||
static HRESULT WINAPI IShellFolder_CompareIDs(LPSHELLFOLDER this,
|
||||
LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
|
||||
{ CHAR szString1[MAX_PATH] = "";
|
||||
CHAR szString2[MAX_PATH] = "";
|
||||
int nReturn;
|
||||
LPCITEMIDLIST pidlTemp1 = pidl1, pidlTemp2 = pidl2;
|
||||
static HRESULT WINAPI IShellFolder_fnCompareIDs(
|
||||
IShellFolder * iface,
|
||||
LPARAM lParam,
|
||||
LPCITEMIDLIST pidl1,
|
||||
LPCITEMIDLIST pidl2)
|
||||
{
|
||||
ICOM_THIS(IGenericSFImpl, iface);
|
||||
|
||||
TRACE(shell,"(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n",this,lParam,pidl1,pidl2);
|
||||
pdump (pidl1);
|
||||
pdump (pidl2);
|
||||
CHAR szString1[MAX_PATH] = "";
|
||||
CHAR szString2[MAX_PATH] = "";
|
||||
int nReturn;
|
||||
LPCITEMIDLIST pidlTemp1 = pidl1, pidlTemp2 = pidl2;
|
||||
|
||||
if (!pidl1 && !pidl2)
|
||||
return 0;
|
||||
if (!pidl1) /* Desktop < anything */
|
||||
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);
|
||||
TRACE(shell,"(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n",This,lParam,pidl1,pidl2);
|
||||
pdump (pidl1);
|
||||
pdump (pidl2);
|
||||
|
||||
/* at this point, both pidlTemp1 and pidlTemp2 point to the last item in the list */
|
||||
if(_ILIsValue(pidlTemp1) != _ILIsValue(pidlTemp2))
|
||||
{ if(_ILIsValue(pidlTemp1))
|
||||
return 1;
|
||||
return -1;
|
||||
}
|
||||
if (!pidl1 && !pidl2)
|
||||
return 0;
|
||||
if (!pidl1) /* Desktop < anything */
|
||||
return -1;
|
||||
if (!pidl2)
|
||||
return 1;
|
||||
|
||||
_ILGetDrive( pidl1,szString1,sizeof(szString1));
|
||||
_ILGetDrive( pidl2,szString1,sizeof(szString2));
|
||||
nReturn = strcasecmp(szString1, szString2);
|
||||
/* get the last item in each list */
|
||||
while((ILGetNext(pidlTemp1))->mkid.cb)
|
||||
pidlTemp1 = ILGetNext(pidlTemp1);
|
||||
while((ILGetNext(pidlTemp2))->mkid.cb)
|
||||
pidlTemp2 = ILGetNext(pidlTemp2);
|
||||
|
||||
if(nReturn)
|
||||
return nReturn;
|
||||
/* at This point, both pidlTemp1 and pidlTemp2 point to the last item in the list */
|
||||
if(_ILIsValue(pidlTemp1) != _ILIsValue(pidlTemp2))
|
||||
{ if(_ILIsValue(pidlTemp1))
|
||||
return 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
_ILGetFolderText( pidl1,szString1,sizeof(szString1));
|
||||
_ILGetFolderText( pidl2,szString2,sizeof(szString2));
|
||||
nReturn = strcasecmp(szString1, szString2);
|
||||
_ILGetDrive( pidl1,szString1,sizeof(szString1));
|
||||
_ILGetDrive( pidl2,szString2,sizeof(szString2));
|
||||
nReturn = strcasecmp(szString2, szString1);
|
||||
|
||||
if(nReturn)
|
||||
return nReturn;
|
||||
if(nReturn)
|
||||
return nReturn;
|
||||
|
||||
_ILGetValueText(pidl1,szString1,sizeof(szString1));
|
||||
_ILGetValueText(pidl2,szString2,sizeof(szString2));
|
||||
return strcasecmp(szString1, szString2);
|
||||
_ILGetFolderText( pidl1,szString1,sizeof(szString1));
|
||||
_ILGetFolderText( pidl2,szString2,sizeof(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
|
||||
* IShellView / IShellBrowser / IContextMenu
|
||||
*
|
||||
|
@ -604,30 +610,33 @@ static HRESULT WINAPI IShellFolder_CompareIDs(LPSHELLFOLDER this,
|
|||
* NOTES
|
||||
* the same as SHCreateShellFolderViewEx ???
|
||||
*/
|
||||
static HRESULT WINAPI IShellFolder_CreateViewObject( LPSHELLFOLDER this,
|
||||
static HRESULT WINAPI IShellFolder_fnCreateViewObject( IShellFolder * iface,
|
||||
HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
|
||||
{ LPSHELLVIEW pShellView;
|
||||
{
|
||||
ICOM_THIS(IGenericSFImpl, iface);
|
||||
|
||||
LPSHELLVIEW pShellView;
|
||||
char xriid[50];
|
||||
HRESULT hr;
|
||||
|
||||
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;
|
||||
|
||||
pShellView = IShellView_Constructor(this, this->mpidl);
|
||||
pShellView = IShellView_Constructor((IShellFolder *) This, This->mpidl);
|
||||
|
||||
if(!pShellView)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
hr = pShellView->lpvtbl->fnQueryInterface(pShellView, riid, ppvOut);
|
||||
pShellView->lpvtbl->fnRelease(pShellView);
|
||||
TRACE(shell,"-- (%p)->(interface=%p)\n",this, ppvOut);
|
||||
TRACE(shell,"-- (%p)->(interface=%p)\n",This, ppvOut);
|
||||
return hr;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* IShellFolder_GetAttributesOf
|
||||
* IShellFolder_fnGetAttributesOf
|
||||
*
|
||||
* PARAMETERS
|
||||
* UINT cidl, //[in ] num elements in pidl array
|
||||
|
@ -636,55 +645,58 @@ static HRESULT WINAPI IShellFolder_CreateViewObject( LPSHELLFOLDER this,
|
|||
*
|
||||
* FIXME: quick hack
|
||||
* 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
|
||||
* passes ONE element in the array and writing to further elements will
|
||||
* cause the shell to fail later.
|
||||
*/
|
||||
static HRESULT WINAPI IShellFolder_GetAttributesOf(LPSHELLFOLDER this,UINT cidl,LPCITEMIDLIST *apidl,DWORD *rgfInOut)
|
||||
{ LPCITEMIDLIST * pidltemp;
|
||||
DWORD i;
|
||||
static HRESULT WINAPI IShellFolder_fnGetAttributesOf(IShellFolder * iface,UINT cidl,LPCITEMIDLIST *apidl,DWORD *rgfInOut)
|
||||
{
|
||||
ICOM_THIS(IGenericSFImpl, iface);
|
||||
|
||||
TRACE(shell,"(%p)->(%d,%p,%p)\n",this,cidl,apidl,rgfInOut);
|
||||
LPCITEMIDLIST * pidltemp;
|
||||
DWORD i;
|
||||
|
||||
if ((! cidl )| (!apidl) | (!rgfInOut))
|
||||
return E_INVALIDARG;
|
||||
TRACE(shell,"(%p)->(%d,%p,%p)\n",This,cidl,apidl,rgfInOut);
|
||||
|
||||
pidltemp=apidl;
|
||||
*rgfInOut = 0x00;
|
||||
i=cidl;
|
||||
if ((! cidl )| (!apidl) | (!rgfInOut))
|
||||
return E_INVALIDARG;
|
||||
|
||||
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);
|
||||
pidltemp=apidl;
|
||||
*rgfInOut = 0x00;
|
||||
i=cidl;
|
||||
|
||||
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
|
||||
* 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,
|
||||
* and GetData's it if the drop is in another explorer window that needs the positions.
|
||||
*/
|
||||
static HRESULT WINAPI IShellFolder_GetUIObjectOf(
|
||||
LPSHELLFOLDER this,
|
||||
HWND hwndOwner,
|
||||
UINT cidl,
|
||||
LPCITEMIDLIST * apidl,
|
||||
REFIID riid,
|
||||
UINT * prgfInOut,
|
||||
LPVOID * ppvOut)
|
||||
static HRESULT WINAPI IShellFolder_fnGetUIObjectOf(
|
||||
IShellFolder * iface,
|
||||
HWND hwndOwner,
|
||||
UINT cidl,
|
||||
LPCITEMIDLIST * apidl,
|
||||
REFIID riid,
|
||||
UINT * prgfInOut,
|
||||
LPVOID * ppvOut)
|
||||
{
|
||||
ICOM_THIS(IGenericSFImpl, iface);
|
||||
|
||||
char xclsid[50];
|
||||
LPITEMIDLIST pidl;
|
||||
LPUNKNOWN pObj = NULL;
|
||||
|
@ -720,7 +734,7 @@ static HRESULT WINAPI IShellFolder_GetUIObjectOf(
|
|||
WINE_StringFromCLSID(riid,xclsid);
|
||||
|
||||
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;
|
||||
|
||||
|
@ -729,21 +743,21 @@ static HRESULT WINAPI IShellFolder_GetUIObjectOf(
|
|||
if(cidl < 1)
|
||||
return E_INVALIDARG;
|
||||
|
||||
pObj = (LPUNKNOWN)IContextMenu_Constructor(this, apidl, cidl);
|
||||
pObj = (LPUNKNOWN)IContextMenu_Constructor((IShellFolder *)This, apidl, cidl);
|
||||
}
|
||||
else if (IsEqualIID(riid, &IID_IDataObject))
|
||||
{
|
||||
if (cidl < 1)
|
||||
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))
|
||||
{
|
||||
if (cidl != 1)
|
||||
return(E_INVALIDARG);
|
||||
|
||||
pidl = ILCombine(this->pMyPidl,apidl[0]);
|
||||
pidl = ILCombine(This->pMyPidl,apidl[0]);
|
||||
pObj = (LPUNKNOWN)IExtractIcon_Constructor( pidl );
|
||||
SHFree(pidl);
|
||||
}
|
||||
|
@ -756,7 +770,7 @@ static HRESULT WINAPI IShellFolder_GetUIObjectOf(
|
|||
}
|
||||
else
|
||||
{
|
||||
ERR(shell,"(%p)->E_NOINTERFACE\n",this);
|
||||
ERR(shell,"(%p)->E_NOINTERFACE\n",This);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
@ -767,7 +781,7 @@ static HRESULT WINAPI IShellFolder_GetUIObjectOf(
|
|||
return S_OK;
|
||||
}
|
||||
/**************************************************************************
|
||||
* IShellFolder_GetDisplayNameOf
|
||||
* IShellFolder_fnGetDisplayNameOf
|
||||
* Retrieves the display name for the specified file object or subfolder
|
||||
*
|
||||
* PARAMETERS
|
||||
|
@ -781,8 +795,15 @@ static HRESULT WINAPI IShellFolder_GetUIObjectOf(
|
|||
#define GET_SHGDN_FOR(dwFlags) ((DWORD)dwFlags & (DWORD)0x0000FF00)
|
||||
#define GET_SHGDN_RELATION(dwFlags) ((DWORD)dwFlags & (DWORD)0x000000FF)
|
||||
|
||||
static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET lpName)
|
||||
{ CHAR szText[MAX_PATH];
|
||||
static HRESULT WINAPI IShellFolder_fnGetDisplayNameOf(
|
||||
IShellFolder * iface,
|
||||
LPCITEMIDLIST pidl,
|
||||
DWORD dwFlags,
|
||||
LPSTRRET lpName)
|
||||
{
|
||||
ICOM_THIS(IGenericSFImpl, iface);
|
||||
|
||||
CHAR szText[MAX_PATH];
|
||||
CHAR szTemp[MAX_PATH];
|
||||
CHAR szSpecial[MAX_PATH];
|
||||
CHAR szDrive[MAX_PATH];
|
||||
|
@ -790,7 +811,7 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
|
|||
LPITEMIDLIST pidlTemp=NULL;
|
||||
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);
|
||||
|
||||
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
|
||||
parent and add the ItemName*/
|
||||
szText[0]=0x00;
|
||||
if (this->sMyPath && strlen (this->sMyPath))
|
||||
{ if (strcmp(this->sMyPath,"My Computer"))
|
||||
{ strcpy (szText,this->sMyPath);
|
||||
if (This->sMyPath && strlen (This->sMyPath))
|
||||
{ if (strcmp(This->sMyPath,"My Computer"))
|
||||
{ strcpy (szText,This->sMyPath);
|
||||
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))
|
||||
{ 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
|
||||
* identifier in the process.
|
||||
*
|
||||
|
@ -899,41 +920,156 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
|
|||
* DWORD dwFlags, //[in ] SHGNO formatting flags
|
||||
* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned
|
||||
*/
|
||||
static HRESULT WINAPI IShellFolder_SetNameOf(
|
||||
LPSHELLFOLDER this,
|
||||
HWND hwndOwner,
|
||||
LPCITEMIDLIST pidl, /*simple pidl*/
|
||||
LPCOLESTR lpName,
|
||||
DWORD dw,
|
||||
LPITEMIDLIST *pPidlOut)
|
||||
{ FIXME(shell,"(%p)->(%u,pidl=%p,%s,%lu,%p),stub!\n",
|
||||
this,hwndOwner,pidl,debugstr_w(lpName),dw,pPidlOut);
|
||||
return E_NOTIMPL;
|
||||
static HRESULT WINAPI IShellFolder_fnSetNameOf(
|
||||
IShellFolder * iface,
|
||||
HWND hwndOwner,
|
||||
LPCITEMIDLIST pidl, /*simple pidl*/
|
||||
LPCOLESTR lpName,
|
||||
DWORD dw,
|
||||
LPITEMIDLIST *pPidlOut)
|
||||
{
|
||||
ICOM_THIS(IGenericSFImpl, iface);
|
||||
|
||||
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
|
||||
*/
|
||||
static BOOL WINAPI IShellFolder_GetFolderPath(LPSHELLFOLDER this, LPSTR lpszOut, DWORD dwOutSize)
|
||||
{ DWORD dwSize;
|
||||
|
||||
TRACE(shell,"(%p)->(%p %lu)\n",this, lpszOut, dwOutSize);
|
||||
static HRESULT WINAPI IShellFolder_fnGetFolderPath(IShellFolder * iface, LPSTR lpszOut, DWORD dwOutSize)
|
||||
{
|
||||
ICOM_THIS(IGenericSFImpl, iface);
|
||||
DWORD dwSize;
|
||||
|
||||
TRACE(shell,"(%p)->(%p %lu)\n",This, lpszOut, dwOutSize);
|
||||
if (!lpszOut)
|
||||
{ return FALSE;
|
||||
}
|
||||
|
||||
|
||||
*lpszOut=0;
|
||||
|
||||
if (! this->sMyPath)
|
||||
if (! This->sMyPath)
|
||||
return FALSE;
|
||||
|
||||
dwSize = strlen (this->sMyPath) +1;
|
||||
dwSize = strlen (This->sMyPath) +1;
|
||||
if ( dwSize > dwOutSize)
|
||||
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;
|
||||
}
|
||||
|
||||
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_IContextMenu, 0x000214E4L, 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_IShellPropSheetExt, 0x000214E9L, 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_IFileViewer, 0x000214F0L, 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_IContextMenu2, 0x000214F4L, 0, 0);
|
||||
DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0);
|
||||
DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0);
|
||||
DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 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_IShellExecuteHookW, 0x000214FBL, 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 "wine/obj_base.h"
|
||||
#include "wine/obj_shelllink.h"
|
||||
#include "wine/obj_shellfolder.h"
|
||||
#include "ole2.h"
|
||||
#include "shell.h"
|
||||
#include "commctrl.h"
|
||||
|
@ -26,36 +27,12 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID,REFIID,LPVOID*);
|
|||
/* foreward declaration of the objects*/
|
||||
typedef struct IContextMenu IContextMenu, *LPCONTEXTMENU;
|
||||
typedef struct tagSHELLEXTINIT *LPSHELLEXTINIT,IShellExtInit;
|
||||
typedef struct tagENUMIDLIST *LPENUMIDLIST, IEnumIDList;
|
||||
typedef struct tagSHELLFOLDER *LPSHELLFOLDER, IShellFolder;
|
||||
typedef struct tagSHELLVIEW *LPSHELLVIEW, IShellView;
|
||||
typedef struct tagSHELLBROWSER *LPSHELLBROWSER,IShellBrowser;
|
||||
typedef struct tagSHELLICON *LPSHELLICON, IShellIcon;
|
||||
typedef struct tagDOCKINGWINDOWFRAME *LPDOCKINGWINDOWFRAME, IDockingWindowFrame;
|
||||
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
|
||||
|
@ -270,46 +247,6 @@ struct tagSHELLEXTINIT
|
|||
|
||||
#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 */
|
||||
|
@ -357,86 +294,6 @@ typedef struct
|
|||
|
||||
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
|
||||
|
|
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 "dplay.h"
|
||||
#include "vfw.h"
|
||||
#include "shlguid.h"
|
||||
#include "shlobj.h"
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue