//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);
}
本文介绍了一种在Windows Mobile平台上使用API函数读取设备通话记录的方法。通过打开通话记录句柄并遍历所有条目,可以获取每条通话记录的具体信息。

3078

被折叠的 条评论
为什么被折叠?



