USBCAMD_ControlVendorCommand function (usbcamdi.h)
The USBCAMD_ControlVendorCommand function sends vendor-specific commands to the control pipe.
Syntax
NTSTATUS USBCAMD_ControlVendorCommand(
[in] PVOID DeviceContext,
[in] UCHAR Request,
[in] USHORT Value,
[in] USHORT Index,
[in, out, optional] PVOID Buffer,
[in, out] PULONG BufferLength,
[in] BOOLEAN GetData,
[in, optional] PCOMMAND_COMPLETE_FUNCTION CommandComplete,
[in, optional] PVOID CommandContext
);
Parameters
[in] DeviceContext
Pointer to device-specific context.
[in] Request
Specifies the value of the Request field for the vendor command.
[in] Value
Specifies the value of the Value field for the vendor command.
[in] Index
Specifies the value of the Index field for the vendor command.
[in, out, optional] Buffer
Pointer to a data buffer if the command has data. If the command does not have any data, this value is NULL.
[in, out] BufferLength
Pointer to the buffer length value. Buffer length is expressed in bytes. If the value of Buffer is NULL, BufferLength may also be NULL.
[in] GetData
GetData indicates data was sent from the device to the host.
[in, optional] CommandComplete
Pointer to a camera minidriver defined CommandCompleteFunction, which is called when the bulk read or write is completed. This value can be NULL.
[in, optional] CommandContext
Pointer to a block of memory, that is passed as an argument to the camera minidriver defined CommandCompleteFunction.
Return value
USBCAMD_ControlVendorCommand returns the NTSTATUS code from vendor command.
Other possible error codes include:
Return code | Description |
---|---|
STATUS_PENDING | The vendor command is deferred. |
STATUS_INSUFFICIENT_RESOURCES | There are insufficient resources to allocate the vendor command. |
Remarks
This function may be called at IRQL >= PASSIVE_LEVEL. If the function is called at IRQL > PASSIVE_LEVEL, the command is deferred. After completion, the camera minidriver defined CommandCompleteFunction is called and passed the value in the CommandContext argument*.*
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | usbcamdi.h (include Usbcamdi.h) |
Library | Usbcamd2.lib |
IRQL | Greater than or equal to PASSIVE_LEVEL (See Remarks section) |