GetDIB2 example for C++ Builder

//This example gets the image from LEADRasterView1 as a V5 DIB
    //and then loads the DIB into LEADRasterView2
   long MyDIB;

   //LEADRasterView1 has an image at this point
   MyDIB= LEADRasterView1->Raster->GetDIB2 (DIB_BITMAPV5HEADER);
   LEADRasterView2->Raster->SetDIB (MyDIB);
   //Free the DIB using the Windows API
   GlobalFree ((void*)MyDIB);