Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-17337

MS Picture and Fax Viewer (shimgvw.dll) doesn't work in ReactOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 0.4.15
    • Shell
    • None
    • VirtualBox 5.1.38.

    Description

      How to reproduce:

      1. Replace our shimgvw.dll by version from Win2k3 by copying it to %SystemRoot%\system32 with overwriting.
      2. Register and install it by executing regsvr32 /i shimgvw.dll.
      3. For some image formats, it will not register the file association properly, due to unimplemented stuff in our shlwapi.dll. So in order to fix this, open Folder Properties (from the Explorer's window menubar or from the Control Panel), then go to File Types tab, select required image file type (in my case - jpg), click Additionally button at the file type description at the bottom, select Open action from the actions combobox, click Change, and replace s after rundll32.exe %SystemRoot%\system32 by shimgvw.dll,ImageView_Fullscreen %1. Finally click OK 3 times to apply the changes and close all windows.

      After passing these steps, try to open any image. This can be an image of any supported extension, e. g. bmp, jpeg, jpg, png etc. You can also use the attached test_image.jpg for the test.

      When you will try to open it, nothing will happen (it will not open at all). But in the MS_shimgvw+our_browseui.log I see the following suspicious output when I try to open the image for me:

      err:(dll/win32/ole32/compobj.c:3231) class {603d3800-bd81-11d0-a3a5-00c04fd706ec} not registered
      err:(dll/win32/ole32/compobj.c:3274) no class object {603d3800-bd81-11d0-a3a5-00c04fd706ec} could be created for context 0x3
      

      These missing registry classes indeed are the source of problem. They come from MS browseui.dll, and our one has no them. After exporting them from Windows and then manual imporing in registry from shimgvw1.reg and shimgvw2.reg , I see another debug output in registered_classes.log:

      err:(dll/win32/ole32/compobj.c:1406) DllGetClassObject returned error 0x80040111 for dll L"C:\\WINDOWS\\system32\\browseui.dll"
      err:(dll/win32/ole32/compobj.c:3274) no class object {603d3800-bd81-11d0-a3a5-00c04fd706ec} could be created for context 0x3
      

      They also can be added by simple replacing, registering and installing MS browseui.dll (using regsvr32 /i browseui.dll command).
      After doing this, MS shimgvw attempts to start (appears a window, but then it crashes due to missing functions in our shell32.dll). But if to replace browseui.dll back onto our one, shimgvw doesn't start again, and in the log appears the output pasted above. Looks like our browseui does not work properly with those classes, probably because the support for them is currently unimplemented. And due to this, those classes are missing in ROS registry.

      However, with MS browseui, according to MS_shimgvw+MS_browseui.log, it needs SHGetShellStyleHInstance and SHGetAttributesFromDataObject functions, whose are currently stubbed as exports. After adding a proper stubs for them, MS shimgvw finally starts, but for some reason it doesn't open any images (it always display the message like "Displaying is not available"). But I guess it will be another issue.

      I already did some work on this in my local branch and will send some PRs. Allow me some time.

      Attachments

        1. MS_shimgvw+MS_browseui.log
          74 kB
          Oleg Dubinskiy
        2. MS_shimgvw+MS_browseui.png
          35 kB
          Oleg Dubinskiy
        3. MS_shimgvw+MS_browseui+patched_shell32.png
          35 kB
          Oleg Dubinskiy
        4. MS_shimgvw+our_browseui.log
          249 kB
          Oleg Dubinskiy
        5. registered_classes.log
          98 kB
          Oleg Dubinskiy
        6. shimgvw1.reg
          0.9 kB
          Oleg Dubinskiy
        7. shimgvw2.reg
          1 kB
          Oleg Dubinskiy
        8. test_image.jpg
          47 kB
          Oleg Dubinskiy

        Activity

          People

            Oleg Dubinskij Oleg Dubinskiy
            Oleg Dubinskij Oleg Dubinskiy
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: