// Device context structure typedef struct _DEVICE_CONTEXT WDFUSBDEVICE UsbDevice; WDFUSBINTERFACE UsbInterface; WDFUSBPIPE BulkReadPipe; WDFUSBPIPE BulkWritePipe; WDFUSBPIPE InterruptPipe; ULONG VendorID; ULONG ProductID; DEVICE_CONTEXT, *PDEVICE_CONTEXT;
// Set zoom to 50 ULONG zoomValue = 50; DWORD bytesReturned; if (DeviceIoControl(hCamera, IOCTL_CAMERA_SET_ZOOM, &zoomValue, sizeof(zoomValue), NULL, 0, &bytesReturned, NULL)) printf("Zoom set to %d\n", zoomValue); eagle eye mini camera driver windows 10
[EagleEyeMini_Device.NT.Services] Include=ks.inf, kscaptur.inf Needs=KS.Services, KSCAPTUR.Services NULL)) printf("Zoom set to %d\n"
[Manufacturer] %ManufacturerName%=Standard,NTamd64 NTamd64 return STATUS_SUCCESS
return STATUS_SUCCESS; VOID EagleEyeEvtIoDeviceControl( _In_ WDFQUEUE Queue, _In_ WDFREQUEST Request, _In_ size_t OutputBufferLength, _In_ size_t InputBufferLength, _In_ ULONG IoControlCode )
// Get pipes for (i = 0; i < WdfUsbInterfaceGetNumPipes(deviceContext->UsbInterface); i++) WDF_USB_PIPE_INFO pipeInfo; WDF_USB_PIPE_INFO_INIT(&pipeInfo); status = WdfUsbInterfaceGetConfiguredPipe(deviceContext->UsbInterface, i, &pipeInfo); if (NT_SUCCESS(status)) // Check pipe type if (WdfUsbPipeTypeBulk == pipeInfo.PipeType) USBD_PIPE_INFORMATION pipeInfoUsb; WdfUsbTargetPipeGetInformation(pipeInfo.Pipe, &pipeInfoUsb); if (pipeInfoUsb.EndpointAddress & USB_ENDPOINT_DIRECTION_IN) deviceContext->BulkReadPipe = pipeInfo.Pipe; KdPrint(("Bulk IN pipe found\n")); else deviceContext->BulkWritePipe = pipeInfo.Pipe; KdPrint(("Bulk OUT pipe found\n")); else if (WdfUsbPipeTypeInterrupt == pipeInfo.PipeType) deviceContext->InterruptPipe = pipeInfo.Pipe; KdPrint(("Interrupt pipe found\n"));