WDF_MEMORY_DESCRIPTOR_INIT_BUFFER function
[Applies to KMDF and UMDF]
The WDF_MEMORY_DESCRIPTOR_INIT_BUFFER function initializes a WDF_MEMORY_DESCRIPTOR structure so that it describes a specified buffer.
Syntax
VOID WDF_MEMORY_DESCRIPTOR_INIT_BUFFER( _Out_ PWDF_MEMORY_DESCRIPTOR Descriptor, _In_ PVOID Buffer, _In_ ULONG BufferLength );
Parameters
- Descriptor [out]
-
A pointer to a WDF_MEMORY_DESCRIPTOR structure.
- Buffer [in]
-
A pointer to a memory buffer.
- BufferLength [in]
-
The size, in bytes, of the memory buffer that Buffer points to.
Return value
None
Remarks
The WDF_MEMORY_DESCRIPTOR_INIT_BUFFER function zeros the specified WDF_MEMORY_DESCRIPTOR structure and sets the structure's Type member to WdfMemoryDescriptorTypeBuffer. Then it sets the structure's u.BufferType.Buffer and u.BufferType.Length members to the values that the Buffer and BufferLength parameters specify, respectively.
Examples
For a code example that uses WDF_MEMORY_DESCRIPTOR_INIT_BUFFER, see WdfIoTargetSendIoctlSynchronously.
Requirements
Minimum KMDF version | 1.0 |
---|---|
Minimum UMDF version | 2.0 |
Header |
|
DDI compliance rules | BufAfterReqCompletedIntIoctlA, BufAfterReqCompletedIoctlA, BufAfterReqCompletedReadA, BufAfterReqCompletedWriteA |
See also