SaveNoPalette example for C++ 5.0 and later

   ILEADRasterProcess *pRasterProc=NULL;
   CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL, IID_ILEADRasterProcess, (void**)&pRasterProc); 
   ILEADRasterIO *pRasterIO=NULL; 
   CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL, IID_ILEADRasterIO, (void**)&pRasterIO); 

   pRasterProc->Grayscale(m_RasterView1.GetRaster (), 8); 
   pRasterIO->SaveNoPalette = TRUE; 
   pRasterIO->Save(m_RasterView1.GetRaster(), "d:\\temp\\testnopal.tif", FILE_TIF, 0, QFACTOR_LEAD_0, 0); 
   pRasterIO->SaveNoPalette= FALSE; 
   pRasterIO->Save(m_RasterView1.GetRaster(), "d:\\temp\\testpal.tif", FILE_TIF, 0, QFACTOR_LEAD_0, 0); 

   pRasterProc->Release();
   pRasterIO->Release();