MoveRootIOD Example for C++ 6.0 and later

IDicomIODItemPtr pCurrentIOD=NULL;

   m_pLEADDicomDS->FindIOD (DICOM_CLASS_US_IMAGE_STORAGE, 
                           DICOM_IOD_TYPE_CLASS, 
                           TRUE);

   //Move to the Root IOD
   m_pLEADDicomDS->MoveRootIOD ();
   pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD ();

   AfxMessageBox(pCurrentIOD->GetName());

   //Move to the first Child IOD
   m_pLEADDicomDS->MoveChildIOD();
   pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD ();
   AfxMessageBox(pCurrentIOD->GetName());

   //Move back to the Parent IOD
   m_pLEADDicomDS->MoveParentIOD ();
   pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD ();
   AfxMessageBox(pCurrentIOD->GetName());