Opened 15 years ago

Last modified 15 years ago

#1288 closed Bug

DLLStructSetData behavior with binary variant data — at Initial Version

Reported by: evilertoaster Owned by:
Milestone: 3.3.1.6 Component: AutoIt
Version: 3.3.0.0 Severity: None
Keywords: Cc:

Description

As demonstrated in this thread-http://www.autoitscript.com/forum/index.php?showtopic=105133

There might be some expected behavior when using DLLStructSetData with binary variants. Some examples:
Consider $a:

$a=DllStructCreate('byte[4]')

These two lines:

DllStructSetData($a,1,Binary('0xAABB'),2)

and

DllStructSetData($a,1,Number(Binary('0xAABB'),2)

Produce different results. (The first only sets 0xAA).

DllStructSetData($a,1,Binary('0xFFFFFFFF'),1)

and

DllStructSetData($a,1,Binary('0xFFFFFFFF'))

Also produce different results, the first only sets 0xFF. Even though according to the documentation, omitting the 1 as the index argument should be identical to specifying 1.

Help file says:
"If the element is an array, you need to specify which index to set, otherwise it sets index 1."

Change History (0)

Note: See TracTickets for help on using tickets.