Extracts a number of bits from a DWORD (32-bit) value.
#Include <WinAPIEx.au3>
_WinAPI_LongMid ( $iValue, $iStart, $iCount )
$iValue | 32-bit value. |
$iStart | The bit position to start. (0 - first bit) |
$iCount | The number of bits to extract. |
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global $Value = 0x00FA0000
ConsoleWrite('0x' & Hex(_WinAPI_LongMid($Value, 16, 4)) & @CR)
ConsoleWrite('0x' & Hex(_WinAPI_LongMid($Value, 20, 4)) & @CR)