WdfUsbTargetPipeSetNoMaximumPacketSizeCheck function (wdfusb.h)
[Applies to KMDF and UMDF]
The WdfUsbTargetPipeSetNoMaximumPacketSizeCheck method disables the framework's test of whether the size of a driver's read buffer is a multiple of a USB pipe's maximum packet size.
Syntax
void WdfUsbTargetPipeSetNoMaximumPacketSizeCheck(
[in] WDFUSBPIPE Pipe
);
Parameters
[in] Pipe
A handle to a framework pipe object that was obtained by calling WdfUsbInterfaceGetConfiguredPipe.
Return value
None
Remarks
A bug check occurs if the driver supplies an invalid object handle.
To avoid receiving extra data from unexpected bus activity, which is sometimes called babble, drivers usually specify read buffers that are a multiple of the pipe's maximum packet size. (Drivers receive a USB pipe's maximum packet size in a WDF_USB_PIPE_INFORMATION structure.) By default, the framework reports an error if a driver specifies a read buffer that is not a multiple of the pipe's maximum packet size. If the driver calls WdfUsbTargetPipeSetNoMaximumPacketSizeCheck, the framework does not report an error if a read buffer is not a multiple of the maximum packet size.
For more information about the WdfUsbTargetPipeSetNoMaximumPacketSizeCheck method and USB I/O targets, see USB I/O Targets.
Examples
The following code example disables the framework's test of whether the size of a buffer is a multiple of a USB pipe's maximum packet size.
WdfUsbTargetPipeSetNoMaximumPacketSizeCheck(pipe);
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Minimum KMDF version | 1.0 |
Minimum UMDF version | 2.0 |
Header | wdfusb.h (include Wdfusb.h) |
Library | Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF) |
IRQL | <=DISPATCH_LEVEL |
DDI compliance rules | DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf), UsbKmdfIrql(kmdf), UsbKmdfIrql2(kmdf), UsbKmdfIrqlExplicit(kmdf) |