mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
Martin Fuchs <martin-fuchs@gmx.net>
- make drive letters in PIDLs always uppercase to enable PIDL comparison - Unicodify _ILCreateDrive() svn path=/trunk/; revision=10938
This commit is contained in:
parent
e4f5d86770
commit
67f1b8f671
2 changed files with 6 additions and 6 deletions
|
@ -1621,16 +1621,16 @@ HRESULT _ILCreateFromPathA(LPCSTR szPath, LPITEMIDLIST* ppidl)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
LPITEMIDLIST _ILCreateDrive( LPCSTR lpszNew)
|
LPITEMIDLIST _ILCreateDrive(LPCWSTR lpszNew)
|
||||||
{
|
{
|
||||||
char sTemp[4];
|
WCHAR sTemp[4];
|
||||||
LPITEMIDLIST pidlOut;
|
LPITEMIDLIST pidlOut;
|
||||||
|
|
||||||
sTemp[0]=lpszNew[0];
|
sTemp[0]=toupperW(lpszNew[0]);
|
||||||
sTemp[1]=':';
|
sTemp[1]=':';
|
||||||
sTemp[2]='\\';
|
sTemp[2]='\\';
|
||||||
sTemp[3]=0x00;
|
sTemp[3]=0x00;
|
||||||
TRACE("(%s)\n",sTemp);
|
TRACE("(%s)\n",debugstr_w(sTemp));
|
||||||
|
|
||||||
/* FIXME: magic #s! */
|
/* FIXME: magic #s! */
|
||||||
if ((pidlOut = _ILCreateWithTypeAndSize(PT_DRIVE, 25)))
|
if ((pidlOut = _ILCreateWithTypeAndSize(PT_DRIVE, 25)))
|
||||||
|
@ -1639,7 +1639,7 @@ LPITEMIDLIST _ILCreateDrive( LPCSTR lpszNew)
|
||||||
|
|
||||||
if ((pszDest = _ILGetTextPointer(pidlOut)))
|
if ((pszDest = _ILGetTextPointer(pidlOut)))
|
||||||
{
|
{
|
||||||
memcpy(pszDest, sTemp, sizeof(sTemp));
|
WideCharToMultiByte(CP_ACP, 0, sTemp, sizeof(sTemp)/sizeof(WCHAR), pszDest, sizeof(sTemp)/sizeof(WCHAR), NULL, NULL);
|
||||||
TRACE("-- create Drive: %s\n", debugstr_a(pszDest));
|
TRACE("-- create Drive: %s\n", debugstr_a(pszDest));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,7 +208,7 @@ LPITEMIDLIST _ILCreateControlPanel (void);
|
||||||
LPITEMIDLIST _ILCreatePrinters (void);
|
LPITEMIDLIST _ILCreatePrinters (void);
|
||||||
LPITEMIDLIST _ILCreateNetwork (void);
|
LPITEMIDLIST _ILCreateNetwork (void);
|
||||||
LPITEMIDLIST _ILCreateBitBucket (void);
|
LPITEMIDLIST _ILCreateBitBucket (void);
|
||||||
LPITEMIDLIST _ILCreateDrive (LPCSTR);
|
LPITEMIDLIST _ILCreateDrive (LPCWSTR);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* helper functions (getting struct-pointer)
|
* helper functions (getting struct-pointer)
|
||||||
|
|
Loading…
Reference in a new issue