#ifndef _NTRTL_H
// rev
/**
* RtlIoDecodeMemIoResource contract.
*
* \param ResourceDescriptor Read-only resource-requirement descriptor.
* \param Alignment Optional output for decoded alignment.
* \param MinimumAddress Optional output for the minimum address.
* \param MaximumAddress Optional output for the maximum address.
* \remarks Returns decoded length; optional outputs are Alignment, MinimumAddress and MaximumAddress, in that order. It does not return a translated address or an output length in the fourth argument. The input is a read-only IO_RESOURCE_DESCRIPTOR.
*/
NTSYSAPI
ULONGLONG
NTAPI
RtlIoDecodeMemIoResource(
_In_ const IO_RESOURCE_DESCRIPTOR *ResourceDescriptor,
_Out_opt_ PULONGLONG Alignment,
_Out_opt_ PULONGLONG MinimumAddress,
_Out_opt_ PULONGLONG MaximumAddress
);
View code on GitHub// wdm.h
NTSYSAPI ULONGLONG RtlIoDecodeMemIoResource(
[in] PIO_RESOURCE_DESCRIPTOR Descriptor,
[out, optional] PULONGLONG Alignment,
[out, optional] PULONGLONG MinimumAddress,
[out, optional] PULONGLONG MaximumAddress
);
View the official Windows Driver Kit DDI referenceNo description available.
The RtlIoDecodeMemIoResource routine provides the address information that is contained in an IO_RESOURCE_DESCRIPTOR structure that describes a range of memory or I/O port addresses.
Descriptor [in]A pointer to the IO_RESOURCE_DESCRIPTOR structure to provide the address information for.
Alignment [out, optional]A pointer to a variable that receives the alignment, in bytes, of the address range. This parameter can be NULL.
MinimumAddress [out, optional]A pointer to a variable that receives the minimum address of the address range. This parameter can be NULL.
MaximumAddress [out, optional]A pointer to a variable that receives the maximum address of the address range. This parameter can be NULL.
RtlIoDecodeMemIoResource returns the length of the address range, in bytes.
The Type member of the IO_RESOURCE_DESCRIPTOR structure must be CmResourceTypeMemory, CmResourceTypeMemoryLarge, or CmResourceTypePort.