[Bug 35660] New: ExtractIcon() behaves not according to the normal windows-api; explorer.exe crashes sometimes when opening a folder, after a new Software has been installed.

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Feb 23 20:12:34 CST 2014


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

            Bug ID: 35660
           Summary: ExtractIcon() behaves not according to the normal
                    windows-api; explorer.exe crashes sometimes when
                    opening a folder, after a new Software has been
                    installed.
           Product: Wine
           Version: 1.6.1
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P5
         Component: shell32
          Assignee: wine-bugs at winehq.org
          Reporter: public0x05bf at bluewin.ch

ExtractIcon() behaves not according to the normal windows-api:

* The Windows API Reference states (© 2014 Microsoft):

  HICON ExtractIcon(
    HINSTANCE hInst,          // instance handle
    LPCTSTR lpszExeFileName,  // filename of file with icon
    UINT nIconIndex           // index of icon to extract
  );

  * nIconIndex
  [...]


  If this value is a negative number not equal to –1, the function returns a
  handle to the icon in the specified file whose resource identifier is equal
  to the absolute value of nIconIndex. For example, you should use –3 to
  extract the icon whose resource identifier is 3. To extract the icon whose
  resource identifier is 1, use the ExtractIconEx function.
  [...]

==> you should take the icon with "index = abs(nIconIndex)" !

* The ExtractIcon() of wine finally calls PrivatExtractIconsW() of wine in
  user32.dll (in user32.dll, exticon.c ).

  * THERE THE WINE TEAM HAS DECIDED TO PROCEED AS FOLLOWS (from exticon.c):
    [...] 
    Also the Windows equivalent does extract icons in a strange way if
    nIndex is negative. Our implementation treats a negative nIndex as
    looking for that resource identifier for the first icon to retrieve.

* I have installed Visual C++ 6.0 in wine.
  After the installation, all icon-references in the registry have been entered
  with negative values.
  The icon-references have been associated with file-types, leading to a crash
  of explorer.exe every time I have opened a folder containing one of the files
  of a such a file-type.
  Changing all the indexes to positive numbers avoided the crashes.
  It has been annoing !

* PLEASE, IF YOU PROVIDE A ENVIRONMENT TO RUN WINDOWS PROGRAMS, TRY TO MAKE
  BEHAVE THIS ENVIRONMENT THE SAME AS WINDOWS DOES!

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list