[C++Builder XE2] CreateGdPictureImageFromFile returns 10

Discussions about GdPicture.NET usage in non managed applications built in vb6, Delphi, vfp, MFC c++ etc...
Post Reply
NobMiwa
Posts: 7
Joined: Sun Mar 24, 2013 8:00 am

[C++Builder XE2] CreateGdPictureImageFromFile returns 10

Post by NobMiwa » Mon Mar 25, 2013 3:16 am

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
Last edited by NobMiwa on Tue Mar 26, 2013 2:54 am, edited 1 time in total.

User avatar
Loïc
Site Admin
Posts: 5526
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

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

Post by Loïc » Mon Mar 25, 2013 7:23 pm

Hi,

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

Kind regards,

Loïc

NobMiwa
Posts: 7
Joined: Sun Mar 24, 2013 8:00 am

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

Post by NobMiwa » Tue Mar 26, 2013 2:55 am

Hello,

Thank you very much !
It works fine.

Regards,
Nobuo Miwa

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest