[Bug 39210] Dream Aquarium (screensaver) fails to read monitor power state ('{4d36e96e-e325-11ce-bfc1-08002be10318}' device class GUID registry data missing)

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Nov 26 14:14:54 CST 2015


https://bugs.winehq.org/show_bug.cgi?id=39210

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|regression                  |
             Status|NEEDINFO                    |NEW
          Component|-unknown                    |setupapi
            Version|unspecified                 |1.7.0
            Summary|Dream Aquarium no longer    |Dream Aquarium
                   |starts                      |(screensaver) fails to read
                   |                            |monitor power state
                   |                            |('{4d36e96e-e325-11ce-bfc1-
                   |                            |08002be10318}' device class
                   |                            |GUID registry data missing)

--- Comment #7 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

confirming. It's not a regression in Wine if the app vendor added new code to
determine the monitor power state (previously not present).

At least two problems here.

--- snip ---
$ pwd
/home/focht/.wine/drive_c/Program Files/Dream Aquarium

$ WINEDEBUG=+tid,+seh,+relay,+setupapi wine ./Dream_Aquarium.scr -S >>log.txt
2>&1
...
042:Call setupapi.SetupDiGetClassDevsW(007dfd34,00000000,00000000,00000002)
ret=004158e4
0042:trace:setupapi:SetupDiGetClassDevsExW
{4d36e96e-e325-11ce-bfc1-08002be10318} (null) (nil) 0x00000002 (nil) (null)
(nil)
0042:warn:setupapi:SetupDiGetClassDevsExW unsupported flags 00000002
0042:trace:setupapi:SetupDiCreateDeviceInfoListExW
{4d36e96e-e325-11ce-bfc1-08002be10318} (nil) (null) (nil)
0042:Call ntdll.RtlAllocateHeap(00110000,00000000,00000024) ret=7dd89d2e
0042:Ret  ntdll.RtlAllocateHeap() retval=0014b830 ret=7dd89d2e
0042:trace:setupapi:SETUPDI_EnumerateDevices 0x14b830,
{4d36e96e-e325-11ce-bfc1-08002be10318}, (null), 00000002
0042:Call advapi32.RegCreateKeyExW(80000002,7ddb2160
L"System\\CurrentControlSet\\Enum",00000000,00000000,00000000,00020019,00000000,007dfb3c,00000000)
ret=7dd8c5f4
0042:Ret  advapi32.RegCreateKeyExW() retval=00000000 ret=7dd8c5f4
0042:Call
advapi32.RegEnumKeyExW(0000009c,00000000,007df928,007dfb34,00000000,00000000,00000000,00000000)
ret=7dd8c6dd
0042:Ret  advapi32.RegEnumKeyExW() retval=00000103 ret=7dd8c6dd
0042:Call advapi32.RegCloseKey(0000009c) ret=7dd8c779
0042:Ret  advapi32.RegCloseKey() retval=00000000 ret=7dd8c779
0042:Ret  setupapi.SetupDiGetClassDevsW() retval=0014b830 ret=004158e4
0042:Call setupapi.SetupDiEnumDeviceInfo(0014b830,00000000,007dfcc4)
ret=0041594b
0042:trace:setupapi:SetupDiEnumDeviceInfo 0x14b830 0 0x7dfcc4
0042:Ret  setupapi.SetupDiEnumDeviceInfo() retval=00000000 ret=0041594b
0042:Call KERNEL32.GetLastError() ret=004159ff
0042:Ret  KERNEL32.GetLastError() retval=00000103 ret=004159ff
0042:Call setupapi.SetupDiDestroyDeviceInfoList(0014b830) ret=00415a5b
0042:trace:setupapi:SetupDiDestroyDeviceInfoList 0x14b830
...
0042:Ret  setupapi.SetupDiDestroyDeviceInfoList() retval=00000001 ret=00415a5b 
--- snip ---

'{4d36e96e-e325-11ce-bfc1-08002be10318}' device class instance(s) data is
obviously missing.

MSDN:

--- quote ---
System-Defined Device Setup Classes Available to Vendors

