LoadICCProfile Example for C++ 5.0 and later

   ILEADRasterIO        *pRasterIO = NULL; 
   ILEADRasterVariant   *pData = NULL; 
   int nRet; 
   FILE *fp; 
   
   CoCreateInstance(CLSID_LEADRasterVariant,NULL, CLSCTX_ALL, IID_ILEADRasterVariant,(void**)&pData); 
   CoCreateInstance(CLSID_LEADRasterIO,NULL, CLSCTX_ALL, IID_ILEADRasterIO,(void**)&pRasterIO); 

   fp = fopen(TEXT("c:\\MyICC.ICM"),"wb");
   
   nRet = pRasterIO->LoadICCProfile(TEXT("c:\\dst_rgb_image.tif"), pData, 1); 

   for(int i =0;i<pData->GetItemCount ();++i) 
   {
      int tmp = pData->GetShortItemValue (i); 
      fwrite(&tmp,1,1,fp); 
   }
   pRasterIO->Release();
   pData->Release();
   fclose(fp);