Author: akhaldi
Date: Mon Nov 3 20:15:17 2014
New Revision: 65235
URL:
http://svn.reactos.org/svn/reactos?rev=65235&view=rev
Log:
[SHELL32]
* Another partial sync of pidl.c and pidl.h with Wine 1.7.27.
CORE-8540
Modified:
branches/shell-experiments/dll/win32/shell32/wine/pidl.c
branches/shell-experiments/dll/win32/shell32/wine/pidl.h
Modified: branches/shell-experiments/dll/win32/shell32/wine/pidl.c
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/wine/pidl.c [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/wine/pidl.c [iso-8859-1] Mon Nov 3
20:15:17 2014
@@ -37,6 +37,7 @@
#include <shlwapi.h>
#include <shlguid_undoc.h>
#include <wine/debug.h>
+#include <wine/unicode.h>
#include "pidl.h"
#include "shell32_main.h"
@@ -69,7 +70,7 @@
* RETURNS
* True if the display name could be retrieved successfully, False otherwise
*/
-static BOOL ILGetDisplayNameExA(IShellFolder * psf, LPCITEMIDLIST pidl, LPSTR path, DWORD
type)
+static BOOL ILGetDisplayNameExA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPSTR path, DWORD
type)
{
BOOL ret = FALSE;
WCHAR wPath[MAX_PATH];
@@ -86,7 +87,7 @@
return ret;
}
-BOOL WINAPI ILGetDisplayNameExW(IShellFolder * psf, LPCITEMIDLIST pidl, LPWSTR path,
DWORD type)
+BOOL ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR path, DWORD type)
{
LPSHELLFOLDER psfParent, lsf = psf;
HRESULT ret = NO_ERROR;
@@ -94,7 +95,7 @@
STRRET strret;
DWORD flag;
- TRACE("%p %p %p %d\n", psf, pidl, path, type);
+ TRACE("%p %p %p %x\n", psf, pidl, path, type);
if (!pidl || !path)
return FALSE;
@@ -156,13 +157,13 @@
/*************************************************************************
* ILGetDisplayNameEx [SHELL32.186]
*/
-BOOL WINAPI ILGetDisplayNameEx(IShellFolder * psf, LPCITEMIDLIST pidl, LPVOID path, DWORD
type)
+BOOL WINAPI ILGetDisplayNameEx(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPVOID path, DWORD
type)
{
TRACE_(shell)("%p %p %p %d\n", psf, pidl, path, type);
if (SHELL_OsIsUnicode())
- return ILGetDisplayNameExW(psf, pidl, (LPWSTR)path, type);
- return ILGetDisplayNameExA(psf, pidl, (LPSTR)path, type);
+ return ILGetDisplayNameExW(psf, pidl, path, type);
+ return ILGetDisplayNameExA(psf, pidl, path, type);
}
/*************************************************************************
@@ -173,8 +174,8 @@
TRACE_(shell)("%p %p\n", pidl, path);
if (SHELL_OsIsUnicode())
- return ILGetDisplayNameExW(NULL, pidl, (LPWSTR)path, ILGDN_FORPARSING);
- return ILGetDisplayNameExA(NULL, pidl, (LPSTR)path, ILGDN_FORPARSING);
+ return ILGetDisplayNameExW(NULL, pidl, path, ILGDN_FORPARSING);
+ return ILGetDisplayNameExA(NULL, pidl, path, ILGDN_FORPARSING);
}
/*************************************************************************
@@ -211,9 +212,9 @@
TRACE_(shell)("pidl=%p\n",pidl);
if (!pidl || !pidl->mkid.cb)
- return 0;
+ return FALSE;
ILFindLastID(pidl)->mkid.cb = 0;
- return 1;
+ return TRUE;
}
/*************************************************************************
@@ -231,7 +232,7 @@
return NULL;
len = ILGetSize(pidl);
- newpidl = (LPITEMIDLIST)SHAlloc(len);
+ newpidl = SHAlloc(len);
if (newpidl)
memcpy(newpidl,pidl,len);
@@ -258,7 +259,7 @@
if (pidl)
{
len = pidl->mkid.cb;
- pidlNew = (LPITEMIDLIST)SHAlloc(len + 2);
+ pidlNew = SHAlloc(len+2);
if (pidlNew)
{
memcpy(pidlNew,pidl,len+2); /* 2 -> mind a desktop pidl */
@@ -395,15 +396,18 @@
TRACE_(shell)("%s %p 0x%08x\n", debugstr_w(path), ppidl, attributes ?
*attributes : 0);
if (SUCCEEDED (SHGetDesktopFolder(&sf)))
+ {
ret = IShellFolder_ParseDisplayName(sf, 0, NULL, (LPWSTR)path, &pchEaten,
ppidl, attributes);
+ IShellFolder_Release(sf);
+ }
return ret;
}
-EXTERN_C HRESULT WINAPI SHILCreateFromPathAW (LPCVOID path, LPITEMIDLIST * ppidl, DWORD *
attributes)
+HRESULT WINAPI SHILCreateFromPathAW (LPCVOID path, LPITEMIDLIST * ppidl, DWORD *
attributes)
{
if ( SHELL_OsIsUnicode())
- return SHILCreateFromPathW ((LPCWSTR)path, ppidl, attributes);
- return SHILCreateFromPathA ((LPCSTR)path, ppidl, attributes);
+ return SHILCreateFromPathW (path, ppidl, attributes);
+ return SHILCreateFromPathA (path, ppidl, attributes);
}
/*************************************************************************
@@ -460,7 +464,7 @@
return NULL;
len = ILGetSize(pidl);
- newpidl = (LPITEMIDLIST)Alloc(len);
+ newpidl = Alloc(len);
if (newpidl)
memcpy(newpidl,pidl,len);
@@ -502,7 +506,7 @@
_ILSimpleGetText(pidltemp1, szData1, MAX_PATH);
_ILSimpleGetText(pidltemp2, szData2, MAX_PATH);
- if (strcmp( szData1, szData2 ))
+ if (strcasecmp( szData1, szData2 ))
return FALSE;
pidltemp1 = ILGetNext(pidltemp1);
@@ -554,7 +558,7 @@
_ILSimpleGetText(pParent, szData1, MAX_PATH);
_ILSimpleGetText(pChild, szData2, MAX_PATH);
- if (strcmp( szData1, szData2 ))
+ if (strcasecmp( szData1, szData2 ))
return FALSE;
pParent = ILGetNext(pParent);
@@ -621,7 +625,7 @@
_ILSimpleGetText(pidltemp1, szData1, MAX_PATH);
_ILSimpleGetText(pidltemp2, szData2, MAX_PATH);
- if (strcmp(szData1, szData2))
+ if (strcasecmp(szData1,szData2))
break;
pidltemp1 = ILGetNext(pidltemp1);
@@ -681,7 +685,7 @@
len1 = ILGetSize(pidl1)-2;
len2 = ILGetSize(pidl2);
- pidlNew = (LPITEMIDLIST)SHAlloc(len1 + len2);
+ pidlNew = SHAlloc(len1+len2);
if (pidlNew)
{
@@ -698,7 +702,7 @@
*
* NOTES
*/
-HRESULT WINAPI SHGetRealIDL(IShellFolder * lpsf, LPCITEMIDLIST pidlSimple, LPITEMIDLIST
*pidlReal)
+HRESULT WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPCITEMIDLIST pidlSimple, LPITEMIDLIST
*pidlReal)
{
IDataObject* pDataObj;
HRESULT hr;
@@ -710,7 +714,7 @@
STGMEDIUM medium;
FORMATETC fmt;
- fmt.cfFormat = RegisterClipboardFormatW(CFSTR_SHELLIDLIST);
+ fmt.cfFormat = RegisterClipboardFormatW(CFSTR_SHELLIDLISTW);
fmt.ptd = NULL;
fmt.dwAspect = DVASPECT_CONTENT;
fmt.lindex = -1;
@@ -718,10 +722,12 @@
hr = IDataObject_GetData(pDataObj, &fmt, &medium);
+ IDataObject_Release(pDataObj);
+
if (SUCCEEDED(hr))
{
/*assert(pida->cidl==1);*/
- LPIDA pida = (LPIDA)GlobalLock(medium.u.hGlobal);
+ LPIDA pida = GlobalLock(medium.u.hGlobal);
LPCITEMIDLIST pidl_folder = (LPCITEMIDLIST)
((LPBYTE)pida+pida->aoffset[0]);
LPCITEMIDLIST pidl_child = (LPCITEMIDLIST)
((LPBYTE)pida+pida->aoffset[1]);
@@ -746,7 +752,7 @@
* pild = CSIDL_DESKTOP ret = 0
* pild = CSIDL_DRIVES ret = 0
*/
-EXTERN_C LPITEMIDLIST WINAPI SHLogILFromFSIL(LPITEMIDLIST pidl)
+LPITEMIDLIST WINAPI SHLogILFromFSIL(LPITEMIDLIST pidl)
{
FIXME("(pidl=%p)\n",pidl);
@@ -839,7 +845,7 @@
* NOTES
* Destroys the passed in idlist! (???)
*/
-EXTERN_C LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl, LPCITEMIDLIST item, BOOL bEnd)
+LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl, LPCITEMIDLIST item, BOOL bEnd)
{
LPITEMIDLIST idlRet;
@@ -949,11 +955,11 @@
/*************************************************************************
* ILCreateFromPath [SHELL32.157]
*/
-EXTERN_C LPITEMIDLIST WINAPI ILCreateFromPathAW (LPCVOID path)
+LPITEMIDLIST WINAPI ILCreateFromPathAW (LPCVOID path)
{
if ( SHELL_OsIsUnicode())
- return ILCreateFromPathW ((LPCWSTR)path);
- return ILCreateFromPathA ((LPCSTR)path);
+ return ILCreateFromPathW (path);
+ return ILCreateFromPathA (path);
}
/*************************************************************************
@@ -1006,6 +1012,14 @@
ret = IShellFolder_ParseDisplayName(pSF, 0, pBC, (LPOLESTR)path, NULL, ppidl,
prgfInOut);
}
+ if (pBC)
+ {
+ IBindCtx_Release(pBC);
+ pBC = NULL;
+ }
+
+ IShellFolder_Release(pSF);
+
if (FAILED(ret) && ppidl)
*ppidl = NULL;
@@ -1045,7 +1059,7 @@
if (lpszPath)
{
len = MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, NULL, 0);
- wPath = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+ wPath = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, wPath, len);
}
@@ -1067,11 +1081,11 @@
return pidl;
}
-EXTERN_C LPITEMIDLIST WINAPI SHSimpleIDListFromPathAW(LPCVOID lpszPath)
+LPITEMIDLIST WINAPI SHSimpleIDListFromPathAW(LPCVOID lpszPath)
{
if ( SHELL_OsIsUnicode())
- return SHSimpleIDListFromPathW ((LPCWSTR)lpszPath);
- return SHSimpleIDListFromPathA ((LPCSTR)lpszPath);
+ return SHSimpleIDListFromPathW (lpszPath);
+ return SHSimpleIDListFromPathA (lpszPath);
}
/*************************************************************************
@@ -1139,7 +1153,7 @@
* SHGetDataFromIDListW [SHELL32.248]
*
*/
-HRESULT WINAPI SHGetDataFromIDListW(IShellFolder * psf, LPCITEMIDLIST pidl,
+HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl,
int nFormat, LPVOID dest, int len)
{
LPSTR filename, shortname;
@@ -1252,10 +1266,12 @@
if (FAILED(hr) || !(dwAttributes & SFGAO_FILESYSTEM))
{
WARN("Wrong dwAttributes or GetAttributesOf failed: %x\n", hr);
+ IShellFolder_Release(psfFolder);
return FALSE;
}
hr = IShellFolder_GetDisplayNameOf(psfFolder, pidlLast, SHGDN_FORPARSING,
&strret);
+ IShellFolder_Release(psfFolder);
if (FAILED(hr)) return FALSE;
hr = StrRetToBufW(&strret, pidlLast, pszPath, MAX_PATH);
@@ -1299,6 +1315,8 @@
SHFree (pidlParent);
}
+ IShellFolder_Release(psfDesktop);
+
if (SUCCEEDED(hr) && ppidlLast)
*ppidlLast = ILFindLastID(pidl);
@@ -1325,7 +1343,7 @@
{
LPITEMIDLIST pidlOut = NULL;
- pidlOut = (LPITEMIDLIST)SHAlloc(size + 5);
+ pidlOut = SHAlloc(size + 5);
if(pidlOut)
{
LPPIDLDATA pData;
@@ -1352,7 +1370,7 @@
LPITEMIDLIST ret;
TRACE("()\n");
- ret = (LPITEMIDLIST)SHAlloc(2);
+ ret = SHAlloc(2);
if (ret)
ret->mkid.cb = 0;
return ret;
@@ -1472,7 +1490,7 @@
{
IID iid;
- if (FAILED(CLSIDFromString((LPOLESTR)szGUID, &iid)))
+ if (FAILED(SHCLSIDFromStringW(szGUID, &iid)))
{
ERR("%s is not a GUID\n", debugstr_w(szGUID));
return NULL;
@@ -1483,7 +1501,7 @@
LPITEMIDLIST _ILCreateFromFindDataW( const WIN32_FIND_DATAW *wfd )
{
char buff[MAX_PATH + 14 +1]; /* see WIN32_FIND_DATA */
- DWORD len, len1, wlen, alen, cbData;
+ DWORD len, len1, wlen, alen;
LPITEMIDLIST pidl;
PIDLTYPE type;
@@ -1499,11 +1517,9 @@
type = (wfd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? PT_FOLDER :
PT_VALUE;
- wlen = wcslen(wfd->cFileName) + 1;
- cbData = sizeof(FileStruct) - 1 + (alen + (alen & 1)); // Note: szNames field is
initially 1 byte long
- cbData += sizeof(FileStructW) - 1 + wlen * sizeof(WCHAR); // Note: wszName field is
initially 1 byte long
- cbData += sizeof(WORD); // offset to FileStructW
- pidl = _ILAlloc(type, cbData);
+ wlen = lstrlenW(wfd->cFileName) + 1;
+ pidl = _ILAlloc(type, FIELD_OFFSET(FileStruct, szNames[alen + (alen & 1)]) +
+ FIELD_OFFSET(FileStructW, wszName[wlen]) + sizeof(WORD));
if (pidl)
{
LPPIDLDATA pData = _ILGetDataPointer(pidl);
@@ -1517,7 +1533,7 @@
memcpy(fs->szNames, buff, alen);
fsw = (FileStructW*)(pData->u.file.szNames + alen + (alen & 0x1));
- fsw->cbLen = sizeof(FileStructW) - 1 + wlen * sizeof(WCHAR) + sizeof(WORD);
+ fsw->cbLen = FIELD_OFFSET(FileStructW, wszName[wlen]) + sizeof(WORD);
FileTimeToDosDateTime( &wfd->ftCreationTime, &fsw->uCreationDate,
&fsw->uCreationTime);
FileTimeToDosDateTime( &wfd->ftLastAccessTime,
&fsw->uLastAccessDate, &fsw->uLastAccessTime);
memcpy(fsw->wszName, wfd->cFileName, wlen * sizeof(WCHAR));
@@ -1564,7 +1580,7 @@
if (pszDest)
{
strcpy(pszDest, "x:\\");
- pszDest[0] = towupper(lpszNew[0]);
+ pszDest[0]=toupperW(lpszNew[0]);
TRACE("-- create Drive: %s\n", debugstr_a(pszDest));
}
}
@@ -1668,7 +1684,7 @@
BOOL _ILIsMyComputer(LPCITEMIDLIST pidl)
{
- IID *iid = _ILGetGUIDPointer(pidl);
+ REFIID iid = _ILGetGUIDPointer(pidl);
TRACE("(%p)\n",pidl);
@@ -1874,7 +1890,7 @@
if (pFileStructW) {
lstrcpynW(szOut, pFileStructW->wszName, uOutSize);
- dwReturn = wcslen(pFileStructW->wszName);
+ dwReturn = lstrlenW(pFileStructW->wszName);
} else {
GUID const * riid;
WCHAR szTemp[MAX_PATH];
@@ -1896,7 +1912,7 @@
if (szOut)
lstrcpynW(szOut, szTemp, uOutSize);
- dwReturn = wcslen (szTemp);
+ dwReturn = lstrlenW (szTemp);
}
}
else if (( szSrcW = _ILGetTextPointerW(pidl) ))
@@ -1905,7 +1921,7 @@
if (szOut)
lstrcpynW(szOut, szSrcW, uOutSize);
- dwReturn = wcslen(szSrcW);
+ dwReturn = lstrlenW(szSrcW);
}
else if (( szSrc = _ILGetTextPointer(pidl) ))
{
@@ -1915,7 +1931,7 @@
if (szOut)
lstrcpynW(szOut, szTemp, uOutSize);
- dwReturn = wcslen (szTemp);
+ dwReturn = lstrlenW (szTemp);
}
else if (( riid = _ILGetGUIDPointer(pidl) ))
{
@@ -1925,7 +1941,7 @@
if (szOut)
lstrcpynW(szOut, szTemp, uOutSize);
- dwReturn = wcslen (szTemp);
+ dwReturn = lstrlenW (szTemp);
}
}
else
@@ -2129,14 +2145,14 @@
/* Currently I don't see a fool prove way to figure out if a pidl is for sure of
WinXP
* style with a FileStructW member. If we switch all our shellfolder-implementations
to
* the new format, this won't be a problem. For now, we do as many sanity checks
as possible. */
- if (cbOffset & 0x1 || /* FileStructW member is word aligned in the pidl */
+ if ((cbOffset & 0x1) || /* FileStructW member is word aligned in the pidl */
/* FileStructW is positioned after FileStruct */
cbOffset < sizeof(pidl->mkid.cb) + sizeof(PIDLTYPE) + sizeof(FileStruct)
||
/* There has to be enough space at cbOffset in the pidl to hold FileStructW and
cbOffset */
cbOffset > pidl->mkid.cb - sizeof(cbOffset) - sizeof(FileStructW) ||
pidl->mkid.cb != cbOffset + pFileStructW->cbLen)
{
- ERR("Invalid pidl format (cbOffset = %d)!\n", cbOffset);
+ WARN("Invalid pidl format (cbOffset = %d)!\n", cbOffset);
return NULL;
}
@@ -2407,10 +2423,11 @@
UINT i;
LPITEMIDLIST *apidldest;
- apidldest = (LPITEMIDLIST *)SHAlloc(cidl * sizeof(LPITEMIDLIST));
if (!apidlsrc)
return NULL;
+ apidldest = SHAlloc(cidl * sizeof(LPITEMIDLIST));
+
for (i = 0; i < cidl; i++)
apidldest[i] = ILClone(apidlsrc[i]);
@@ -2427,7 +2444,7 @@
UINT i;
LPITEMIDLIST *dst;
- dst = (LPITEMIDLIST *)SHAlloc(cida->cidl * sizeof(LPITEMIDLIST));
+ dst = SHAlloc(cida->cidl * sizeof(LPITEMIDLIST));
if (!dst)
return NULL;
Modified: branches/shell-experiments/dll/win32/shell32/wine/pidl.h
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/wine/pidl.h [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/wine/pidl.h [iso-8859-1] Mon Nov 3
20:15:17 2014
@@ -94,13 +94,13 @@
#define PT_FOLDER 0x31
#define PT_VALUE 0x32
#define PT_VALUEW 0x34
+#define PT_FOLDERW 0x35
#define PT_WORKGRP 0x41
#define PT_COMP 0x42
#define PT_NETPROVIDER 0x46
#define PT_NETWORK 0x47
#define PT_IESPECIAL1 0x61
#define PT_YAGUID 0x70 /* yet another guid.. */
-#define PT_CPEXT 0x71
#define PT_IESPECIAL2 0xb1
#define PT_SHARE 0xc3
@@ -116,6 +116,8 @@
CHAR szName[1]; /*10*/ /* terminated by 0x00, followed by display name and comment
string */
} PIDLCPanelStruct;
+#ifdef __REACTOS__
+
typedef struct tagPIDLFontStruct
{
BYTE dummy;
@@ -140,6 +142,8 @@
DWORD Attributes;
WCHAR szName[1];
} PIDLRecycleStruct;
+
+#endif /* !__REACTOS__ */
typedef struct tagGUIDStruct
{
@@ -202,9 +206,11 @@
} htmlhelp;
struct tagPIDLCPanelStruct cpanel;
struct tagValueW valueW;
- struct tagPIDLFontStruct cfont;
- struct tagPIDLPrinterStruct cprinter;
- struct tagPIDLRecycleStruct crecycle;
+#ifdef __REACTOS__
+ struct tagPIDLFontStruct cfont;
+ struct tagPIDLPrinterStruct cprinter;
+ struct tagPIDLRecycleStruct crecycle;
+#endif
}u;
} PIDLDATA, *LPPIDLDATA;
#include "poppack.h"
@@ -212,42 +218,44 @@
/*
* getting special values from simple pidls
*/
-DWORD _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
-DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR pOut, UINT uOutSize);
-BOOL _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
-DWORD _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
-BOOL _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
-void _ILGetFileType (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
-DWORD _ILGetFileAttributes (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
-
-BOOL _ILGetFileDateTime (LPCITEMIDLIST pidl, FILETIME *ft);
-DWORD _ILGetDrive (LPCITEMIDLIST, LPSTR, UINT);
+DWORD _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) DECLSPEC_HIDDEN;
+DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR pOut, UINT uOutSize)
DECLSPEC_HIDDEN;
+BOOL _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) DECLSPEC_HIDDEN;
+DWORD _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) DECLSPEC_HIDDEN;
+BOOL _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) DECLSPEC_HIDDEN;
+void _ILGetFileType (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) DECLSPEC_HIDDEN;
+DWORD _ILGetFileAttributes (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
DECLSPEC_HIDDEN;
+
+BOOL _ILGetFileDateTime (LPCITEMIDLIST pidl, FILETIME *ft) DECLSPEC_HIDDEN;
+DWORD _ILGetDrive (LPCITEMIDLIST, LPSTR, UINT) DECLSPEC_HIDDEN;
/*
* testing simple pidls
*/
-BOOL _ILIsUnicode (LPCITEMIDLIST pidl);
-BOOL _ILIsDesktop (LPCITEMIDLIST pidl);
-BOOL _ILIsMyComputer (LPCITEMIDLIST pidl);
-BOOL _ILIsPrinter (LPCITEMIDLIST pidl);
-BOOL _ILIsMyDocuments (LPCITEMIDLIST pidl);
-BOOL _ILIsControlPanel (LPCITEMIDLIST pidl);
-BOOL _ILIsBitBucket (LPCITEMIDLIST pidl);
-BOOL _ILIsAdminTools (LPCITEMIDLIST pidl);
-BOOL _ILIsNetHood (LPCITEMIDLIST pidl);
-BOOL _ILIsDrive (LPCITEMIDLIST pidl);
-BOOL _ILIsFolder (LPCITEMIDLIST pidl);
-BOOL _ILIsValue (LPCITEMIDLIST pidl);
-BOOL _ILIsSpecialFolder (LPCITEMIDLIST pidl);
-BOOL _ILIsPidlSimple (LPCITEMIDLIST pidl);
-BOOL _ILIsCPanelStruct (LPCITEMIDLIST pidl);
-static __inline
+BOOL _ILIsUnicode (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN;
+BOOL _ILIsDesktop (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN;
+BOOL _ILIsMyComputer (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN;
+#ifdef __REACTOS__
+BOOL _ILIsPrinter (LPCITEMIDLIST pidl);
+BOOL _ILIsMyDocuments (LPCITEMIDLIST pidl);
+BOOL _ILIsControlPanel (LPCITEMIDLIST pidl);
+BOOL _ILIsBitBucket (LPCITEMIDLIST pidl);
+BOOL _ILIsAdminTools (LPCITEMIDLIST pidl);
+BOOL _ILIsNetHood (LPCITEMIDLIST pidl);
+#endif
+BOOL _ILIsDrive (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN;
+BOOL _ILIsFolder (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN;
+BOOL _ILIsValue (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN;
+BOOL _ILIsSpecialFolder (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN;
+BOOL _ILIsPidlSimple (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN;
+BOOL _ILIsCPanelStruct (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN;
+static inline
BOOL _ILIsEqualSimple (LPCITEMIDLIST pidlA, LPCITEMIDLIST pidlB)
{
return (pidlA->mkid.cb > 0 && !memcmp(pidlA, pidlB, pidlA->mkid.cb))
||
(!pidlA->mkid.cb && !pidlB->mkid.cb);
}
-static __inline
+static inline
BOOL _ILIsEmpty (LPCITEMIDLIST pidl) { return _ILIsDesktop(pidl); }
/*
@@ -257,52 +265,55 @@
/* Creates a PIDL with guid format and type type, which must be one of PT_GUID,
* PT_SHELLEXT, or PT_YAGUID.
*/
-LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid);
+LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid) DECLSPEC_HIDDEN;
/* Like _ILCreateGuid, but using the string szGUID. */
-LPITEMIDLIST _ILCreateGuidFromStrA(LPCSTR szGUID);
-LPITEMIDLIST _ILCreateGuidFromStrW(LPCWSTR szGUID);
+LPITEMIDLIST _ILCreateGuidFromStrA(LPCSTR szGUID) DECLSPEC_HIDDEN;
+LPITEMIDLIST _ILCreateGuidFromStrW(LPCWSTR szGUID) DECLSPEC_HIDDEN;
/* Commonly used PIDLs representing file system objects. */
-LPITEMIDLIST _ILCreateDesktop (void);
-LPITEMIDLIST _ILCreateFromFindDataW(const WIN32_FIND_DATAW *stffile);
-HRESULT _ILCreateFromPathW (LPCWSTR szPath, LPITEMIDLIST* ppidl);
+LPITEMIDLIST _ILCreateDesktop (void) DECLSPEC_HIDDEN;
+LPITEMIDLIST _ILCreateFromFindDataW(const WIN32_FIND_DATAW *stffile) DECLSPEC_HIDDEN;
+HRESULT _ILCreateFromPathW (LPCWSTR szPath, LPITEMIDLIST* ppidl) DECLSPEC_HIDDEN;
/* Other helpers */
-LPITEMIDLIST _ILCreateMyComputer (void);
-LPITEMIDLIST _ILCreateMyDocuments (void);
-LPITEMIDLIST _ILCreateIExplore (void);
-LPITEMIDLIST _ILCreateControlPanel (void);
-LPITEMIDLIST _ILCreatePrinters (void);
-LPITEMIDLIST _ILCreateNetwork (void);
-LPITEMIDLIST _ILCreateNetHood (void);
-LPITEMIDLIST _ILCreateAdminTools (void);
-LPITEMIDLIST _ILCreateFont (void);
-LPITEMIDLIST _ILCreateBitBucket (void);
-LPITEMIDLIST _ILCreateDrive (LPCWSTR);
+LPITEMIDLIST _ILCreateMyComputer (void) DECLSPEC_HIDDEN;
+LPITEMIDLIST _ILCreateMyDocuments (void) DECLSPEC_HIDDEN;
+LPITEMIDLIST _ILCreateIExplore (void) DECLSPEC_HIDDEN;
+LPITEMIDLIST _ILCreateControlPanel (void) DECLSPEC_HIDDEN;
+LPITEMIDLIST _ILCreatePrinters (void) DECLSPEC_HIDDEN;
+LPITEMIDLIST _ILCreateNetwork (void) DECLSPEC_HIDDEN;
+LPITEMIDLIST _ILCreateNetHood (void) DECLSPEC_HIDDEN;
+#ifdef __REACTOS__
+LPITEMIDLIST _ILCreateAdminTools (void);
+LPITEMIDLIST _ILCreateFont (void);
+#endif
+LPITEMIDLIST _ILCreateBitBucket (void) DECLSPEC_HIDDEN;
+LPITEMIDLIST _ILCreateDrive (LPCWSTR) DECLSPEC_HIDDEN;
+LPITEMIDLIST _ILCreateEntireNetwork (void) DECLSPEC_HIDDEN;
/*
* helper functions (getting struct-pointer)
*/
-LPPIDLDATA _ILGetDataPointer (LPCITEMIDLIST);
-LPSTR _ILGetTextPointer (LPCITEMIDLIST);
-IID *_ILGetGUIDPointer (LPCITEMIDLIST pidl);
-FileStructW *_ILGetFileStructW (LPCITEMIDLIST pidl);
+LPPIDLDATA _ILGetDataPointer (LPCITEMIDLIST) DECLSPEC_HIDDEN;
+LPSTR _ILGetTextPointer (LPCITEMIDLIST) DECLSPEC_HIDDEN;
+IID *_ILGetGUIDPointer (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN;
+FileStructW *_ILGetFileStructW (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN;
/*
* debug helper
*/
-void pdump (LPCITEMIDLIST pidl);
-BOOL pcheck (LPCITEMIDLIST pidl);
+void pdump (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN;
+BOOL pcheck (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN;
/*
* aPidl helper
*/
-void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl);
-LPITEMIDLIST * _ILCopyaPidl(const LPCITEMIDLIST * apidlsrc, UINT cidl);
-LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, const CIDA * cida);
-
-BOOL WINAPI ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR path, DWORD
type);
+void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl) DECLSPEC_HIDDEN;
+LPITEMIDLIST * _ILCopyaPidl(const LPCITEMIDLIST * apidlsrc, UINT cidl) DECLSPEC_HIDDEN;
+LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, const CIDA * cida)
DECLSPEC_HIDDEN;
+
+BOOL ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR path, DWORD type)
DECLSPEC_HIDDEN;
#ifdef __cplusplus
} /* extern "C" */