The following classes and GUIDs are defined by the operating system. Unless
otherwise noted, these classes and GUIDs can be used to install devices (or
drivers) on Windows 2000 and later versions of Windows: 
...
Monitor

    Class = Monitor
    ClassGuid = {4d36e96e-e325-11ce-bfc1-08002be10318}

    This class includes display monitors. An INF for a device of this class
installs no device driver(s), but instead specifies the features of a
particular monitor to be stored in the registry for use by drivers of video
adapters. (Monitors are enumerated as the child devices of display adapters.)

...
--- snip ---

Faking at least one monitor in registry allows to get it a bit further:

--- snip ---
...
0035:Call setupapi.SetupDiGetClassDevsW(007dfd34,00000000,00000000,00000002)
ret=004158e4
0035:trace:setupapi:SetupDiGetClassDevsExW
{4d36e96e-e325-11ce-bfc1-08002be10318} (null) (nil) 0x00000002 (nil) (null)
(nil)
0035:warn:setupapi:SetupDiGetClassDevsExW unsupported flags 00000002
0035:trace:setupapi:SetupDiCreateDeviceInfoListExW
{4d36e96e-e325-11ce-bfc1-08002be10318} (nil) (null) (nil) 
...
0035:trace:setupapi:SETUPDI_EnumerateDevices 0x14c508,
{4d36e96e-e325-11ce-bfc1-08002be10318}, (null), 00000002 
...
0035:trace:setupapi:SETUPDI_EnumerateMatchingDevices L"DISPLAY"
0035:Call
advapi32.RegEnumKeyExW(000000a0,00000000,007df6b8,007df8c0,00000000,00000000,00000000,00000000)
ret=7dcf9430
0035:Ret  advapi32.RegEnumKeyExW() retval=00000000 ret=7dcf9430
0035:Call advapi32.RegOpenKeyExW(000000a0,007df6b8
L"Default_Monitor",00000000,00020019,007df6b4) ret=7dcf946f
0035:Ret  advapi32.RegOpenKeyExW() retval=00000000 ret=7dcf946f
0035:trace:setupapi:SETUPDI_EnumerateMatchingDevices L"Default_Monitor"
0035:trace:setupapi:SETUPDI_EnumerateMatchingDeviceInstances L"DISPLAY"
L"Default_Monitor" 
...
0035:trace:setupapi:SETUPDI_AddDeviceToSet 0x14c508,
{4d36e96e-e325-11ce-bfc1-08002be10318}, 0,
L"DISPLAY\\Default_Monitor\\4&2abfaa30&0&00000001&00&02", 0
...
0035:trace:setupapi:SetupDiSetDeviceRegistryPropertyW 0x14c508 0x14c620 8
0x7df352 76
0035:Call advapi32.RegSetValueExW(000000b0,7dd1efa4
L"ClassGUID",00000000,00000001,007df352,0000004c) ret=7dcfb8b1
0035:Ret  advapi32.RegSetValueExW() retval=00000000 ret=7dcfb8b1
...
...
0035:Ret  setupapi.SetupDiGetClassDevsW() retval=0014c508 ret=004158e4
0035:Call setupapi.SetupDiEnumDeviceInfo(0014c508,00000000,007dfcc4)
ret=0041594b
0035:trace:setupapi:SetupDiEnumDeviceInfo 0x14c508 0 0x7dfcc4
0035:Ret  setupapi.SetupDiEnumDeviceInfo() retval=00000001 ret=0041594b
0035:Call
setupapi.SetupDiGetDeviceRegistryPropertyW(0014c508,007dfcc4,00000000,00000000,00000000,00000000,007df828)
ret=004151f9
0035:trace:setupapi:SetupDiGetDeviceRegistryPropertyW 14c508 0x7dfcc4 0 (nil)
(nil) 0 0x7df828
0035:Call advapi32.RegQueryValueExW(000000b0,7dd1f19c
L"DeviceDesc",00000000,00000000,00000000,007df75c) ret=7dcfb519
0035:Ret  advapi32.RegQueryValueExW() retval=00000000 ret=7dcfb519
0035:Ret  setupapi.SetupDiGetDeviceRegistryPropertyW() retval=00000000
ret=004151f9
...
0035:Call
setupapi.SetupDiGetDeviceRegistryPropertyW(0014c508,007dfcc4,00000000,00000000,007df84c,00000400,00000000)
ret=004152b2
0035:trace:setupapi:SetupDiGetDeviceRegistryPropertyW 14c508 0x7dfcc4 0 (nil)
0x7df84c 1024 (nil)
0035:Call advapi32.RegQueryValueExW(000000b0,7dd1f19c
L"DeviceDesc",00000000,00000000,007df84c,007df75c) ret=7dcfb519
0035:Ret  advapi32.RegQueryValueExW() retval=00000000 ret=7dcfb519
0035:Ret  setupapi.SetupDiGetDeviceRegistryPropertyW() retval=00000001
ret=004152b2
0035:Call KERNEL32.GetLastError() ret=004bdc45
0035:Ret  KERNEL32.GetLastError() retval=0000007a ret=004bdc45
...
0035:Call
setupapi.SetupDiGetDeviceRegistryPropertyW(0014c508,007dfcc4,0000001e,00000000,007dfc8c,00000038,00000000)
ret=00415839
0035:trace:setupapi:SetupDiGetDeviceRegistryPropertyW 14c508 0x7dfcc4 30 (nil)
0x7dfc8c 56 (nil)
0035:Ret  setupapi.SetupDiGetDeviceRegistryPropertyW() retval=00000000
ret=00415839
...
0035:Call setupapi.SetupDiEnumDeviceInfo(0014c508,00000001,007dfcc4)
ret=004159ef
0035:trace:setupapi:SetupDiEnumDeviceInfo 0x14c508 1 0x7dfcc4
0035:Ret  setupapi.SetupDiEnumDeviceInfo() retval=00000000 ret=004159ef
0035:Call KERNEL32.GetLastError() ret=004159ff
0035:Ret  KERNEL32.GetLastError() retval=00000103 ret=004159ff
0035:Call setupapi.SetupDiDestroyDeviceInfoList(0014c508) ret=00415a5b
0035:trace:setupapi:SetupDiDestroyDeviceInfoList 0x14c508 
...
--- snip ---

