读手机Calendar遇到问题???
在网上找到一段读calendar得代码,但,我测试得手机Nokia3230上找不到
agendata.dat这样得文件??
有没有人碰到过,请支支招,非常感谢!!!!!
iAgenServ = RAgendaServ::NewL();
iAgenServ-> Connect();
User::LeaveIfError(iFs.Connect());
//Create a CAgnEntryModel. This is en entry model and cannot be used with a user
//interface. Unlike an instance model, it does not require a state callback.
iModel = CAgnEntryModel::NewL();
iModel-> SetServer(iAgenServ);
iModel-> SetMode(CAgnEntryModel::EClient);
TRAPD(error,(iModel-> OpenL(_L( "C:\\agendata.dat "),KDefaultTimeForEvents,KDefaultTimeForAnnivs,1234)));
iAgenServ-> WaitUntilLoaded();
if(iAgenServ-> FileLoaded())
{
iAgenServ-> CloseAgenda();
}
CleanupStack::PopAndDestroy();
[解决办法]
用poom去读,和读联系人是一样的