本文整理汇总了C++中CDiskObjectList::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ CDiskObjectList::begin方法的具体用法?C++ CDiskObjectList::begin怎么用?C++ CDiskObjectList::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDiskObjectList
的用法示例。
在下文中一共展示了CDiskObjectList::begin方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddDiskObjectList
void CNBListViewCtrl::AddDiskObjectList(CDiskObjectList disks)
{
CDiskObjectList::iterator itr;
for ( itr = disks.begin(); itr != disks.end(); ++itr )
AddDiskObject( *itr );
SortItems();
}
示例2: SelectDiskObjectList
void CNBListViewCtrl::SelectDiskObjectList(CDiskObjectList disks)
{
CDiskObjectList::iterator itr;
for ( itr = disks.begin(); itr != disks.end(); ++itr )
SelectDiskObject( *itr );
}
示例3: OnOK
void CUnBindDlg::OnOK(UINT /*wNotifyCode*/, int /*wID*/, HWND /*hwndCtl*/)
{
UINT32 nDiskCount = 0;
unsigned int i;
NDASCOMM_CONNECTION_INFO *pConnectionInfo;
CFindIfVisitor<TRUE> unitDiskFinder;
CDiskObjectList listUnbind; // List of disks to unbind
CDiskObjectList::iterator itr;
CUnitDiskObjectPtr unitDisk;
WTL::CString strMsg;
WTL::CString strTitle;
strTitle.LoadString(IDS_APPLICATION);
BOOL bUnbindMirror;
BOOL bReadyToUnbind;
UINT32 BindResult;
bUnbindMirror = (dynamic_cast<const CMirDiskObject*>(m_pDiskUnbind.get()) != NULL);
// warning message
strMsg.LoadString((bUnbindMirror) ? IDS_WARNING_UNBIND_MIR : IDS_WARNING_UNBIND);
int id = MessageBox(
strMsg,
strTitle,
MB_YESNO|MB_ICONEXCLAMATION
);
if(IDYES != id)
return;
listUnbind = unitDiskFinder.FindIf( m_pDiskUnbind, IsUnitDisk);
nDiskCount = listUnbind.size();
pConnectionInfo = new NDASCOMM_CONNECTION_INFO[nDiskCount];
ZeroMemory(pConnectionInfo, sizeof(NDASCOMM_CONNECTION_INFO) * nDiskCount);
bReadyToUnbind = TRUE;
for ( itr = listUnbind.begin(), i = 0; itr != listUnbind.end(); ++itr )
{
if(!(*itr)->IsUnitDisk())
continue;
unitDisk = boost::dynamic_pointer_cast<CUnitDiskObject>(*itr);
ZeroMemory(&pConnectionInfo[i], sizeof(NDASCOMM_CONNECTION_INFO));
pConnectionInfo[i].address_type = NDASCOMM_CONNECTION_INFO_TYPE_ADDR_LPX;
pConnectionInfo[i].login_type = NDASCOMM_LOGIN_TYPE_NORMAL;
pConnectionInfo[i].UnitNo = unitDisk->GetLocation()->GetUnitDiskLocation()->UnitNumber;
pConnectionInfo[i].bWriteAccess = TRUE;
pConnectionInfo[i].ui64OEMCode = NULL;
pConnectionInfo[i].bSupervisor = FALSE;
pConnectionInfo[i].protocol = NDASCOMM_TRANSPORT_LPX;
CopyMemory(pConnectionInfo[i].AddressLPX,
unitDisk->GetLocation()->GetUnitDiskLocation()->MACAddr,
LPXADDR_NODE_LENGTH);
if(!(unitDisk->GetAccessMask() & GENERIC_WRITE))
{
// "%1!s! does not have a write access privilege. You need to set write key to this NDAS device before this action."
strMsg.FormatMessage(IDS_ERROR_NOT_REGISTERD_WRITE_FMT,
unitDisk->GetTitle()
);
MessageBox(
strMsg,
strTitle,
MB_OK|MB_ICONERROR
);
bReadyToUnbind = FALSE;
}
i++;
}
if(!bReadyToUnbind)
{
delete [] pConnectionInfo;
EndDialog(IDCANCEL);
}
BindResult = NdasOpBind(i, pConnectionInfo,NMT_SINGLE);
DWORD dwLastError = ::GetLastError();
m_unboundDisks = listUnbind;
if(i == BindResult)
{
strMsg.LoadString(
(bUnbindMirror) ? IDS_WARNING_UNBIND_AFTER_MIR :
IDS_WARNING_UNBIND_AFTER);
MessageBox(
strMsg,
strTitle,
MB_OK|MB_ICONINFORMATION
);
}
else
{
for ( itr = listUnbind.begin(); itr != listUnbind.end(); ++itr )
//.........这里部分代码省略.........