hi all,
please help me out on this one..its really urgent.
i am trying to retrieve name and phone number of contacts from address book. 
but PhnLibCount gives count as 0.

this is my code:
/*********code snippet***********************/
UInt16 LibRef;
PhnAddressList list;
PhnAddressHandle addressH;
unsigned short cnt;

err = PhnLibGetOwnNumbers (LibRef,&list); 
if (err==0)
{
    err=PhnLibCount(smsLibRef, list, &cnt);                             
//returns n=0..though there r entries in addr book
      if(err==0 && cnt>0)
      {
//it is a GSM phone..i've written that part
//before this snippet
            err = PhnLibGetNth (LibRef, list, 1, adrH);                     if 
(err==0 && addressH!=0)
            {
             numberPtr = PhnLibGetField(smsLibRef, ddrH,                     
MemHandleFree(addressH);
            }
        }
}

kindly respond
regards,
sriram
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to