mirror of
https://github.com/reactos/reactos.git
synced 2024-07-31 00:28:56 +00:00
Juan Lang <juan_lang@yahoo.com>
- Correct return value in a couple of error cases. Marcus Meissner <marcus@jet.franken.de> - Marked some functions in debughlp as static. - Do not use REFIID as return, but IID*. svn path=/trunk/; revision=10960
This commit is contained in:
parent
a867629b4f
commit
2ff29d7662
|
@ -35,6 +35,7 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(pidl);
|
||||
|
||||
static
|
||||
LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl)
|
||||
{
|
||||
WORD len;
|
||||
|
@ -50,11 +51,13 @@ LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static
|
||||
BOOL _dbg_ILIsDesktop(LPCITEMIDLIST pidl)
|
||||
{
|
||||
return ( !pidl || (pidl && pidl->mkid.cb == 0x00) );
|
||||
}
|
||||
|
||||
static
|
||||
LPPIDLDATA _dbg_ILGetDataPointer(LPCITEMIDLIST pidl)
|
||||
{
|
||||
if(pidl && pidl->mkid.cb != 0x00)
|
||||
|
@ -62,6 +65,7 @@ LPPIDLDATA _dbg_ILGetDataPointer(LPCITEMIDLIST pidl)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static
|
||||
LPSTR _dbg_ILGetTextPointer(LPCITEMIDLIST pidl)
|
||||
{
|
||||
LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl);
|
||||
|
@ -99,6 +103,7 @@ LPSTR _dbg_ILGetTextPointer(LPCITEMIDLIST pidl)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static
|
||||
LPSTR _dbg_ILGetSTextPointer(LPCITEMIDLIST pidl)
|
||||
{
|
||||
LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl);
|
||||
|
@ -121,7 +126,8 @@ LPSTR _dbg_ILGetSTextPointer(LPCITEMIDLIST pidl)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
REFIID _dbg_ILGetGUIDPointer(LPCITEMIDLIST pidl)
|
||||
static
|
||||
IID* _dbg_ILGetGUIDPointer(LPCITEMIDLIST pidl)
|
||||
{
|
||||
LPPIDLDATA pdata =_ILGetDataPointer(pidl);
|
||||
|
||||
|
@ -131,12 +137,13 @@ REFIID _dbg_ILGetGUIDPointer(LPCITEMIDLIST pidl)
|
|||
{
|
||||
case PT_SHELLEXT:
|
||||
case PT_GUID:
|
||||
return (REFIID) &(pdata->u.guid.guid);
|
||||
return &(pdata->u.guid.guid);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static
|
||||
DWORD _dbg_ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
|
||||
{
|
||||
DWORD dwReturn=0;
|
||||
|
|
|
@ -1621,6 +1621,9 @@ HRESULT _ILCreateFromPathA(LPCSTR szPath, LPITEMIDLIST* ppidl)
|
|||
HANDLE hFile;
|
||||
WIN32_FIND_DATAA stffile;
|
||||
|
||||
if (!ppidl)
|
||||
return E_INVALIDARG;
|
||||
|
||||
hFile = FindFirstFileA(szPath, &stffile);
|
||||
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
|
@ -1630,7 +1633,7 @@ HRESULT _ILCreateFromPathA(LPCSTR szPath, LPITEMIDLIST* ppidl)
|
|||
|
||||
*ppidl = _ILCreateFromFindDataA(&stffile);
|
||||
|
||||
return S_OK;
|
||||
return *ppidl ? S_OK : E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
LPITEMIDLIST _ILCreateDrive(LPCWSTR lpszNew)
|
||||
|
@ -1937,7 +1940,7 @@ LPSTR _ILGetSTextPointer(LPCITEMIDLIST pidl)
|
|||
*
|
||||
* returns reference to guid stored in some pidls
|
||||
*/
|
||||
REFIID _ILGetGUIDPointer(LPCITEMIDLIST pidl)
|
||||
IID* _ILGetGUIDPointer(LPCITEMIDLIST pidl)
|
||||
{
|
||||
LPPIDLDATA pdata =_ILGetDataPointer(pidl);
|
||||
|
||||
|
@ -1950,7 +1953,7 @@ REFIID _ILGetGUIDPointer(LPCITEMIDLIST pidl)
|
|||
{
|
||||
case PT_SHELLEXT:
|
||||
case PT_GUID:
|
||||
return (REFIID) &(pdata->u.guid.guid);
|
||||
return &(pdata->u.guid.guid);
|
||||
|
||||
default:
|
||||
TRACE("Unknown pidl type 0x%04x\n", pdata->type);
|
||||
|
|
|
@ -228,7 +228,7 @@ LPITEMIDLIST _ILCreateDrive (LPCWSTR);
|
|||
LPPIDLDATA _ILGetDataPointer (LPCITEMIDLIST);
|
||||
LPSTR _ILGetTextPointer (LPCITEMIDLIST);
|
||||
LPSTR _ILGetSTextPointer (LPCITEMIDLIST);
|
||||
REFIID _ILGetGUIDPointer (LPCITEMIDLIST pidl);
|
||||
IID *_ILGetGUIDPointer (LPCITEMIDLIST pidl);
|
||||
|
||||
/*
|
||||
* debug helper
|
||||
|
|
Loading…
Reference in a new issue