RtlUlonglongByteSwap - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H
//
// Byte swap routines.
//
#ifndef PHNT_RTL_BYTESWAP

#define RtlUlonglongByteSwap(_x) _byteswap_uint64((_x))

#endif
#endif

View code on GitHub
#ifndef _NTRTL_H
//
// Byte swap routines.
//
#ifndef PHNT_RTL_BYTESWAP
// ...
#else

NTSYSAPI
ULONGLONG
FASTCALL
RtlUlonglongByteSwap(
    _In_ ULONGLONG Source
    );

#endif
#endif

View code on GitHub
// wdm.h

NTSYSAPI ULONGLONG RtlUlonglongByteSwap(
  ULONGLONG Source
);
View the official Windows Driver Kit DDI reference

NtDoc

This function is documented in Windows Driver Kit.

Windows Driver Kit DDI reference (nf-wdm-rtlulonglongbyteswap)

RtlUlonglongByteSwap macro

Description

The RtlUlonglongByteSwap routine reverses the ordering of the eight bytes in a 64-bit unsigned integer value.

Parameters

Source

A ULONGLONG value to convert to a byte-swapped version.

Return value

The byte-swapped version of the input parameter value.

Remarks

For example, if the Source parameter value is 0x0123456789abcdef, the routine returns 0xefcdab8967452301.

A typical use of this routine is to convert a ULONGLONG value from little-endian byte format to big-endian byte format, and vice versa.

To reverse the ordering of bytes in a USHORT value, use the RtlUshortByteSwap routine. To reverse ordering of bytes in a ULONG value, use the RtlUlongByteSwap routine.

See also

RtlUlongByteSwap

RtlUshortByteSwap