FYI, this will only work if the phone is on.  

-Jon

-------------------------------------------
Jonathan Hays
Palm OS Certified Developer
http://hazelware.luggle.com 
-------------------------------------------


        Char*                           number = NULL;
        PhnAddressList          list;
        PhnAddressHandle        address;

        PhnLibOpen(phnLibRef);
        if (IsCDMA())
        {
                Err err = PhnLibGetOwnNumbers(phnLibRef, &list);
                if (!err)
                {
                        err = PhnLibAPGetNth(phnLibRef, list, 1, &address);
                                
                        if (!err && address)
                        {
                                number = 
PhnLibAPGetField(phnLibRef,address,phnAddrFldPhone);
                                MemHandleFree(address);
                        }
                }
        }
        else 
        {
                Err err = PhnLibGetOwnNumbers(phnLibRef, &list);
                if (!err)
                {
                        err = PhnLibGetNth(phnLibRef, list, 1, &address);
                        
                        if (!err && address)
                        {
                                number = 
PhnLibGetField(phnLibRef,address,phnAddrFldPhone);
                                MemHandleFree(address);
                        }
                }
        }
        if (number)
        {
                StrCopy(destNumber,number);
                MemPtrFree (number);
        }


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Keyur Patwa
Sent: Thursday, February 17, 2005 9:00 AM
To: Palm Developer Forum
Subject: get phone number for Treo600 CDMA


Hi guys,

I know this question was asked and answered here before.
But my login is not working so I could not access the forum messages.

Can any one help me with the API call to access the phone number for CDNA
Treo600 phone.

Actually, I am trying to access the ESN number using,
PhnLibCardInfo (refrnceNum,0,0,&version,&serial);

but as it is not working, as an alternative I am trying to grab the phone
number.

Please help,
Keyur




-- 
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/

Reply via email to