{ HIDD_ATTRIBUTES Attributes; HidD_GetAttributes(hDeviceHandle,&Attributes); //将有关该设备的标识显示出来 _tprintf("供应商ID\t:0X%04X\n",Attributes.VendorID); _tprintf("产品ID\t:0X%04X\n",Attributes.ProductID); _tprintf("产品版本号:0X%04X\n",Attributes.VersionNumber); WCHAR mString[256]; TCHAR Buffer[256]; HidD_GetManufacturerString(hDeviceHandle,mString,sizeof(mString)); if (wcstombs(Buffer,mString,256) == -1) // fail Buffer[0] = NULL; _tprintf("生产商:\t%s\n",Buffer); HidD_GetProductString(hDeviceHandle,mString,sizeof(mString)); if (wcstombs(Buffer,mString,256) == -1) Buffer[0] = NULL; _tprintf("产品名称:\t%s\n",Buffer); // 通信: PHIDP_PREPARSED_DATA pHidpPreparsedData; HIDP_CAPS hidPCaps; if (!HidD_GetPreparsedData(hDeviceHandle,&pHidpPreparsedData)) { _tprintf("获取 HID PREPARED DATA 失败!\n"); return; |
正在阅读:VC学习:获取游戏手柄的按键输入VC学习:获取游戏手柄的按键输入
2004-03-05 14:49
出处:CSDN
责任编辑:linjixiong
键盘也能翻页,试试“← →”键