You can control vibration by sending HID page stuff back to joystick.
I have PS4 controller, and I just now tried running example code from here
http://stackoverflow.com/a/27437973 (yes SO) and it works fine. I can control vibration intensity just fine. It gets HID device ID from Raw Input API and then simply writes raw byte buffer with WriteFile to this device. I can even control light color :)
Of course, this means that to support vibration for specific joystick you'll need to correctly prepare HID buffer to send.
Not sure how documented that is. It's possible to find some information on Internet about it, but that is not very official. Most useful one is from Linux drivers people have written:
PS4:
https://github.com/chrippa/ds4drv/blob/master/ds4drv/device.py#L117
PS3:
https://github.com/ros-drivers/jo...s3joy/scripts/ps3joy_node.py#L274
Xbox controllers:
https://github.com/Grumbel/xboxdr...roller/xbox360_controller.cpp#L93
https://github.com/Grumbel/xboxdr...ox360_wireless_controller.cpp#L57
https://github.com/Grumbel/xboxdr...ontroller/xbox_controller.cpp#L50
It could be that you can get some information about output features device supports automatically using HID API (
HidP_GetCaps & friends) - this is what that Raw Input API sample from CodeProject in my previous post uses. And then you won't need to hardcode HID buffers. I guess
HidP_SetUsageValue function is meant for that. But I'm not an expert on HID, I'm not sure how to use it.