WDF_MEMORY_DESCRIPTOR structure
[Applies to KMDF and UMDF]
The WDF_MEMORY_DESCRIPTOR structure describes a memory buffer.
Syntax
typedef struct _WDF_MEMORY_DESCRIPTOR { WDF_MEMORY_DESCRIPTOR_TYPE Type; union { struct { PVOID Buffer; ULONG Length; } BufferType; struct { PMDL Mdl; ULONG BufferLength; } MdlType; struct { WDFMEMORY Memory; PWDFMEMORY_OFFSET Offsets; } HandleType; } u; } WDF_MEMORY_DESCRIPTOR, *PWDF_MEMORY_DESCRIPTOR;
Members
- Type
-
A WDF_MEMORY_DESCRIPTOR_TYPE-typed value that identifies the type of buffer description that this WDF_MEMORY_DESCRIPTOR structure contains.
- u
-
A union of three structures, one of which describes a buffer.
- BufferType
-
If the Type member is WdfMemoryDescriptorTypeBuffer, the members of the BufferType structure describe a buffer. This structure contains the following two members:
- Buffer
-
A pointer to a buffer.
- Length
-
The length, in bytes, of the buffer.
- MdlType
-
If the Type member is WdfMemoryDescriptorTypeMdl, the members of the MdlType structure describe a buffer. This structure contains the following two members:
- Mdl
-
A pointer to a memory descriptor list (MDL).
- BufferLength
-
The length, in bytes, of the buffer.
- HandleType
-
If the Type member is WdfMemoryDescriptorTypeHandle, the members of the HandleType structure describe a buffer. This structure contains the following two members:
- Memory
-
A handle to a framework memory object.
- Offsets
-
A pointer to a WDFMEMORY_OFFSET structure that describes a subsection of the buffer that is represented by the memory object.
Remarks
The WDF_MEMORY_DESCRIPTOR structure is used as input to several of the framework's I/O target object methods and USB device object methods.
To initialize a WDF_MEMORY_DESCRIPTOR structure, your driver should call WDF_MEMORY_DESCRIPTOR_INIT_BUFFER, or WDF_MEMORY_DESCRIPTOR_INIT_MDL, or WDF_MEMORY_DESCRIPTOR_INIT_HANDLE.
Requirements
Minimum KMDF version | 1.0 |
---|---|
Minimum UMDF version | 2.0 |
Header |
|
See also