Modify

Opened 12 years ago

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

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

Fixed by revision [7456] in version: 3.3.9.5

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

Action
as closed The owner will remain guinness.
Author


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

 
Note: See TracTickets for help on using tickets.