Function Reference


_WinAPI_SwapWord

Converts a USHORT from little-endian to big-endian, and vice versa

#include <WinAPIConv.au3>
_WinAPI_SwapWord ( $iValue )

Parameters

$iValue The USHORT value to convert.

Return Value

Returns the converted value.

See Also

Search RtlUshortByteSwap in MSDN Library.

Example

#include <WinAPIConv.au3>

Local $iValue = 0x1122

ConsoleWrite('0x' & Hex($iValue, 4) & @CRLF)
ConsoleWrite('0x' & Hex(_WinAPI_SwapWord($iValue), 4) & @CRLF)