//to get IMEI number. #include <HsExt.h> #include <HsPhone.h> //IMEI details static CharPtr GetIMEI(CharPtr manufacturer,CharPtr model, CharPtr version); static int LoadPhoneLibrary(); static int UnLoadPhoneLibrary();
LoadPhoneLibrary(); if (PhnLibModulePowered (PhoneLibRefNum)==true) { StrCopy(g_strIMEI, GetIMEI(NULL,NULL,NULL)); } UnLoadPhoneLibrary();*/ /* * FUNCTION: GetIMEI * * DESCRIPTION: Return the Name of The operator like Airtel/ Hutch of the SIM * * PARAMETERS: None * * RETURNED: * String having operator name or NULl if there is some problem */ static CharPtr GetIMEI(CharPtr manufacturer,CharPtr model, CharPtr version) { Err err; Boolean radioPowered = PhnLibModulePowered (PhoneLibRefNum); CharPtr imei = NULL; if (radioPowered) { err = PhnLibCardInfo(PhoneLibRefNum,&manufacturer,&model,&version,&imei); } else return NULL; return imei; } /* * FUNCTION: LoadPhoneLibrary * * DESCRIPTION: Return the version number of the PalmTM operating system * * PARAMETERS: None * * RETURNED: * Returns 0 if no err comes lese err number */ static int LoadPhoneLibrary() { UInt32 phnType; Char* phoneLibraryName; UInt32 phoneLibraryDbCreator; Err err; //Find out what type of device we run on HsAttrGet (hsAttrPhoneType, 0, &phnType); if (phnType == hsAttrPhoneTypeCDMA) { phoneLibraryName = phnLibCDMAName; phoneLibraryDbCreator = phnLibCDMADbCreator; } else // default is GSM { phoneLibraryName = phnLibGSMName; phoneLibraryDbCreator = phnLibGSMDbCreator; } // Load the Phone Library err = SysLibFind (phoneLibraryName, &PhoneLibRefNum); if (err) {//Should never be getting here,but might as well try&load err = SysLibLoad (phnLibDbType, phoneLibraryDbCreator,&PhoneLibRefNum); if (err) { FrmCustomAlert(DebugAlert,"Unable To load The Phone Library","",""); return (err); } } // Open the phone library now. err = PhnLibOpen (PhoneLibRefNum); if (err) { FrmCustomAlert(DebugAlert,"Unable To OPEN Phone Library","",""); return (err); } return 0; } static int UnLoadPhoneLibrary() { Err err = PhnLibClose(PhoneLibRefNum); //call this api to avoid soft reset. err = SysLibRemove(PhoneLibRefNum); if(err == 0) PhoneLibRefNum = 0; return err; } -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Scott Erickson Sent: Wednesday, May 11, 2005 11:31 PM To: Palm Developer Forum Subject: Re: IMEI Thanks for the link, thats what i was looking for. -- Scott Erickson Software Development Team, FB-4, Inc. [EMAIL PROTECTED] "Regis St-Gelais" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Scott Erickson" <[EMAIL PROTECTED]> a écrit dans le message de news: > [EMAIL PROTECTED] >> Is there a way to retive device identification numbers such as IMEI, IMSI >> or device SN number of a device? >> > > > Have a look there: http://hazelware.luggle.com/archive.html?2005.2 > > In the section: Hardware Identification on the PalmOS > > -- > Regis St-Gelais > www.laubrass.com > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/