get product and vendor from a device

What is the correct way to get vendor and product from a device. I looked at WdfDeviceAllocAndQueryPropertyEx but couldnt find it.
I work on an Upperfilter keyboard driver.

WdfDeviceQueryProperty For the Hardware ID.


If I look on different devices the VID/PID is always 4 hex digit long and I also read about this in the msdn but I have here an old bluetooth keyboard which is different. The vid/pid has 5 hex digit. How should we handle this? What is the standard?

The standard varies by bus. I suggest you write some bus-specific parsing code.