The RtlRetrieveUlong routine retrieves a ULONG value from the source address, avoiding alignment faults. The destination address is assumed to be aligned.
VOID
RtlRetrieveUlong(
IN OUT PULONG DestinationAddress,
IN PULONG SourceAddress
);
None
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
Callers of RtlRetrieveUlong can be running at any IRQL if the given addresses are in nonpaged pool. Otherwise, the caller must be running at IRQL < DISPATCH_LEVEL.