WdfCommonBufferGetLength function (wdfcommonbuffer.h)
[Applies to KMDF only]
The WdfCommonBufferGetLength method returns the length of a specified common buffer.
Syntax
size_t WdfCommonBufferGetLength(
[in] WDFCOMMONBUFFER CommonBuffer
);
Parameters
[in] CommonBuffer
A handle to a common buffer object that the driver obtained by a previous call to WdfCommonBufferCreate.
Return value
WdfCommonBufferGetLength returns the length, in bytes, of the buffer that is associated with the common buffer that the CommonBuffer parameter specifies.
A bug check occurs if the driver supplies an invalid object handle.
Remarks
For more information about common buffers, see Using Common Buffers
Examples
The following code example obtains the length of a specified common buffer.
size_t bufferLength;
bufferLength = WdfCommonBufferGetLength(DevExt->CommonBuffer);
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Minimum KMDF version | 1.0 |
Header | wdfcommonbuffer.h (include WdfCommonBuffer.h) |
Library | Wdf01000.sys (see Framework Library Versioning.) |
IRQL | <= DISPATCH_LEVEL |
DDI compliance rules | DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf) |