Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The StorPortAllocateMdl routine allocates an MDL to describe the given non-paged pool memory.
Syntax
ULONG StorPortAllocateMdl(
[in] PVOID HwDeviceExtension,
[in] PVOID BufferPointer,
[in] ULONG NumberOfBytes,
[out] PVOID *Mdl
);
Parameters
[in] HwDeviceExtension
A pointer to the hardware device extension for the host bus adapter (HBA).
[in] BufferPointer
A pointer to the base virtual address of the buffer that the MDL is to describe.
[in] NumberOfBytes
This parameter specifies the length, in bytes, of the buffer that the MDL is to describe.
[out] Mdl
A pointer to receive the allocated MDL.
Return value
StorPortAllocateMdl returns one of the following status codes:
Return code | Description |
---|---|
|
This function is not implemented on the active operating system. |
|
Indicates that the routine allocated the MDL successfully. |
|
The pointer to receive the MDL is NULL.
The pointer to the buffer is NULL. |
|
The call was made at an invalid IRQL. |
|
Unable to allocate MDL to describe the given buffer. |
Remarks
A miniport driver calls the StorPortAllocateMdl routine to allocate an MDL to describe a block of memory from the non-paged pool. To free the MDL, the miniport driver calls the StorPortFreeMdl routine.
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Header | storport.h (include Storport.h) |
IRQL | <=DISPATCH_LEVEL |
DDI compliance rules | StorPortIrql(storport) |