Renamed DEVICE_TYPE to TARGET_DEVICE_TYPE

Avoids a definition conflict with winioctl.h on Windows