Extracts a number of bytes from a binary variant.
BinaryMid ( binary, start [, count] )
Parameters
| binary | The binary data to evaluate. |
| start | The byte position to start. (1 = first byte) |
| count | [optional] The number of bytes to extract. By default the entire remainder of the binary data. |
Return Value
Returns the extracted binary data.
Remarks
If start is out-of-bounds, an empty binary variant is returned. If start is valid but count is out-of-bounds, the entire remainder of the binary data is returned.
Related
Binary, BinaryLen
Example
; Create the binary data 0x10203040
$binary = Binary("0x10203040")
$extract = BinaryMid($binary, 2, 2)
MsgBox(0, "2nd and 3rd bytes are", $extract)