GetLayerMaskBitmap example for C++ 5.0 and later
ILEADRasterIO *pRasterIO=NULL;
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL, IID_ILEADRasterIO, (void**)&pRasterIO);
ILEADRaster *pRaster2=NULL;
CoCreateInstance(CLSID_LEADRaster, NULL, CLSCTX_ALL, IID_ILEADRaster, (void**)&pRaster2);
pRasterIO->GetLayerMaskBitmap(m_RasterView1.GetRaster (), pRaster2, 1);
if(pRaster2->Bitmap == 0)
AfxMessageBox(TEXT("No Layer Mask Bitmap"));
pRaster2->Release();
pRasterIO->Release();