0x1e = SPDRP_DEVICE_POWER_DATA -> not handled

Source:
https://source.winehq.org/git/wine.git/blob/ab92627e19f10d7ad23abb101b21ec7bd122628c:/dlls/setupapi/devinst.c#l3047

--- snip ---
3047 static const struct PropertyMapEntry PropertyMap[] = {
3048     { REG_SZ, "DeviceDesc", DeviceDesc },
3049     { REG_MULTI_SZ, "HardwareId", HardwareId },
3050     { REG_MULTI_SZ, "CompatibleIDs", CompatibleIDs },
3051     { 0, NULL, NULL }, /* SPDRP_UNUSED0 */
3052     { REG_SZ, "Service", Service },
3053     { 0, NULL, NULL }, /* SPDRP_UNUSED1 */
3054     { 0, NULL, NULL }, /* SPDRP_UNUSED2 */
3055     { REG_SZ, "Class", Class },
3056     { REG_SZ, "ClassGUID", ClassGUID },
3057     { REG_SZ, "Driver", Driver },
3058     { REG_DWORD, "ConfigFlags", ConfigFlags },
3059     { REG_SZ, "Mfg", Mfg },
3060     { REG_SZ, "FriendlyName", FriendlyName },
3061     { REG_SZ, "LocationInformation", LocationInformation },
3062     { 0, NULL, NULL }, /* SPDRP_PHYSICAL_DEVICE_OBJECT_NAME */
3063     { REG_DWORD, "Capabilities", Capabilities },
3064     { REG_DWORD, "UINumber", UINumber },
3065     { REG_MULTI_SZ, "UpperFilters", UpperFilters },
3066     { REG_MULTI_SZ, "LowerFilters", LowerFilters },
3067 };
--- snip ---

MSDN:
https://msdn.microsoft.com/en-us/library/windows/hardware/ff551967%28v=vs.85%29.aspx

--- quote ---
The SetupDiGetDeviceRegistryProperty function retrieves a specified Plug and
Play device property.

