C
CodeFatal
Hello,
I'm new here, please forgive if this is the wrong newsgroup.
I write a little programm wich handle with JPG-Files. The destination
plattform is Win CE 5.0.
I build the code with eMbedded Visual Studio c++ 4.0.
I had created the following Code:
LoaderFunktion:
IImagingFactory *pFactory=NULL;
IImage *pImage=NULL;
ImageInfo *info =NULL;
HRESULT hr = CoCreateInstance(CLSID_ImagingFactory, NULL,
CLSCTX_INPROC_SERVER,__uuidof(IImagingFactory),(void **)&pFactory);
if(FAILED(hr))
{
return FALSE;
}
hr = pFactory->CreateImageFromFile(Pfad, &pImage);
if ( FAILED ( hr ) )
{
pFactory->Release();
return FALSE;
}
info = new ImageInfo;
if(!info)
{
pFactory->Release();
return FALSE;
}
pImage->GetImageInfo(info);
//imageInf and Image are Pointer to Save the Data
ImageInf = (void*) info;
Image = (void*)pImage;
pFactory->Release();
DrawFunktion:
IImage *pImage = Image;
pImage->Draw(...);
DeleteFunktion
delete ImageInf;
delete Image;
The problem:
Everything works fine but wenn i had load some Pictures no one more
will be show.
The Funktion CreateImageFromFile return with code :0x80070008
I think the Problem is the DeleteFunktion. But I haven't found any
thing to delete the data correctley.
Someone here to help me?
Thanks Michael
I'm new here, please forgive if this is the wrong newsgroup.
I write a little programm wich handle with JPG-Files. The destination
plattform is Win CE 5.0.
I build the code with eMbedded Visual Studio c++ 4.0.
I had created the following Code:
LoaderFunktion:
IImagingFactory *pFactory=NULL;
IImage *pImage=NULL;
ImageInfo *info =NULL;
HRESULT hr = CoCreateInstance(CLSID_ImagingFactory, NULL,
CLSCTX_INPROC_SERVER,__uuidof(IImagingFactory),(void **)&pFactory);
if(FAILED(hr))
{
return FALSE;
}
hr = pFactory->CreateImageFromFile(Pfad, &pImage);
if ( FAILED ( hr ) )
{
pFactory->Release();
return FALSE;
}
info = new ImageInfo;
if(!info)
{
pFactory->Release();
return FALSE;
}
pImage->GetImageInfo(info);
//imageInf and Image are Pointer to Save the Data
ImageInf = (void*) info;
Image = (void*)pImage;
pFactory->Release();
DrawFunktion:
IImage *pImage = Image;
pImage->Draw(...);
DeleteFunktion
delete ImageInf;
delete Image;
The problem:
Everything works fine but wenn i had load some Pictures no one more
will be show.
The Funktion CreateImageFromFile return with code :0x80070008
I think the Problem is the DeleteFunktion. But I haven't found any
thing to delete the data correctley.
Someone here to help me?
Thanks Michael