Opened 23 hours ago

Last modified 23 hours ago

#4060 new Bug

DllStructCreate() issue with handling errors: Error allocating memory — at Version 2

Reported by: mLipok Owned by:
Milestone: Component: AutoIt
Version: 3.3.14.0 Severity: None
Keywords: Cc:

Description (last modified by mLipok)

According to the HelpFile:
https://www.autoitscript.com/autoit3/docs/functions/DllStructCreate.htm

Return Value
Success:	a variable for use with DllStruct calls.
Failure:	sets the @error flag to non-zero.
@error:	1 = Variable passed to DllStructCreate was not a string.
2 = There is an unknown Data Type in the string passed.
3 = Failed to allocate the memory needed for the struct, or Pointer = 0.
4 = Error allocating memory for the passed string.

In this repro script:

#AutoIt3Wrapper_UseX64=Y
DllStructCreate("byte[123456789097]")
ConsoleWrite('End' & @CRLF)

Issue/Question 1: in x32 AutoIt version
Why AutoIt fires MsgBox error and quit proceesing rest of the script, instead of simply setting @error = 3 (eventually @error = 4) ?

Issue/Question 2: in x64 AutoIt version
Why AutoIt does not set @error = 3 (eventually @error = 4) ?

Related discussion:
https://www.autoitscript.com/forum/topic/154081-avoid-autoit-error-message-box-in-unknown-errors/page/5/#findComment-1548049

https://www.autoitscript.com/forum/topic/154081-avoid-autoit-error-message-box-in-unknown-errors/page/5/#findComment-1548054

Change History (2)

comment:1 Changed 23 hours ago by mLipok

  • Description modified (diff)

comment:2 Changed 23 hours ago by mLipok

  • Description modified (diff)
Note: See TracTickets for help on using tickets.