wdf

Compiling an application that uses WinUsb

I am in the process of writing an application to communicate with Usb devices using WinUsb.dll. This is a user-mode library that allows communication with a device through winusb.sys installed as its driver in the kernel. I am writing this application in C++ with Visual Studio 2008. The header WinUsb.h is found in the Windows DDK so I ...

Sending IOCTL from IRQL=DISPATCH_LEVEL (KbFilter/KMDF)

I am using the KbFilter example in the WDK, trying to send an IOCTL in a function that is called by KbFilter_ServiceCallback and therefore is executed at DISPATCH_LEVEL. The function just has to send an IOCTL and return, am not waiting for an output buffer to be filled so it can be asynchronous, fire and forget. I am currently using the...

Two Spinlocks on same processor ?

Can two CPUs hold two "different" spin locks simultaneously at same time? So...does this mean: a sigle(uniprocessor) CPU cannot hold two "different" spinlocks at the same time? So...does this mean: the number of spinlocks on a single CPU cannot be > 1. PS:"different" implying spinlock associated with different memory resources. Doe...

WDF EvtIoDeviceControl buffer lengths

When handling DeviceIoControl requests in a WDF driver what is the correct way to get the size of the input/output buffer. It seems to be both passed as a parameter: VOID EvtIoDeviceControl(IN WDFQUEUE Queue, IN WDFREQUEST Request, IN size_t OutputBufferLength, IN size_t InputBufferLength, ...