View Full Version : Unique name and serial number
BBenj
July 20, 2011, 12:21:35
Hi,
I'm using the C++ Wrapper, and the serial number from IC_GetSerialNumber don't match with the serial number in the unique name (for the same camera, of course)
From IG_GetSerialNumber: 554762870
Serial number in the 'unique name': 21110276 (from 'DFx 72BUC02 21110276')
It must be the same, no ?
How I can do to convert it ?
Thanks !
Benj
Stefan Geissler
July 20, 2011, 13:02:55
Hi,
Before I start checking on my own: do you pass a char* to IC_GetSerialNumber()?
char Serial[10];
strcpy( Serial,"");
IC_GetSerialNumber(hGrabber,Serial);
printf("Serial is : %s",Serial);
BBenj
July 20, 2011, 13:13:30
Hi,
Yes, I pass a char* as in your code.
Thanks.
BBenj
July 20, 2011, 14:20:00
Hi,
I answered, but my message isn't here... :confused:
Yes I pass a char* as in your code, and the same string is always returned.
Thanks.
Stefan Geissler
July 21, 2011, 10:13:07
Hi,
your answer is here. However, I found the solution:
char szSerialNumber[20];
int TempSerial;
IC_GetSerialNumber(hGrabber, szSerialNumber);
TempSerial = atoi( szSerialNumber);
sprintf(szSerialNumber,"%08X",TempSerial);
printf("Serial is : %s",szSerialNumber);
For some reason the serial number is returned as decimal and must be converted.
BBenj
July 21, 2011, 12:15:07
Hi,
Great, it works fine !
Thanks very much!
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.