| Moteur de recherche de fiches techniques de composants électroniques |
|
AN197 Fiches technique(PDF) 8 Page - Silicon Laboratories |
|
|
|||||||||||||||||||||||||||||
AN197 Fiches technique(HTML) 8 Page - Silicon Laboratories |
|
8 / 14 page ![]() AN197 8 Rev. 0.6 portString[0] = '0'; portString[1] = '0'; portString[2] = '0'; portNum = atoi(portString); } //Make sure to close all open keys for cleanup RegCloseKey(tmpPortKey); } else { portKeyString.Format("Vid_%04x&Pid_%04x\\%s\\Device Parameters\\", vid, pid, ser); //If the portkey string is in the registry, then go ahead and open the portname if (ERROR_SUCCESS == RegOpenKeyEx(tmpSubKey, portKeyString, 0, KEY_READ, &tmpPortKey)) { if (ERROR_SUCCESS == RegQueryValueEx(tmpPortKey, "PortName", NULL, &valtype, (unsigned char *)portString, &length)) { // When we obtain this key, it will be in string format of // "COMXX" where XX is the port. Simply make the first three // elements of the string 0, and call the atoi function to obtain // the number of the port. portString[0] = '0'; portString[1] = '0'; portString[2] = '0'; portNum = atoi(portString); } //Make sure to close all open keys for cleanup RegCloseKey(tmpPortKey); } } RegCloseKey(tmpSubKey); } RegCloseKey(tmpKey); } RegCloseKey(HKEY_LOCAL_MACHINE); delete portString; // Return the number of the port the device is connected too return portNum; } |
|
|
Lien URL |
| ALLDATASHEET vous a-t-il été utile ? [ DONATE ] |
À propos de Alldatasheet | Publicité | Contactez-nous | Politique de confidentialité | Lien vers la fiche technique | Echange de liens | Fabricants 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 |