Modify

Opened 3 weeks ago

Closed 3 weeks ago

#3773 closed Bug (No Bug)

Return value in SetError() is limited to 32-bit valuies

Reported by: jchd18 Owned by:
Milestone: Component: AutoIt
Version: 3.3.15.3 Severity: None
Keywords: Cc:

Description (last modified by jchd18)

It isn't possible to set a 64-bit return value using SetError() in either X86 or X64 modes. It's even impossible to set a X64 pointer as return value using SetError().

OTOH Return allows 64-bit values regardless of mode.

Local $n = 0x0123456789abcdef, $r
ConsoleWrite("Passed value:" & @TAB & $n & @LF)
$r = MyRetFunc($n)
ConsoleWrite(@error & @TAB & @extended & @TAB & MyRetFunc($n) & @LF)
$r = MyErrFunc($n)
ConsoleWrite(@error & @TAB & @extended & @TAB & MyErrFunc($n) & @LF)

Func MyErrFunc($v)
	SetError(1, 2, $v)
EndFunc

Func MyRetFunc($v)
	SetError(1, 2)
	Return $v
EndFunc

Attachments (0)

Change History (2)

comment:1 Changed 3 weeks ago by jchd18

  • Description modified (diff)

comment:2 Changed 3 weeks ago by Jpm

  • Resolution set to No Bug
  • Status changed from new to closed

there is no real error. if you want the value to be return you need to explicitly return it

Func MyErrFunc($v)
	Return SetError(1, 2, $v)
EndFunc

Cheers

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 ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.