In Windows, it's possible to send and receive data to a keyboard or mouse using feature reports.
The trick is to open the device as ACCESS_TYPE_NONE otherwise it will fail as it's locked and owned by windows.
handle = CreateFile(deviceDetails->DevicePath, ACCESS_TYPE_NONE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, openFlag, NULL);
The trick is to open the device as ACCESS_TYPE_NONE otherwise it will fail as it's locked and owned by windows.
handle = CreateFile(deviceDetails->DevicePath, ACCESS_TYPE_NONE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, openFlag, NULL);