GetRawInputDeviceInfo()를 통해서 받아오니..
이름이 내가 기대했던 device description이 아니라.. 식별자에 가까운 녀석이 나온다 -_-a
nResult = GetRawInputDeviceInfo(pRawInputDeviceList[i].hDevice, // Device RIDI_DEVICENAME, // Get Device Name wcDeviceName, // Get Name! &nBufferSize); str.Format(_T("%s"),wcDeviceName); \\?\HID#VID_060B&PID_6220&MI_00#7&3275dfb8&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd} |
[링크 : https://stackoverflow.com/questions/36453082/c-winapi-get-list-of-all-connected-usb-devices]
[링크 : https://oroboro.com/usb-serial-number/]
[링크 : https://msdn.microsoft.com/ko-kr/library/windows/desktop/ms645597(v=vs.85).aspx]
[링크 : https://msdn.microsoft.com/ko-kr/library/windows/desktop/ms645598(v=vs.85).aspx]
+
2017.11.05
내가 원하는 항목이 bus reported device description 인 듯?
[링크 : http://searchingforbit.blogspot.com/2014/05/winusb-communication-with-stm32-round-2.html]
if (SetupDiGetDeviceRegistryProperty (hDevInfo, &DeviceInfoData, SPDRP_DEVICEDESC, &dwPropertyRegDataType, (BYTE*)szDesc, sizeof(szDesc), // The size, in bytes &dwSize)) _tprintf (TEXT(" Device Description: \"%s\"\n"), szDesc); if (fn_SetupDiGetDevicePropertyW (hDevInfo, &DeviceInfoData, &DEVPKEY_Device_BusReportedDeviceDesc, &ulPropertyType, (BYTE*)szBuffer, sizeof(szBuffer), &dwSize, 0)) _tprintf (TEXT(" Bus Reported Device Description: \"%ls\"\n"), szBuffer); |
[링크 : https://stackoverflow.com/questions/3438366/setupdigetdeviceproperty-usage-example]
SetupDiGetDeviceProperty function
[링크 : https://msdn.microsoft.com/en-us/library/windows/hardware/ff551963(v=vs.85).aspx]
SetupDiGetDeviceRegistryProperty function
[링크 : https://msdn.microsoft.com/en-us/library/windows/hardware/ff551967(v=vs.85).aspx]
'Programming > C Win32 MFC' 카테고리의 다른 글
cedit ctrl-a 단축키 사용하기 (0) | 2017.11.08 |
---|---|
mfc sleep 주의 (0) | 2017.11.08 |
CEdit 내용 지우기와 메모리 사용량 (0) | 2017.10.26 |
CEdit 길이 제한 (0) | 2017.10.26 |
MFC USB 시리얼 제거 탐지하기 OnDeviceChange() (0) | 2017.10.25 |