Oleg Ignatov wrote:
Michal Seliga could you please sent me example how to init phone library
for using PhnLibBoxInformation function. I resolved all possible trouble
with my provider and I believe that I initialize phone library incorrectly.
"Michal Seliga" <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote in message
news:[EMAIL PROTECTED]
<news:[EMAIL PROTECTED]>...
>i checked my project, i do exactly same thing and i am sure it works
at least on
> sprint treos - and it never worked on mine which is unlocked gsm. so
maybe your
> problem is also not in code but in provider
>
> Oleg Ignatov wrote:
>> Hello All,
>> I am trying to get the count of voice mails. Please advice me what
>> function must I use to retrieve it.
>> I tryed to do it by using following code:
>>
>> PhnMsgBoxDataType data;
>>
>> data.type = kBoxVoice;
>>
>> data.lineNumber = 1;
>>
>> err = PhnLibBoxInformation(m_TelRefNum, &data);
>>
>> But data.messageCount always is equal 0. What do I do incorrectly?
>>
>>
>> PS: I tested my application on Treo680
>>
>> Thanks.
>
> --
> For information on using the ACCESS Developer Forums, or to
unsubscribe, please see http://www.access-company.com/developers/forums/
this is what i use - but is exactly samething you posted in first message
static UInt16 phoneLibRef=0;
Err LoadPhoneLibrary(void)
{
Err err;
if(IsTreo())
{
err=HsGetPhoneLibrary(&phoneLibRef);
if(!err)
err=PhnLibOpen(phoneLibRef);
}
else
err=1;
if(err)
phoneLibRef=0;
return(err);
}
void ClosePhoneLibrary(void)
{
if(phoneLibRef)
{
PhnLibClose(phoneLibRef);
phoneLibRef=0;
}
}
UInt16 PhoneVMailMessages(void)
{
Err err;
UInt16 count;
PhnMsgBoxDataType data;
count=0;
if(phoneLibRef)
{
MemSet(&data,sizeof(PhnMsgBoxDataType),0);
data.type=kBoxVoice;
data.lineNumber=1;
err=PhnLibBoxInformation(phoneLibRef,&data);
if(!err)
count=data.messageCount;
}
return(count);
}
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/