Skip to content

Commit

Permalink
ExtractIconでRedirectSystemDir
Browse files Browse the repository at this point in the history
  • Loading branch information
otya128 committed Oct 5, 2016
1 parent c99a239 commit 1edd090
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion shell/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -347,13 +347,16 @@ 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)
*/
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
Expand Down

0 comments on commit 1edd090

Please sign in to comment.