RGB Response Example for C++ 5.0 and later

void TestRGBResponse(ILEADRasterTwain * pRasterTwain)
{
   pRasterTwain->put_RGBElementsCount (2);

   pRasterTwain->GetRGBElements(0)->Index = 0;
   pRasterTwain->GetRGBElements(0)->Channel1 = 0;
   pRasterTwain->GetRGBElements(0)->Channel2 = 0;
   pRasterTwain->GetRGBElements(0)->Channel3 = 0;

   pRasterTwain->GetRGBElements(1)->Index = 1;
   pRasterTwain->GetRGBElements(1)->Channel1 = 255;
   pRasterTwain->GetRGBElements(1)->Channel2 = 255;
   pRasterTwain->GetRGBElements(1)->Channel3 = 255;

   pRasterTwain->SetRGBResponse (L_TWAIN_RGB_RESPONSE_SET, 1);
}