wince上如何讀取和備份 刪除聯絡人

2021-06-16 03:47:25 字數 1990 閱讀 7861

讀取聯絡人的方法有api和資料庫。這裡所說的聯絡人有兩個概念,乙個是sim卡上的,乙個裝置中的。

想看看如果讀取sim卡中的聯絡人。

#include

#pragma comment(lib,"cellcore.lib")

// csimphonebookview message handlers

void readsimphonebook()

dwcurrec++;

}simdeinitialize(g_hsim);

g_hsim = null;

}void add()

simdeinitialize(g_hsim);

g_hsim = null;

}//下面的**通過系統自帶的資料庫來讀取

int copyphonebook(bool flag)

}ceoid ceoid;

ceoid = 0;

cenotifyrequest *prequest = (cenotifyrequest *) localalloc(lptr,sizeof(cenotifyrequest));

prequest->dwsize = sizeof(cenotifyrequest);

prequest->hwnd = null;

prequest->hheap = null;

prequest->dwflags = cedb_exnotification;

//開啟聯絡人資料庫,並註冊事件

handle hddb;

hddb = ::ceopendatabaseex(&ceguid,&ceoid,l"contacts database",0,0,prequest);

if(hddb == invalid_handle_value)

int icount;

ceoidinfo oldinfo;

ceoid ceoid =0;

if(!ceoidgetinfoex(&ceguid,ceoid,&oldinfo))

//資料庫的記錄總數

icount = oldinfo.infdatabase.wnumrecords;

if(0 == icount)

return 0;

dword dwindex;

pbyte pbuff;

word wprops;

dword dwrecsize;

pcepropval precord;

for(int i = 0; i < icount; ++i)

contacts_field; //contacts database的字段,系統定義不可更改

*///assert(ceoid !=0);

precord = (pcepropval)pbuff;

lpwstr mobile = null;

lpwstr name = null;

int len_mobile;

int len_name;

cstring one;

for(int j = 0; j < wprops; ++j)

break;

case name://姓名

default:

break;

}precord ++;

}localfree(pbuff);

}//關閉資料庫

if(! closehandle(hddb))

if(!flag)

f.close();

if(!flag)

deletephonebook();

// sleep(1000);

char *nam;

char *phone;

char *seps = "/t/r/n";

int count = 0;

do}while(nam && phone);

//關閉資料庫

if(! closehandle(hddb))

}

mysql自動備份和刪除舊備份

1 mysql自動備份指令碼 vi opt scritps db backup.sh bin bash user root password 123456 database1 test db1 database2 test db2 backup dir opt data bankup logfile...

如何設定 刪除 查詢wince環境變數

在wince中有很多的環境變數,那麼如何設定 刪除 查詢這些環境變數呢 1.查詢環境變數 無論是在wince5.0還是wince6.0,當我們在pb裡開啟或者建立乙個工程以後,我們可以在選單中點 build open release directory in build window 然後會彈出命令...

反射 讀取和刪除檔案

反射 讀取和刪除檔案 15 9 2017 在桌面建立文字文件,寫入執行的類,方法和路徑 寫入 實現根據文字文件內容建立檔案或刪除的功能 using system using system.collections.generic using system.linq using system.text ...