[Bug 7447] Call to unimplemented function shell32.dll.SHGetIconOverlayIndexA

Wine Bugs wine-bugs at winehq.org
Thu May 17 08:17:20 CDT 2007


http://bugs.winehq.org/show_bug.cgi?id=7447





------- Additional Comments From focht at gmx.net  2007-17-05 08:17 -------
Hello,

another random pick.
Version 3.x wasnt available anymore but newer ones (5.x) exhibit same behaviour.

I added missing implementations to let application startup succeed.

--- snip dlls/shell32/iconcache.c ---
/****************************************************************************
 * SHGetIconOverlayIndexW	[SHELL32.@]
 */
INT WINAPI SHGetIconOverlayIndexW( LPCWSTR pszIconPath, int iIconIndex)
{
   TRACE("%s %d\n", debugstr_w(pszIconPath), iIconIndex);

   /* windows tolerates NULL IconPath, returning standard icons 
      (using icon cache manager) for the specific indizes
      returning -1 now, because wine doesnt handle this case */
   if( pszIconPath == NULL)
      return -1;

   return SIC_GetIconIndex( pszIconPath, iIconIndex, 0);
}

/****************************************************************************
 * SHGetIconOverlayIndexA	[SHELL32.@]
 */
INT WINAPI SHGetIconOverlayIndexA( LPCSTR pszIconPath, int iIconIndex)
{
   INT ret, len;
   LPWSTR lpwstrFile = NULL;

   TRACE("%s %d\n", pszIconPath, iIconIndex);

   if( pszIconPath != NULL)
   {
       len = MultiByteToWideChar(CP_ACP, 0, pszIconPath, -1, NULL, 0);
       lpwstrFile = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
       MultiByteToWideChar(CP_ACP, 0, pszIconPath, -1, lpwstrFile, len);
   }
   
   ret = SHGetIconOverlayIndexW( lpwstrFile, iIconIndex);
  
   if( lpwstrFile != NULL)
       HeapFree(GetProcessHeap(), 0, lpwstrFile);
   
   return ret;
}
--- snip dlls/shell32/iconcache.c ---

and

--- snip dlls/shell32/shell32.spec ---
@ stdcall SHGetIconOverlayIndexA(str long)
@ stdcall SHGetIconOverlayIndexW(wstr long)
--- snip dlls/shell32/shell32.spec ---

With that fixes applied, the application is happy now.
Though the user interface is japanese all over the place.

IJO NASHI :-)

Regards


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list