Page 1 of 1

[C++Builder XE2] CreateGdPictureImageFromFile returns 10

Posted: Mon Mar 25, 2013 3:16 am
by NobMiwa
Hello,

I'm trying this product with C++Builder XE2 on Win7 32 bit.
I got problem with following code..

Code: Select all

	TGdPictureImaging *pictureImaging = new TGdPictureImaging(this);
	UnicodeString path = Edit1->Text;
	int imageID=0;
	if (FileExists(path)) {
		imageID = pictureImaging->CreateGdPictureImageFromFile(path.c_str()); 
		if (imageID==0) {
			int status = pictureImaging->GetStat();
		}
	}
I got imageID is 0, and status returns 10.
I checked FileExists() but returns status 10(file not found).

Please advice,
Nobuo Miwa

Re: [C++Builder XE2] CreateGdPictureImageFromFile returns 0

Posted: Mon Mar 25, 2013 7:23 pm
by Loïc
Hi,

You have to use BSTR string. Here an example: viewtopic.php?t=3724

Kind regards,

Loïc

Re: [C++Builder XE2] CreateGdPictureImageFromFile returns 10

Posted: Tue Mar 26, 2013 2:55 am
by NobMiwa
Hello,

Thank you very much !
It works fine.

Regards,
Nobuo Miwa