#ifndef _NTRTL_H
#if defined(_M_AMD64)
#define RtlFillMemoryUlonglong(Destination, Length, Pattern) \
__stosq((PULONG64)(Destination), Pattern, (Length) / 8)
View code on GitHub#ifndef _NTRTL_H
#if defined(_M_AMD64)
// ...
#else
NTSYSAPI
VOID
NTAPI
RtlFillMemoryUlonglong(
_Out_writes_bytes_all_(Length) PVOID Destination,
_In_ SIZE_T Length,
_In_ ULONGLONG Pattern
);
View code on GitHub// ntifs.h
void RtlFillMemoryUlonglong(
[out] Destination,
[in] Length,
[in] Pattern
);
View the official Windows Driver Kit DDI referenceThis macro is documented in Windows Driver Kit.
The RtlFillMemoryUlonglong routine fills a given range of memory with one or more repetitions of a given ULONGLONG value.
Destination [out]Pointer to the start of the range of memory to be filled. This address must be ULONGLONG-aligned.
Length [in]Number of bytes to fill. This value must be a multiple of sizeof(ULONGLONG). (Note: SIZE_T is defined in basetsd.h.)
Pattern [in]ULONGLONG value with which to fill the range starting at Destination and extending for Length bytes.
If the range of memory starting at Destination is nonpaged, the caller can be running at any IRQL. Otherwise, callers of RtlFillMemoryUlonglong must be running at IRQL < DISPATCH_LEVEL.
For more information about managing buffered data and initializing driver-allocated buffers, see Buffered Data and Buffer Initialization.
For AMD64 systems, this routine is a macro. For non-AMD64 systems, this routine is contained in Ntoskrnl.lib.