READ_REGISTER_BUFFER_USHORT function (wdm.h)

The READ_REGISTER_BUFFER_USHORT routine dereferences the supplied pointer, inserts a memory barrier, and reads a set of USHORT values from the specified register address into a buffer.

Syntax

void READ_REGISTER_BUFFER_USHORT(
  [in]  volatile USHORT *Register,
  [out] PUSHORT         Buffer,
  [in]  ULONG           Count
);

Parameters

[in] Register

Pointer to the register, which must be a mapped range in memory space.

[out] Buffer

Pointer to a buffer into which an array of USHORT values is read.

[in] Count

Specifies the number of USHORT values to be read into the buffer.

Return value

None

Remarks

This routine inserts a memory barrier into your code. This barrier guarantees that every operation that appears in the source code before the call to this routine will complete before any operation that appears after the call.

For more info about memory barriers, see KeMemoryBarrier.

The size of the buffer must be large enough to contain at least the specified number of USHORT values.

Callers of READ_REGISTER_BUFFER_USHORT can be running at any IRQL, assuming the Buffer is resident and the Register is resident, mapped device memory.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 2000.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h, Miniport.h, Wudfwdm.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL Any level (see Remarks section)