Modify

Opened 11 years ago

Closed 10 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 by jguinch, 11 years ago

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

comment:2 by guinness, 11 years ago

Component: AutoItStandard UDFs

comment:3 by guinness, 10 years ago

Milestone: 3.3.15.1
Owner: set to guinness
Resolution: Fixed
Status: newclosed

Fixed by revision [11544] in version: 3.3.15.1

Modify Ticket

Action
as closed The owner will remain guinness.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.