Opened 13 years ago
Closed 13 years ago
#2298 closed Bug (Fixed)
Error in _WinAPI_EnumDisplayDevices
| Reported by: | KaFu | Owned by: | guinness |
|---|---|---|---|
| Milestone: | 3.3.9.5 | Component: | Standard UDFs |
| Version: | 3.3.8.1 | Severity: | None |
| Keywords: | Cc: |
Description
EnumDisplayDevices returns 0 if display device number is not valid. This is not checked in the current version of _WinAPI_EnumDisplayDevices:
DllCall("user32.dll", "bool", "EnumDisplayDevicesW", "struct*", $tName, "dword", $iDevNum, "struct*", $tDevice, "dword", 1)
If @error Then Return SetError(@error, @extended, 0)
I propose to change these two lines as follows:
Local $iRet = DllCall("user32.dll", "bool", "EnumDisplayDevicesW", "struct*", $tName, "dword", $iDevNum, "struct*", $tDevice, "dword", 1)
If @error or $iRet[0] = 0 Then Return SetError(@error, @extended, $aDevice)
Attachments (0)
Change History (1)
comment:1 by , 13 years ago
| Milestone: | → 3.3.9.5 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | new → closed |

Fixed by revision [7456] in version: 3.3.9.5