Opened 11 years ago

Closed 11 years ago

#2298 closed Bug (Fixed)

Error in _WinAPI_EnumDisplayDevices

Reported by: KaFu Owned by: guinness
Milestone: Component: Standard UDFs
Version: Severity: None
Keywords: Cc:


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 Changed 11 years ago by guinness

  • Milestone set to
  • Owner set to guinness
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [7456] in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain guinness.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.