CorrelationList example for Visual C++

CString strMsg; 
int iListCount = 0; 
int iListIndex = 0; 
int iListMaxPoints = 0; 
int c = 0; 

IILEADRasterProcess* m_pRasterProc= NULL; 
CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL, IID_ILEADRasterProcess, (void**)&m_pRasterProc); 

ILEADRaster *pRaster2=NULL; 
   CoCreateInstance(CLSID_LEADRaster, NULL, CLSCTX_ALL, IID_ILEADRaster, (void**)&pRaster2); 

   pRaster2->Bitmap = 0; 
   for(int i = 0; i<5; ++i) 
   {
     pRaster2->Bitmap = m_LeadRasterView.GetRaster().GetBitmap();
     m_pRasterProc->Rotate(pRaster2, 7200 * i, (RotateConstants)0, RGB(255, 0, 0)); 
     m_RasterView2.GetRaster().InsertBitmapListItem(-1, pRaster2->Bitmap); 
   }

   m_pRasterProc->PutCorrelationListMaxPoints(90); 
   m_pRasterProc->CorrelationList(m_RasterView2.GetRaster(), 1, 2, 10); 

   iListCount = m_pRasterProc->GetCorrelationListCount();
   iListMaxPoints = m_pRasterProc->GetCorrelationListMaxPoints();

   for (c = 0; c<iListCount;++c) 
   { 
         iListIndex = m_pRasterProc->GetCorrelationListIndex(c); 
         strMsg.Format (TEXT("X = %d\n ,Y = %d\n"),
         m_pRasterProc->GetCorrelationListX(iListIndex), 
         m_pRasterProc->GetCorrelationListY(iListIndex)); 

         MessageBox(strMsg); 
   }

m_pRasterProc->Release();