Bewerken

Delen via


WDF_COMMON_BUFFER_CONFIG structure (wdfcommonbuffer.h)

[Applies to KMDF only]

The WDF_COMMON_BUFFER_CONFIG structure contains configuration information for a common buffer.

Syntax

typedef struct _WDF_COMMON_BUFFER_CONFIG {
  ULONG Size;
  ULONG AlignmentRequirement;
} WDF_COMMON_BUFFER_CONFIG, *PWDF_COMMON_BUFFER_CONFIG;

Members

Size

The size, in bytes, of this structure.

AlignmentRequirement

The alignment requirement for a common buffer. This value must be one less than the alignment boundary. For example, you can specify 15 for a 16-byte alignment boundary and 31 for a 32-byte alignment boundary. You can also use one of the FILE_Xxxx_ALIGNMENT constants that are defined in Wdm.h.

Remarks

The WDF_COMMON_BUFFER_CONFIG structure is used as input to the WdfCommonBufferCreateWithConfig method.

If your driver specifies an alignment requirement that is greater that the computer's page size (PAGE_SIZE), the logical addresses that the WdfCommonBufferGetAlignedLogicalAddress method returns are always aligned to the specified alignment requirement, but the virtual addresses that the WdfCommonBufferGetAlignedVirtualAddress method returns might not be aligned to the alignment requirement.

If your driver specifies an alignment requirement that is less than the computer's page size, all logical and virtual addresses are aligned to the specified alignment requirement.

For more information about specifying alignment requirements, see Enabling DMA Transactions and Using Common Buffers.

Requirements

Requirement Value
Minimum KMDF version 1.0
Header wdfcommonbuffer.h (include WdfCommonBuffer.h)

See also

WdfCommonBufferCreateWithConfig

WdfCommonBufferGetAlignedLogicalAddress

WdfCommonBufferGetAlignedVirtualAddress