m_hCallLogDB = CeOpenDatabaseInSession(NULL, &m_ceguid, &m_ceoidDB, TEXT("clog.db"), &sort, 0, NULL);
if (INVALID_HANDLE_VALUE == m_hCallLogDB) {
DWORD res = GetLastError();
printf("\n.....opendatabase failed! last error is %d\n", res);
CeUnmountDBVol(&m_ceguid);
return false;
}
return true;
}
//Add record which include the "starttime" and "endtime" to the 'clog.db'
int TAddLog::AddRecord(LPWSTR name, LPWSTR phonum, LPWSTR numtype, long logtype, \
SYSTEMTIME *stStartTime, SYSTEMTIME *stEndTime, int num)
{
int IsSucs = OpenDatabase();
if (!IsSucs) {
return 0;
}