The DIDFT_MAKEINSTANCE macro creates an instance identifier of a device object for packing in the dwType member of the DIOBJECTDATAFORMAT structure.
#define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
DIDFT_GETINSTANCE