| Electronic Components Datasheet Search |
|
AN2328 Datasheet(PDF) 4 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2328 Datasheet(HTML) 4 Page - STMicroelectronics |
|
4 / 7 page ![]() Coding example AN2328 4/7 //Read Attributes from the current device HIDD_ATTRIBUTES Attributes; Attributes.Size = sizeof(Attributes); try { Result = HidD_GetAttributes (DeviceHandle,&Attributes); if (!Result) { CloseHandle(DeviceHandle); continue; } } catch (...) { continue; } // All information obtained // Attributes.VendorID // Attributes.ProductID // detailData.DevicePath <- Remember for future use // easy example can be: if ((Attributes.VendorID == YOUR_VENDOR_ID) && (Attributes.ProductID == YOUR_PRODUCT_ID)) strcpy(your_devicePath, detailData.DevicePath); } //end of while 1.3 Open device ReadHandle = CreateFile (your_devicePath, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, (LPSECURITY_ATTRIBUTES)NULL, OPEN_EXISTING, 0, NULL); 1.4 Read device DWORD BytesRead = 0; char Report[INPUT_REPORT_SIZE]; bool Result; memset(&Report, 0, INPUT_REPORT_SIZE); Result = ReadFile (ReadHandle,Report,sizeof(Report),&BytesRead,NULL); |
|
|
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 |