删除WM 5和WM 6中的通话记录 [英] Deleting call logs in WM 5 and WM 6

查看:99
本文介绍了删除WM 5和WM 6中的通话记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨伙计,我无法删除WM5 Pocket PC / SmartPhone中的所有通话记录条目。我尝试了下面的代码
我能够打开clog.db数据库,但是在我执行了
ret = CeOidGetInfoEx2(& guid,oid,& cinfo)后,我没有得到任何没有cinfo.infDatabase.dwNumRecords中的记录。即使在通话记录中有相当多的条目,它也始终设置为0。

是否有任何我遗漏的内容。正如我搜索了所有的论坛......似乎每个人都建议使用EDB Apis ..我用过......但没有成功。

感谢任何帮助。
/> void DeleteAllCallLogs()
{
HANDLE hOpenDB = NULL;
CEGUID guid;

CEOIDINFOEX cinfo;
cinfo.wVersion = 2;

BOOL ret = false;
ret = CeMountDBVolEx(& guid,L" pim.vol",NULL,OPEN_EXISTING);
if(!ret)
{
return;
}
CEOID oid = NULL;
hOpenDB = CeOpenDatabaseInSession(NULL,& guid,& OID,L" clog.db",NULL,0,NULL);
if(hOpenDB!= INVALID_HANDLE_VALUE)
{
}
如果(oid!= 0)
{
ret = CeOidGetInfoEx2(& guid,oid) ,&安培; CINFO);

DWORD dwIndex = 0;
如果(cinfo.infDatabase.dwNumRecords> 0)
{
int recordsCount = cinfo.infDatabase.dwNumRecords;
DWORD dwIndex = 0;
for(int i = 0; i< recordsCount; i ++)
{
CEOID CeRecObj;
CeRecObj = CeSeekDatabaseEx(hOpenDB,CEDB_SEEK_BEGINNING,0,0, & dwIndex);
if if(CeRecObj)
{
CeDeleteRecord(hOpenDB,CeRecObj);
}
}}}}}
CloseHandle(hOpenDB);

CeUnmountDBVol(& guid);


Hi Folks,
   I am not able to delete all call logs entries in WM5 Pocket PC/SmartPhone. I tried the following code
I am able to open the clog.db database but after i execute
ret=CeOidGetInfoEx2(&guid,oid,&cinfo)
i dont get any no of records in cinfo.infDatabase.dwNumRecords. It is set to 0 always even though there are quite a few entries in the call logs.

   Is there anything i am missing. As i have searched all the forums..and it seems everybody suggests to use EDB Apis..which i have used...but no success.

   Any help is appreciated.

void DeleteAllCallLogs()
{
    HANDLE  hOpenDB =  NULL;
    CEGUID guid;
   
    CEOIDINFOEX cinfo;
    cinfo.wVersion =2;
   
    BOOL ret=false;
    ret=CeMountDBVolEx(&guid,L"pim.vol",NULL,OPEN_EXISTING);
    if(!ret)
    {
        return;
    }
    CEOID oid = NULL;
    hOpenDB = CeOpenDatabaseInSession(NULL,&guid,&oid,L"clog.db",NULL,0,NULL);
    if(hOpenDB != INVALID_HANDLE_VALUE)
    {
    }
    if(oid!=0)
    {
        ret=CeOidGetInfoEx2(&guid,oid,&cinfo);

        DWORD dwIndex=0;
        if(cinfo.infDatabase.dwNumRecords > 0)
        {
            int recordsCount = cinfo.infDatabase.dwNumRecords;
            DWORD dwIndex=0;
            for(int i=0; i<recordsCount;i++)
            {
                CEOID        CeRecObj;
                CeRecObj = CeSeekDatabaseEx(hOpenDB,CEDB_SEEK_BEGINNING,0,0,&dwIndex);
                if(CeRecObj)
                {
                    CeDeleteRecord(hOpenDB,CeRecObj);
                }
            }
        }
    }
    CloseHandle(hOpenDB);
   
    CeUnmountDBVol(&guid);

}

推荐答案

试试这种方法,
不要检查记录数,
只要检查CeRecObj并删除记录,如果CeRecObj == NULL从循环中退出,请告诉我这个逻辑对您有用。

.Siva。
Try this method,
 Don't check the record count,
just check CeRecObj and delete records if CeRecObj == NULL exit from the loop
let me know this logic works for you.

Siva.


这篇关于删除WM 5和WM 6中的通话记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