BOOL SetupDiGetDeviceRegistryProperty(
  _In_      HDEVINFO         DeviceInfoSet,
  _In_      PSP_DEVINFO_DATA DeviceInfoData,
  _In_      DWORD            Property,
  _Out_opt_ PDWORD           PropertyRegDataType,
  _Out_opt_ PBYTE            PropertyBuffer,
  _In_      DWORD            PropertyBufferSize,
  _Out_opt_ PDWORD           RequiredSize
);

Parameters

DeviceInfoSet [in]

    A handle to a device information set that contains a device information
element that represents the device for which to retrieve a Plug and Play
property.
DeviceInfoData [in]

    A pointer to an SP_DEVINFO_DATA structure that specifies the device
information element in DeviceInfoSet.
Property [in]

    One of the following values that specifies the property to be retrieved:
...
SPDRP_DEVICE_POWER_DATA

    (Windows XP and later) The function retrieves a CM_POWER_DATA structure
that contains the device's power management information.

--- quote ---

ProtectionID for documentation:

--- snip ---
-=[ ProtectionID v0.6.7.0 OCTOBER]=-
(c) 2003-2015 CDKiLLER & TippeX
Build 31/10/15-14:35:10
Ready...
Scanning -> Z:\home\focht\Downloads\DreamAquariumXP.exe
File Type : 32-Bit Exe (Subsystem : Win GUI / 2), Size : 8684083 (0848233h)
Byte(s) | Machine: 0x14C (I386)
Compilation TimeStamp : 0x4B1AE3CC -> Sat 05th Dec 2009 22:50:52 (GMT)
[TimeStamp] 0x4B1AE3CC -> Sat 05th Dec 2009 22:50:52 (GMT) | PE Header | - |
Offset: 0x000000E0 | VA: 0x004000E0 | -
-> File has 8635955 (083C633h) bytes of appended data starting at offset 0BC00h
[File Heuristics] -> Flag #1 : 00000000000001011100000000000100 (0x0005C004)
[Entrypoint Section Entropy] : 6.51 (section #0) ".text   " | Size : 0x5C4C
(23628) byte(s)
[DllCharacteristics] -> Flag : (0x8000) -> TSA
[SectionCount] 5 (0x5) | ImageSize 0x3D000 (249856) byte(s)
[-= Installer =-] Nullsoft SFX Setup v2.46
- Scan Took : 0.327 Second(s) [000000147h (327) tick(s)] [562 of 577 scan(s)
done]

Scanning -> C:\Program Files\Dream Aquarium\Dream_Aquarium.scr
File Type : 32-Bit Exe (Subsystem : Win GUI / 2), Size : 1887744 (01CCE00h)
Byte(s) | Machine: 0x14C (I386)
Compilation TimeStamp : 0x5269B2A9 -> Thu 24th Oct 2013 23:52:09 (GMT)
[TimeStamp] 0x5269B2A9 -> Thu 24th Oct 2013 23:52:09 (GMT) | PE Header | - |
Offset: 0x00000110 | VA: 0x00400110 | -
[File Heuristics] -> Flag #1 : 00000000000001001100010000000000 (0x0004C400)
[Entrypoint Section Entropy] : 6.75 (section #0) ".text   " | Size : 0x174DBC
(1527228) byte(s)
[DllCharacteristics] -> Flag : (0x8000) -> TSA
[SectionCount] 4 (0x4) | ImageSize 0x1DA000 (1941504) byte(s)
[CdKeySerial] found "Trial version" @ VA: 0x00179980 / Offset: 0x00178B80
...
[CompilerDetect] -> Visual C++ 9.0 (Visual Studio 2008)
[!] File appears to have no protection or is using an unknown protection
- Scan Took : 0.747 Second(s) [0000002EBh (747) tick(s)] [503 of 577 scan(s)
done]
--- snip ---

Resource section present but no version resource at all.
Software release/version management at its best.

$ sha1sum DreamAquariumXP.exe 
ac95161c1e675a8eb6102f339fcae52e02f5659b  DreamAquariumXP.exe

$ du -sh DreamAquariumXP.exe 
8.3M    DreamAquariumXP.exe

$ wine --version
wine-1.8-rc1-89-g4a315cd

Regards

-- 
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