WdfDeviceGetHardwareRegisterMappedAddress function

[Applies to UMDF only]

A driver calls WdfDeviceGetHardwareRegisterMappedAddress to get the user-mode mapped address of the memory resource it mapped previously using WdfDeviceMapIoSpace.

Syntax

PVOID WdfDeviceGetHardwareRegisterMappedAddress(
  WDFDEVICE Device,
  PVOID     PseudoBaseAddress
);

Parameters

Device

A handle to a framework device object.

PseudoBaseAddress

The address of a location that receives a pointer to the pseudo base address.

Return Value

User-mode base address of the resources mapped earlier using WdfDeviceMapIoSpace.

Remarks

This function is the UMDF version 2 equivalent of IWDFDevice3::GetHardwareRegisterMappedAddress.

After the driver calls WdfDeviceGetHardwareRegisterMappedAddress, it can access the user-mode address directly to read and write to the register.

Note  This is not the recommended approach for accessing registers because it prevents UMDF from doing any validation on the access.
 

If you do use WdfDeviceGetHardwareRegisterMappedAddress, you must set the UmdfRegisterAccessMode INF directive to RegisterAccessUsingUserModeMapping. For more information about UMDF INF directives, see Specifying WDF Directives in INF Files.

Requirements

   
Minimum supported client Windows 8.1
Target Platform Universal
Minimum UMDF version 2.0
Header wdfdevice.h (include Wdf.h)
Library WUDFx02000.lib
DLL WUDFx02000.dll
IRQL PASSIVE_LEVEL

See Also

IWDFDevice3::GetHardwareRegisterMappedAddress

WdfDeviceMapIoSpace