本文整理汇总了C++中CMsvSession::CleanupEntryPop方法的典型用法代码示例。如果您正苦于以下问题:C++ CMsvSession::CleanupEntryPop方法的具体用法?C++ CMsvSession::CleanupEntryPop怎么用?C++ CMsvSession::CleanupEntryPop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMsvSession
的用法示例。
在下文中一共展示了CMsvSession::CleanupEntryPop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TestCleanupStackL
LOCAL_C void TestCleanupStackL()
{
CDummyObserver* ob = new(ELeave)CDummyObserver;
CleanupStack::PushL(ob);
CMsvSession* session = CMsvSession::OpenSyncL(*ob);
CleanupStack::PushL(session);
CMsvEntry* cEntry = CMsvEntry::NewL(*session, KMsvDraftEntryId, TMsvSelectionOrdering());
CleanupStack::PushL(cEntry);
TMsvEntry entry;
entry.iType = KUidMsvMessageEntry;
entry.iMtm = KUidMsvLocalServiceMtm;
entry.iServiceId = KMsvLocalServiceIndexEntryId;
// Create an entry
cEntry->CreateL(entry);
// Make sure heap failure occurs in CleanupEntryPushL
// If a failure occurs the entry should still be on cleanup stack
__UHEAP_FAILNEXT(0);
TRAPD(error, session->CleanupEntryPushL(entry.Id()); session->CleanupEntryPop(); );