Function Reference


_WinAPI_LongMid

Extracts a number of bits from a DWORD (32-bit) value

#include <WinAPIMisc.au3>
_WinAPI_LongMid ( $iValue, $iStart, $iCount )

Parameters

$iValue 32-bit value.
$iStart The bit position to start. (0 - first bit)
$iCount The number of bits to extract.

Return Value

Returns the value that consists of a specified bits.

Remarks

This function does not check the parameters for valid values. If values is incorrect, the function may return
an unexpected results.

Example

#include <WinAPIMisc.au3>

Local $iValue = 0x00FA0000

ConsoleWrite('0x' & Hex(_WinAPI_LongMid($iValue, 16, 4)) & @CRLF)
ConsoleWrite('0x' & Hex(_WinAPI_LongMid($iValue, 20, 4)) & @CRLF)