FindIndexModule Example for C++ 6.0 and later
long lCount;
CString szOut;
long x;
IDicomDSModulePtr pCurrentModule=NULL;
IDicomIODItemPtr pCurrentIOD=NULL;
m_pLEADDicomDS->EnableMethodErrors = FALSE;
lCount = m_pLEADDicomDS->GetModuleCount();
m_pLEADDicomDS->GetInfoDS();
szOut.Format("Found %ld Modules\n", lCount);
for(x=0; x<lCount; x++)
{
m_pLEADDicomDS->FindIndexModule(x);
pCurrentModule = m_pLEADDicomDS->GetCurrentModule();
m_pLEADDicomDS->FindModuleIOD(m_pLEADDicomDS->GetInfoClass(),
pCurrentModule->GetModule());
pCurrentIOD = m_pLEADDicomDS->GetCurrentIOD();
BSTR bstr = pCurrentIOD->GetName();
CString cs = bstr;
SysFreeString(bstr);
szOut = szOut + "Module " + cs + "\n";
}
AfxMessageBox(szOut);
m_pLEADDicomDS->EnableMethodErrors = TRUE;