From 1edd090698b6874c7fa9b25d529c096ddead4ba9 Mon Sep 17 00:00:00 2001 From: otya Date: Wed, 5 Oct 2016 21:17:54 +0900 Subject: [PATCH] =?UTF-8?q?ExtractIcon=E3=81=A7RedirectSystemDir?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/shell.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shell/shell.c b/shell/shell.c index fe7cd5e9c30..2265d20bb1b 100644 --- a/shell/shell.c +++ b/shell/shell.c @@ -328,7 +328,7 @@ HICON WINAPI ExtractIconNE(HINSTANCE hInstance, LPCSTR lpszFile, UINT nIconIndex UINT ret; UINT cx = GetSystemMetrics(SM_CXICON), cy = GetSystemMetrics(SM_CYICON); - TRACE("%p %s %d\n", hInstance, debugstr_w(lpszFile), nIconIndex); + TRACE("%p %s %d\n", hInstance, debugstr_a(lpszFile), nIconIndex); if (nIconIndex == (UINT)-1) { @@ -347,6 +347,7 @@ HICON WINAPI ExtractIconNE(HINSTANCE hInstance, LPCSTR lpszFile, UINT nIconIndex return NULL; } +__declspec(dllimport) LPCSTR RedirectSystemDir(LPCSTR path, LPSTR to, size_t max_len); /************************************************************************* * ExtractIcon (SHELL.34) */ @@ -354,6 +355,8 @@ HICON16 WINAPI ExtractIcon16( HINSTANCE16 hInstance, LPCSTR lpszExeFileName, UINT16 nIconIndex ) { TRACE("\n"); //return convert_icon_to_16( hInstance, NE_ExtractIcon(lpszExeFileName, nIconIndex, 0, 0, 0)); + char buf[MAX_PATH]; + lpszExeFileName = RedirectSystemDir(lpszExeFileName, buf, MAX_PATH); if (nIconIndex == 0xFFFF) { //icon count