Hi All
I am very new to driver dev so forgive me if this is a silly question
What I am doing is try to create a emulated usb camera on win10 based on the instructions below
https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/writing-a-ude-client-driver
I need to transfer video data to host through ISO transfer
I created the queue through the following code
WDF_IO_QUEUE_CONFIG_INIT(&queueConfig, WdfIoQueueDispatchSequential);
queueConfig.EvtIoInternalDeviceControl = IoEvtControlUrb;
status = WdfIoQueueCreate(Device,
&queueConfig,
WDF_NO_OBJECT_ATTRIBUTES,
&pIoContext->ControlQueue);
Then in the callback function I need to handle the URB
VOID
IoEvtControlUrb(
In
WDFQUEUE Queue,
In
WDFREQUEST Request,
In
size_t OutputBufferLength,
In
size_t InputBufferLength,
In
ULONG IoControlCode
)
{
…
}
Seems for ISO transfer I need to setup some structs (see below) which I believe need to access the URB(correct me if I am wrong)
struct iso_packet
{
unsigned int offset;
unsigned int length;
unsigned int status;
};
My question is how can I access the URB in my callback function above
Thanks in advance