To use your device as USB HID, you need a usb library with HID class implementation, you can enumerate this device on PC side using libusb and scan the device periodically.
But to communicate with your microcontroller you can use vendor class library running on microcontroller and libusb on PC. Here your device will act as usb device and pc as host depending upon interface in between usb connector and microcontroller usb pins.
Now, upon connecting usb device with PC, enumeration process will start and pc will collect device information along with VID and PID. Now you can start sending 0 to 9 as bulk transfer of 10 bytes, you can create a buffer on microcontroller side to collect these bytes. You can send byte by byte but that would be taking longer period.