以下是一个使用Windows HID API模拟键盘输入0-10的C++代码例子:
```c++
#include 
int main()
{
    // 打开第一个键盘设备
    HANDLE hDevice = CreateFile(L"\\\\.\\KeyboardClass0", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
    if (hDevice == INVALID_HANDLE_VALUE)
    {
        printf("无法打开键盘设备\n");
        return 1;
    }
    // 发送按键消息
    for (int i = 0; i <= 10; i++)
    {
        INPUT input[2] = { 0 };
        input[0].type = INPUT_KEYBOARD;
        input[0].ki.wVk = VK_NUMPAD0 + i;
        input[1].type = INPUT_KEYBOARD;
        input[1].ki.wVk = VK_NUMPAD0 + i;
        input[1].ki.dwFlags = KEYEVENTF_KEYUP;
        SendInput(2, input, sizeof(INPUT));
        Sleep(1000); // 等待1秒钟
    }
    // 关闭键盘设备
    CloseHandle(hDevice);
    return 0;
}
```
这个程序会依次发送0-10的数字键盘按键消息,每个按键之间间隔1秒钟。需要注意的是,这个程序需要以管理员权限运行才能正常工作。