#ifndef _NTRTL_H
/**
* The RtlIoDecodeMemIoResource routine decodes a memory or I/O resource descriptor into its address and length components.
*
* \param ResourceDescriptor The partial resource descriptor to decode.
* \param TranslatedAddress An optional pointer that receives the translated address.
* \param StartAddress An optional pointer that receives the start address.
* \param Length An optional pointer that receives the resource length.
* \return The decoded resource length.
*/
// rev
NTSYSAPI
ULONGLONG
NTAPI
RtlIoDecodeMemIoResource(
_In_ PVOID ResourceDescriptor,
_Out_opt_ PULONGLONG TranslatedAddress,
_Out_opt_ PULONGLONG StartAddress,
_Out_opt_ PULONGLONG Length
);
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.