Opened 15 years ago
Last modified 15 years ago
#1288 closed Bug
DLLStructSetData behavior with binary variant data — at Version 2
Reported by: | evilertoaster | Owned by: | |
---|---|---|---|
Milestone: | 3.3.1.6 | Component: | AutoIt |
Version: | 3.3.0.0 | Severity: | None |
Keywords: | Cc: |
Description (last modified by Valik)
As demonstrated in this thread
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 (2)
comment:1 Changed 15 years ago by anonymous
comment:2 Changed 15 years ago by Valik
- Description modified (diff)
Note: See
TracTickets for help on using
tickets.
Sorry I didn't check the claims made in the post avidly enough. The 2nd and 3rd code blocks do set the same data, but DllStructSetData($a,1,0xAABB,2) sets it differently. to me, I would have though all 3 to set the data to: 0xFFAABBFF.