Using GdPicture in MFC
Posted: Fri Oct 11, 2013 4:38 am
I am trying to use CGdPictureImaging class in MFC and having trouble
I have GdPicture.NET.9
I installed the program, then registered the dll using framework 2.0 and created the tlb.
Then I generated the CLicenseManager and CGdPictureImaging classes from the tlb.
So far so good.
Then I tried the following code:
CLicenseManager* pLicenseManager = new CLicenseManager();
pLicenseManager->RegisterKEY(the_license_key);
CGdPictureImaging* pGdImaging = new CGdPictureImaging();
long lImageID = pGdImaging ->CreateGdPictureImageFromFile(path_of_the_photo);
long lError = pGdImaging ->GetStat();
pGdImaging ->ReleaseGdPictureImage(lImageID);
the lImageID and lError returned by both functions would be -858993460, and I'm not sure what steps I missed.
I am not sure if I actually need to instantiate a new class with GdPicture in COM, but I tried both instantiating and without.
I did realized the m_lpDispatch inside the classes are 0, but I'm not sure how to fix that.
I have GdPicture.NET.9
I installed the program, then registered the dll using framework 2.0 and created the tlb.
Then I generated the CLicenseManager and CGdPictureImaging classes from the tlb.
So far so good.
Then I tried the following code:
CLicenseManager* pLicenseManager = new CLicenseManager();
pLicenseManager->RegisterKEY(the_license_key);
CGdPictureImaging* pGdImaging = new CGdPictureImaging();
long lImageID = pGdImaging ->CreateGdPictureImageFromFile(path_of_the_photo);
long lError = pGdImaging ->GetStat();
pGdImaging ->ReleaseGdPictureImage(lImageID);
the lImageID and lError returned by both functions would be -858993460, and I'm not sure what steps I missed.
I am not sure if I actually need to instantiate a new class with GdPicture in COM, but I tried both instantiating and without.
I did realized the m_lpDispatch inside the classes are 0, but I'm not sure how to fix that.