MoveFirstIOD Example for C++ 6.0 and later
IDicomIODItemPtr pCurrentIOD=NULL;
long hIOD;
//Move to the First IOD in the list
m_pLEADDicomDS->MoveFirstIOD (FALSE);
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
hIOD = pCurrentIOD->GethIOD(); //store it
AfxMessageBox(pCurrentIOD->GetName());
//Move to the Last IOD at this same level
m_pLEADDicomDS->MoveLastIOD(TRUE);
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
AfxMessageBox(pCurrentIOD->GetName());
//Move to the Previous IOD at this same level
m_pLEADDicomDS->MovePrevIOD(TRUE);
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
AfxMessageBox(pCurrentIOD->GetName());
//Move back to First IOD
m_pLEADDicomDS->SetCurrentIOD (hIOD);
//Move to the Next IOD at this same level
m_pLEADDicomDS->MoveNextIOD(TRUE);
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
AfxMessageBox(pCurrentIOD->GetName());