Skip to content

Commit 1edd090

Browse files
committed
ExtractIconでRedirectSystemDir
1 parent c99a239 commit 1edd090

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

shell/shell.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ HICON WINAPI ExtractIconNE(HINSTANCE hInstance, LPCSTR lpszFile, UINT nIconIndex
328328
UINT ret;
329329
UINT cx = GetSystemMetrics(SM_CXICON), cy = GetSystemMetrics(SM_CYICON);
330330

331-
TRACE("%p %s %d\n", hInstance, debugstr_w(lpszFile), nIconIndex);
331+
TRACE("%p %s %d\n", hInstance, debugstr_a(lpszFile), nIconIndex);
332332

333333
if (nIconIndex == (UINT)-1)
334334
{
@@ -347,13 +347,16 @@ HICON WINAPI ExtractIconNE(HINSTANCE hInstance, LPCSTR lpszFile, UINT nIconIndex
347347

348348
return NULL;
349349
}
350+
__declspec(dllimport) LPCSTR RedirectSystemDir(LPCSTR path, LPSTR to, size_t max_len);
350351
/*************************************************************************
351352
* ExtractIcon (SHELL.34)
352353
*/
353354
HICON16 WINAPI ExtractIcon16( HINSTANCE16 hInstance, LPCSTR lpszExeFileName,
354355
UINT16 nIconIndex )
355356
{ TRACE("\n");
356357
//return convert_icon_to_16( hInstance, NE_ExtractIcon(lpszExeFileName, nIconIndex, 0, 0, 0));
358+
char buf[MAX_PATH];
359+
lpszExeFileName = RedirectSystemDir(lpszExeFileName, buf, MAX_PATH);
357360
if (nIconIndex == 0xFFFF)
358361
{
359362
//icon count

0 commit comments

Comments
 (0)