LoadStatus Example for C++ 5.0 and later
ILEADRasterIO * pRasterIO = NULL;
int nRet = 0;
HRESULT hr = CoCreateInstance(
CLSID_LEADRasterIO,
NULL,
CLSCTX_ALL,
IID_ILEADRasterIO,
(void**)&pRasterIO
);
nRet = pRasterIO->Load(m_RasterView.GetRaster(), TEXT("c:\\parrots.jpg"), 0, 0, 1);
if(nRet == 0)
{
if(pRasterIO->LoadStatus == 0)
MessageBox(TEXT("The image was loaded successfully and with no errors"), TEXT("SUCCESS"), MB_OK);
else
MessageBox(TEXT("The image was loaded, but it might have corrupted areas"), TEXT("Warning!"), MB_OK);
}
else
MessageBox(TEXT("The load failed!"), "ERROR", MB_OK);
pRasterIO->Release();