Commit 2843de3f authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

Get rid of a few pointless A/W conversions.

parent 800864a0
......@@ -186,16 +186,19 @@ static HRESULT WINAPI IExtractIconW_fnGetIconLocation(
/* my computer and other shell extensions */
else if ((riid = _ILGetGUIDPointer(pSimplePidl)))
{
char xriid[50];
static WCHAR fmt[] = { 'C','L','S','I','D','\\','{','%','0','8','l','x',
'-','%','0','4','x','-','%','0','4','x','-','%','0','2','x',
'%','0','2','x','-','%','0','2','x', '%','0','2','x', '%','0','2','x',
'%','0','2','x','%','0','2','x','%','0','2','x','}',0 };
WCHAR xriid[50];
sprintf(xriid, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
sprintfW(xriid, fmt,
riid->Data1, riid->Data2, riid->Data3,
riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3],
riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7]);
if (HCR_GetDefaultIconA(xriid, sTemp, MAX_PATH, &dwNr))
if (HCR_GetDefaultIconW(xriid, szIconFile, cchMax, &dwNr))
{
MultiByteToWideChar(CP_ACP, 0, sTemp, -1, szIconFile, cchMax);
*piIndex = dwNr;
}
else
......@@ -207,9 +210,10 @@ static HRESULT WINAPI IExtractIconW_fnGetIconLocation(
else if (_ILIsDrive (pSimplePidl))
{
if (HCR_GetDefaultIconA("Drive", sTemp, MAX_PATH, &dwNr))
static WCHAR drive[] = { 'D','r','i','v','e',0 };
if (HCR_GetDefaultIconW(drive, szIconFile, cchMax, &dwNr))
{
MultiByteToWideChar(CP_ACP, 0, sTemp, -1, szIconFile, cchMax);
*piIndex = dwNr;
}
else
......@@ -220,11 +224,9 @@ static HRESULT WINAPI IExtractIconW_fnGetIconLocation(
}
else if (_ILIsFolder (pSimplePidl))
{
if (HCR_GetDefaultIconA("Folder", sTemp, MAX_PATH, &dwNr))
{
MultiByteToWideChar(CP_ACP, 0, sTemp, -1, szIconFile, cchMax);
}
else
static WCHAR folder[] = { 'F','o','l','d','e','r',0 };
if (!HCR_GetDefaultIconW(folder, szIconFile, cchMax, &dwNr))
{
lstrcpynW(szIconFile, swShell32Name, cchMax);
dwNr = 3;
......
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