Setting up GDPicture.Net 10 COM Edition in Delphi XE2

Discussions about GdPicture.NET usage in non managed applications built in vb6, Delphi, vfp, MFC c++ etc...
Post Reply
deketo
Posts: 3
Joined: Wed Apr 16, 2014 7:03 pm

Setting up GDPicture.Net 10 COM Edition in Delphi XE2

Post by deketo » Thu Apr 17, 2014 4:42 am

Hello,

I purchased GDPicture.Net 10, registered it, and have tried to import the SDK to the ActiveX Palette of Delphi XE2 per the instructions in the GDPicture.NET Reference Guide, but when it tries to compile the wrapper, it fails with the following errors in the type library:

[DCC Error] GdPicture_NET_10_TLB.pas(16043): E2015 Operator not applicable to this operand type
[DCC Error] GdPicture_NET_10_TLB.pas(16464): E2015 Operator not applicable to this operand type
[DCC Error] GdPicture_NET_10_TLB.pas(24499): E2015 Operator not applicable to this operand type
[DCC Error] GdPicture_NET_10_TLB.pas(25907): E2015 Operator not applicable to this operand type
[DCC Fatal Error] GDPicture.dpk(36): F2063 Could not compile used unit 'GdPicture_NET_10_TLB.pas'

The code line corresponding to the first error message is:

TControlData2(CControlData).FirstEventOfs := UIntPtr(@@FOnPropertyChanged) - UIntPtr(Self);

The other errors correspond to similar assignment statements. Obviously I'm missing something - what do I need to do so the wrapper will compile correctly?

Thanks!

Cedric
Posts: 258
Joined: Sun Sep 02, 2012 7:30 pm

Re: Setting up GDPicture.Net 10 COM Edition in Delphi XE2

Post by Cedric » Thu Apr 17, 2014 1:50 pm

Hi there,

For an unknown reason Delphi XE series appears to do not generate the wrapper correctly, causing those errors and preventing you to compile the package.
However this can be worked around easily by copying the GdPicture_NET_10_TLB.pas you will find in one of the two Delphi sample we provide, for instance GdPicture.NET 10\Samples\AnyCPU\delphi using com interop\PDF to TIFF\
Just copy it, and paste it over the one that has been generated by Delphi (you can overwrite it with Delphi already running, it does not matter) and then you will be able to compile and install the package properly.

Cheers!

deketo
Posts: 3
Joined: Wed Apr 16, 2014 7:03 pm

Re: Setting up GDPicture.Net 10 COM Edition in Delphi XE2

Post by deketo » Thu Apr 17, 2014 8:14 pm

Hi Cedric,

Okay, I followed the reference guide instructions up to the point where I got the compile error, then I copied the GDPicture_NET_10_TLB.pas from the sample program and overwrote the one generated by Delphi XE2, per your instructions.

I then built the project and it compiled without error. In the project manager, I right-clicked on GDPicture.bpl and clicked Install, and got the message:

"Package C:\Users\Public\Documents\RAD Studio\9.0\Bpl\GDPicture.bpl has been installed."

However, the component palette still doesn't have an ActiveX tab or GDPicture components. I went to Component / Install Components, and C:\Users\Public\Documents\RAD Studio\9.0\Bpl\GDPicture.bpl is in the list and it is checked. However, if I select it and click on Components, there are no components in the package list.

It seems like we're still missing something?

Thanks for your help!!!!

George

Cedric
Posts: 258
Joined: Sun Sep 02, 2012 7:30 pm

Re: Setting up GDPicture.Net 10 COM Edition in Delphi XE2

Post by Cedric » Fri Apr 18, 2014 2:00 pm

Hi George,

Unfortunately I think this is a direct consequence of the issue I previously mentioned, something has changed in Delphi in an older release (this also happens with other IDE too).
It might be related to the fact that it is not a plain ActiveX component but a .NET assembly with COM exposure which is causing a slightly different behavior in some development environments.
We do not have any solution to this however the graphical user controls can be used nevertheless, you just need to create and add them programmatically as shown on the Delphi demo application previously mentioned.
For a GdViewer, basically you need to declare as a public variable with GdViewer1: TGDViewer; and then in your form FormCreate procedure you can create it and add it to your form with GdViewer1 := TGDViewer.Create(Self); and Self.InsertControl(GdViewer1);

I know it is less convenient than dragging it from the palette but I'm afraid there's no other option.

deketo
Posts: 3
Joined: Wed Apr 16, 2014 7:03 pm

Re: Setting up GDPicture.Net 10 COM Edition in Delphi XE2

Post by deketo » Mon Apr 21, 2014 6:18 pm

Hello Cedric,

I tried compiling and running the demo program, but even though I pasted my license key in place of the 'XXX', when I go to File / Open, I get an error message saying "Raster Image and Metafile Viewing: This option has not been unlocked!", and in closing out, I get similar messages regarding ThumbnailEx and GDPictureXMP/Annotations.

I have a 33-digit key that should be for a 2-user Ultimate Edition GDPicture.Net 10 license, but both my other programmer and I are getting the same messages. We have run the license manager and registered the key on both PCs.

Is something wrong with the key, or do we need to "undo" anything from our attempts to set up GDPicture as an ActiveX package?

Thanks for your help!!!

George

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: Setting up GDPicture.Net 10 COM Edition in Delphi XE2

Post by SamiKharma » Mon Apr 21, 2014 11:46 pm

Hi,

Please provide us with your keys in a support ticket in the support platform: support.gdpicture.com

Best,
Sami

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest