原创  How to read calllogs on windows mobile 收藏

//Read the calllogs on windows mobile.

HANDLE loghandle;
//open the call log handle.
HRESULT  hr =PhoneOpenCallLog(&loghandle);
if (hr == S_OK)
{
    CEOID re;
    //finding the ref of last record.
    hr=PhoneSeekCallLog(loghandle,CALLLOGSEEK_END,0,&re);

    DWORD pp;
    CALLLOGENTRY pCall; //limited to 150 entries
    for (DWORD index=0;index<re;index++)
    {
        hr=PhoneSeekCallLog(loghandle, CALLLOGSEEK_BEGINNING,index,&pp);

        pCall.cbSize=sizeof(CALLLOGENTRY);
        hr=PhoneGetCallLogEntry(loghandle,&pCall);
        //then you can get what you want from 'pCall'.
    }
    //close the log handle.
    PhoneCloseCallLog(loghandle);
}

发表于 @ 2009年03月01日 22:27:00 | 评论( loading... ) | 编辑| 举报| 收藏

旧一篇:转贴下windows mobile上常用的注册表优化选项 | 新一篇:How To Use GSM Compression in Low-level Wave Recording.

  • 发表评论
  • 评论内容:
  •  
Copyright © zhaojiangwei102
Powered by CSDN Blog