本文整理汇总了C++中CDiskObjectPtr::CommitDiskInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ CDiskObjectPtr::CommitDiskInfo方法的具体用法?C++ CDiskObjectPtr::CommitDiskInfo怎么用?C++ CDiskObjectPtr::CommitDiskInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDiskObjectPtr
的用法示例。
在下文中一共展示了CDiskObjectPtr::CommitDiskInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RebindMirror
void CMirrorWorkThread::RebindMirror()
{
// Get list of disks involved in the previous mirroring.
// NOTE : Because disks aggregated can also be mirrored,
// there can be more than two disks involved in the mirroring.
CDiskObjectPtr aggregationRoot;
aggregationRoot = m_pSource->GetParent();
while ( !aggregationRoot->GetParent()->IsRoot() )
{
aggregationRoot = aggregationRoot->GetParent();
}
// Mark all the bitmaps dirty.
m_pSource->OpenExclusive();
m_pDest->OpenExclusive();
m_pSource->MarkAllBitmap();
CUnitDiskInfoHandlerPtr pHandler = m_pSource->GetInfoHandler();
aggregationRoot->Rebind(
m_pDest,
pHandler->GetPosInBind() ^ 0x01
);
aggregationRoot->CommitDiskInfo(TRUE);
// Write binding information to the destination disk
m_pDest->Mirror(m_pSource);
m_pDest->CommitDiskInfo(TRUE);
m_bRebound = TRUE;
m_pSource->Close();
m_pDest->Close();
}