Commit 0d0c5d8f authored by Juergen Schmied's avatar Juergen Schmied Committed by Alexandre Julliard

More support for special pidls in SHGetSpecialFolderLocation.

parent 3471f0f5
...@@ -810,6 +810,26 @@ HRESULT WINAPI SHGetSpecialFolderLocation( ...@@ -810,6 +810,26 @@ HRESULT WINAPI SHGetSpecialFolderLocation(
hr = NOERROR; hr = NOERROR;
break; break;
case CSIDL_NETWORK:
*ppidl = _ILCreateNetwork ();
hr = NOERROR;
break;
case CSIDL_CONTROLS:
*ppidl = _ILCreateControl ();
hr = NOERROR;
break;
case CSIDL_PRINTERS:
*ppidl = _ILCreatePrinter ();
hr = NOERROR;
break;
case CSIDL_BITBUCKET:
*ppidl = _ILCreateBitBucket ();
hr = NOERROR;
break;
default: default:
if (SHGetSpecialFolderPathA(hwndOwner, szPath, nFolder, TRUE)) if (SHGetSpecialFolderPathA(hwndOwner, szPath, nFolder, TRUE))
{ {
...@@ -1045,6 +1065,26 @@ LPITEMIDLIST WINAPI _ILCreateIExplore() ...@@ -1045,6 +1065,26 @@ LPITEMIDLIST WINAPI _ILCreateIExplore()
return _ILCreate(PT_MYCOMP, &IID_IExplore, sizeof(GUID)); return _ILCreate(PT_MYCOMP, &IID_IExplore, sizeof(GUID));
} }
LPITEMIDLIST WINAPI _ILCreateControl()
{ TRACE_(pidl)("()\n");
return _ILCreate(PT_SPECIAL, &IID_Control, sizeof(GUID));
}
LPITEMIDLIST WINAPI _ILCreatePrinter()
{ TRACE_(pidl)("()\n");
return _ILCreate(PT_SPECIAL, &IID_Printer, sizeof(GUID));
}
LPITEMIDLIST WINAPI _ILCreateNetwork()
{ TRACE_(pidl)("()\n");
return _ILCreate(PT_MYCOMP, &IID_Network, sizeof(GUID));
}
LPITEMIDLIST WINAPI _ILCreateBitBucket()
{ TRACE_(pidl)("()\n");
return _ILCreate(PT_MYCOMP, &IID_BitBucket, sizeof(GUID));
}
LPITEMIDLIST WINAPI _ILCreateDrive( LPCSTR lpszNew) LPITEMIDLIST WINAPI _ILCreateDrive( LPCSTR lpszNew)
{ char sTemp[4]; { char sTemp[4];
lstrcpynA (sTemp,lpszNew,4); lstrcpynA (sTemp,lpszNew,4);
...@@ -1529,3 +1569,4 @@ BOOL WINAPI _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) ...@@ -1529,3 +1569,4 @@ BOOL WINAPI _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
return TRUE; return TRUE;
} }
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
* ! size * ! size
* ---------------------------------------------------------------- * ----------------------------------------------------------------
* my computer 0x1F/20 mycomp (2) (usual) * my computer 0x1F/20 mycomp (2) (usual)
* network 0x1F mycomp
* bitbucket 0x1F mycomp
* drive 0x23/25 drive (usual) * drive 0x23/25 drive (usual)
* drive 0x25/25 drive (lnk/persistant) * drive 0x25/25 drive (lnk/persistant)
* drive 0x29/25 drive * drive 0x29/25 drive
...@@ -117,12 +119,6 @@ typedef struct tagPIDLDATA ...@@ -117,12 +119,6 @@ typedef struct tagPIDLDATA
* return value is strlen() * return value is strlen()
*/ */
DWORD WINAPI _ILGetDrive(LPCITEMIDLIST,LPSTR,UINT16); DWORD WINAPI _ILGetDrive(LPCITEMIDLIST,LPSTR,UINT16);
/*
DWORD WINAPI _ILGetItemText(LPCITEMIDLIST,LPSTR,UINT16);
DWORD WINAPI _ILGetFolderText(LPCITEMIDLIST,LPSTR,DWORD);
DWORD WINAPI _ILGetValueText(LPCITEMIDLIST,LPSTR,DWORD);
DWORD WINAPI _ILGetPidlPath(LPCITEMIDLIST,LPSTR,DWORD);
*/
/* /*
* getting special values from simple pidls * getting special values from simple pidls
...@@ -149,6 +145,10 @@ BOOL WINAPI _ILIsPidlSimple ( LPCITEMIDLIST pidl); ...@@ -149,6 +145,10 @@ BOOL WINAPI _ILIsPidlSimple ( LPCITEMIDLIST pidl);
LPITEMIDLIST WINAPI _ILCreateDesktop(void); LPITEMIDLIST WINAPI _ILCreateDesktop(void);
LPITEMIDLIST WINAPI _ILCreateMyComputer(void); LPITEMIDLIST WINAPI _ILCreateMyComputer(void);
LPITEMIDLIST WINAPI _ILCreateIExplore(void); LPITEMIDLIST WINAPI _ILCreateIExplore(void);
LPITEMIDLIST WINAPI _ILCreateControl(void);
LPITEMIDLIST WINAPI _ILCreatePrinter(void);
LPITEMIDLIST WINAPI _ILCreateNetwork(void);
LPITEMIDLIST WINAPI _ILCreateBitBucket(void);
LPITEMIDLIST WINAPI _ILCreateDrive(LPCSTR); LPITEMIDLIST WINAPI _ILCreateDrive(LPCSTR);
LPITEMIDLIST WINAPI _ILCreateFolder(WIN32_FIND_DATAA * stffile); LPITEMIDLIST WINAPI _ILCreateFolder(WIN32_FIND_DATAA * stffile);
LPITEMIDLIST WINAPI _ILCreateValue(WIN32_FIND_DATAA * stffile); LPITEMIDLIST WINAPI _ILCreateValue(WIN32_FIND_DATAA * stffile);
......
...@@ -124,6 +124,11 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes, ...@@ -124,6 +124,11 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
if (flags & SHGFI_PIDL) if (flags & SHGFI_PIDL)
{ {
pidl = (LPCITEMIDLIST) path; pidl = (LPCITEMIDLIST) path;
if (!pidl )
{
ERR_(shell)("pidl is null!\n");
return FALSE;
}
} }
else if (!(flags & SHGFI_USEFILEATTRIBUTES)) else if (!(flags & SHGFI_USEFILEATTRIBUTES))
{ {
......
...@@ -33,9 +33,13 @@ DEFINE_GUID (IID_IDockingWindowSite, 0x2A342FC2L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x ...@@ -33,9 +33,13 @@ DEFINE_GUID (IID_IDockingWindowSite, 0x2A342FC2L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x
/**************************************************************************** /****************************************************************************
* undocumented stuff * undocumented stuff
*/ */
/* the next two IID's are the namespace elements in the desktop folder */ /* the next IID's are the namespace elements of the pidls */
DEFINE_GUID (IID_MyComputer, 0x20D04FE0L, 0x3AEA, 0x1069, 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D); DEFINE_GUID (IID_MyComputer, 0x20D04FE0L, 0x3AEA, 0x1069, 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
DEFINE_GUID (IID_IExplore, 0x871C5380L, 0x42A0, 0x1069, 0xA2, 0xEA, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D); DEFINE_GUID (IID_IExplore, 0x871C5380L, 0x42A0, 0x1069, 0xA2, 0xEA, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
DEFINE_GUID (IID_Control, 0x23EC2020L, 0x3AEA, 0x1069, 0xA2, 0xDD, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
DEFINE_GUID (IID_Printer, 0x2227A280L, 0x3AEA, 0x1069, 0xA2, 0xDE, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
DEFINE_GUID (IID_Network, 0x208D2C60L, 0x3AEA, 0x1069, 0xA2, 0xD7, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
DEFINE_GUID (IID_BitBucket, 0x645FF040L, 0x5081, 0x101B, 0x9F, 0x08, 0x00, 0xAA, 0x00, 0x2F, 0x95, 0x4E);
DEFINE_GUID (CLSID_PaperBin, 0x645FF040L, 0x5081, 0x101B, 0x9F, 0x08, 0x00, 0xAA, 0x00, 0x2F, 0x95, 0x4E); DEFINE_GUID (CLSID_PaperBin, 0x645FF040L, 0x5081, 0x101B, 0x9F, 0x08, 0x00, 0xAA, 0x00, 0x2F, 0x95, 0x4E);
#endif /* __WINE_SHLGUID_H */ #endif /* __WINE_SHLGUID_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment