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: Component: Standard UDFs
Version: Severity: None
Keywords: _WinAPI_RegQueryValue buffer Cc:


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
  • Owner set to guinness
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [11544] 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.