Modify

Opened 9 years ago

Closed 9 years ago

#3091 closed Bug (Fixed)

_WinAPI_RegQueryValue never returns the buffer size on ERROR_MORE_DATA error

Reported by: jguinch Owned by: guinness
Milestone: 3.3.15.1 Component: Standard UDFs
Version: 3.3.14.0 Severity: None
Keywords: _WinAPI_RegQueryValue buffer Cc:

Description

When the buffer size in not large enough, the function is supposed to return both $ERROR_MORE_DATA (234) and the required buffer size.
But in fact, the size is never returned, because the line
If $aRet[0] Then Return SetError(10, $aRet[0], 0)
returns 0, @error = 10 and @extended = $ERROR_MORE_DATA.

The line could be modified like
If $aRet[0] <> $ERROR_MORE_DATA Then Return SetError(10, $aRet[0], 0), the function returns the required buffer size

Attachments (0)

Change History (3)

comment:1 Changed 9 years ago by jguinch

sorry for the mess, component should be Standard UDFs rather than Autoit...

comment:2 Changed 9 years ago by guinness

  • Component changed from AutoIt to Standard UDFs

comment:3 Changed 9 years ago by guinness

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

Fixed by revision [11544] in version: 3.3.15.1

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.