| Electronic Components Datasheet Search |
|
AN2328 Datasheet(PDF) 3 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2328 Datasheet(HTML) 3 Page - STMicroelectronics |
|
3 / 7 page ![]() AN2328 Coding example 3/7 return 0; } //Identify each HID interface devInfoData.cbSize = sizeof(devInfoData); DWORD MemberIndex = 0; bool Result; while (1) { try { Result = SetupDiEnumDeviceInterfaces (hDevInfo,0,&HidGuid,MemberIndex,&devInfoData); if (!Result) { SetupDiDestroyDeviceInfoList(hDevInfo); return (0); //No more devices found } MemberIndex++; } catch (...) { return 0; } //Get the Pathname of the current device //detailData.cbSize = sizeof(SP_INTERFACE_DEVICE_DETAIL_DATA); detailData.cbSize = 5; DWORD Reguired = 0; try { Result = SetupDiGetDeviceInterfaceDetail (hDevInfo,&devInfoData,&detailData,256,&Reguired,NULL); if (!Result) continue; } catch (...) { continue; } //Get Handle for the current device try { DeviceHandle = CreateFile (detailData.DevicePath, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, (LPSECURITY_ATTRIBUTES)NULL, OPEN_EXISTING, 0, NULL); if (DeviceHandle == INVALID_HANDLE_VALUE) { CloseHandle(DeviceHandle); continue; } } catch (...) { continue; } |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |