Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Why? XE7 IDE will not let me use my VCL component in Win64


This question is answered.


Permlink Replies: 5 - Last Post: Dec 28, 2015 9:57 AM Last Post By: Remy Lebeau (Te...
Robert Miller

Posts: 6
Registered: 9/2/01
Why? XE7 IDE will not let me use my VCL component in Win64  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 24, 2015 8:16 AM
I have a long-standing VCL component in my product that I am trying to make available for both Win64 and Win32. I have done successful builds for both platforms, and I see that the IDE has placed the 32-bit bpl package file in directory C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl\ , and it has placed the 64-bit bpl in C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl\Win64\ . Seems OK so far. But when I try to USE the 64-bit version, the IDE's tool-tip on the classic Component Palette says it is available for Win32 only, and when the project is set for Win64, the icon is greyed out in both the classic Component Palette and in the Tool Palette, so I cannot use my component in Win64. What am I missing here? I have searched the XE7 help files, and done Google searches, to no avail. "Help me Obi-wan Kanobe, you're my only hope!" (Sorry this is all jammed together into 1 paragraph -- I am typing this inside the XE7 IDE, and it isn't accepting any carriage returrns.)
Andrew Haines

Posts: 19
Registered: 1/27/02
Re: Why? XE7 IDE will not let me use my VCL component in Win64
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 24, 2015 8:31 AM   in response to: Robert Miller in response to: Robert Miller
On 2015-12-24 11:16 AM, Robert Miller wrote:
I have a long-standing VCL component in my product that I am trying to make available for both Win64 and Win32. I have done successful builds for both platforms, and I see that the IDE has placed the 32-bit bpl package file in directory C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl\ , and it has placed the 64-bit bpl in C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl\Win64\ . Seems OK so far. But when I try to USE the 64-bit version, the IDE's tool-tip on the classic Component Palette say
s it is available for Win32 only, and when the project is set for Win64, the icon is greyed out in both the classic Component Palette and in the Tool Palette, so I cannot use my component in Win64. What am I missing here? I have searched the XE7 help files, and done Google searches, to no avail. "Help me Obi-wan Kanobe, you're my only hope!" (Sorry this is all jammed together into 1 paragraph -- I am typing this inside the XE7 IDE, and it isn't accepting any carriage returrns.)
Add "[ComponentPlatformsAttribute(pidWin32 or pidWin64)]" before your
component class type declaration.
By default it is Win32 only.
This is required starting with XE2 as I found out when adapting the
OnGuard components to 64bit.
Robert Miller

Posts: 6
Registered: 9/2/01
Re: Why? XE7 IDE will not let me use my VCL component in Win64  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 24, 2015 9:59 AM   in response to: Andrew Haines in response to: Andrew Haines
Andrew Haines wrote:
On 2015-12-24 11:16 AM, Robert Miller wrote:
I have a long-standing VCL component in my product that I am trying to make available for both Win64 and Win32. I have done successful builds for both platforms, and I see that the IDE has placed the 32-bit bpl package file in directory C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl\ , and it has placed the 64-bit bpl in C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl\Win64\ . Seems OK so far. But when I try to USE the 64-bit version, the IDE's tool-tip on the classic Component Palette say
s it is available for Win32 only, and when the project is set for Win64, the icon is greyed out in both the classic Component Palette and in the Tool Palette, so I cannot use my component in Win64. What am I missing here? I have searched the XE7 help files, and done Google searches, to no avail. "Help me Obi-wan Kanobe, you're my only hope!" (Sorry this is all jammed together into 1 paragraph -- I am typing this inside the XE7 IDE, and it isn't accepting any carriage returrns.)
Add "[ComponentPlatformsAttribute(pidWin32 or pidWin64)]" before your
component class type declaration.
By default it is Win32 only.
This is required starting with XE2 as I found out when adapting the
OnGuard components to 64bit.

Wow, thanks for responding fast, on Christmas Eve no less! This is a huge help for me, so I really appreciate it. I hope you have a fabulous holiday!

I will check this out right away.

Is this documented anywhere?

Best regards,

Dr. Bob Miller
Trace Systems Inc.

Edited by: Robert Miller on Dec 24, 2015 10:00 AM
Andrew Haines

Posts: 19
Registered: 1/27/02
Re: Why? XE7 IDE will not let me use my VCL component in Win64 [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 24, 2015 10:43 AM   in response to: Robert Miller in response to: Robert Miller
On 2015-12-24 01:00 PM, Robert Miller wrote:
Andrew Haines wrote:
On 2015-12-24 11:16 AM, Robert Miller wrote:
I have a long-standing VCL component in my product that I am trying to make available for both Win64 and Win32. I have done successful builds for both platforms, and I see that the IDE has placed the 32-bit bpl package file in directory C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl\ , and it has placed the 64-bit bpl in C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl\Win64\ . Seems OK so far. But when I try to USE the 64-bit version, the IDE's tool-tip on the classic Component Palette
say
s it is available for Win32 only, and when the project is set for Win64, the icon is greyed out in both the classic Component Palette and in the Tool Palette, so I cannot use my component in Win64. What am I missing here? I have searched the XE7 help files, and done Google searches, to no avail. "Help me Obi-wan Kanobe, you're my only hope!" (Sorry this is all jammed together into 1 paragraph -- I am typing this inside the XE7 IDE, and it isn't accepting any carriage returrns.)
Add "[ComponentPlatformsAttribute(pidWin32 or pidWin64)]" before your
component class type declaration.

This is a huge help for me, so I really appreciate it.

Is this documented anywhere?


I do not remember just how I found out about it but I did come across it
on stackoverflow here:
http://stackoverflow.com/questions/27486939/is-there-simpler-way-of-saying-that-delphi-component-control-is-supported-on-all

After that I found it in the online help and other newsgroup posts once
I knew what I was looking for.
Robert Miller

Posts: 6
Registered: 9/2/01
Re: Why? XE7 IDE will not let me use my VCL component in Win64 [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 24, 2015 11:31 AM   in response to: Andrew Haines in response to: Andrew Haines
Andrew Haines wrote:
On 2015-12-24 01:00 PM, Robert Miller wrote:
Andrew Haines wrote:
On 2015-12-24 11:16 AM, Robert Miller wrote:
I have a long-standing VCL component in my product that I am trying to make available for both Win64 and Win32. I have done successful builds for both platforms, and I see that the IDE has placed the 32-bit bpl package file in directory C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl\ , and it has placed the 64-bit bpl in C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl\Win64\ . Seems OK so far. But when I try to USE the 64-bit version, the IDE's tool-tip on the classic Component Palette
say
s it is available for Win32 only, and when the project is set for Win64, the icon is greyed out in both the classic Component Palette and in the Tool Palette, so I cannot use my component in Win64. What am I missing here? I have searched the XE7 help files, and done Google searches, to no avail. "Help me Obi-wan Kanobe, you're my only hope!" (Sorry this is all jammed together into 1 paragraph -- I am typing this inside the XE7 IDE, and it isn't accepting any carriage returrns.)
Add "[ComponentPlatformsAttribute(pidWin32 or pidWin64)]" before your
component class type declaration.

This is a huge help for me, so I really appreciate it.

Is this documented anywhere?


I do not remember just how I found out about it but I did come across it
on stackoverflow here:
http://stackoverflow.com/questions/27486939/is-there-simpler-way-of-saying-that-delphi-component-control-is-supported-on-all

After that I found it in the online help and other newsgroup posts once
I knew what I was looking for.

Yes, I found that stackoverflow post myself, once YOU told me what to look for. These days, things have gotten so complicated that knowing what to look for can be really hard.

I used what you suggested, and since my component's source contains multiple helper classes, I added that attribute to all of them. It now "works a treat" in Win64. I marked your reply as "Correct," for whatever that might get you. (It would be nice if it would do something tangible, like buy you a beer or something...)

Many, many thanks! I would never have found that without your help.

Best regards

Dr. Bob Miller
Trace Systems Inc.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Why? XE7 IDE will not let me use my VCL component in Win64 [Edit]
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 28, 2015 9:57 AM   in response to: Robert Miller in response to: Robert Miller
Robert wrote;

Is this documented anywhere?

Yes, on Embarcadero's DocWiki:

64-bit Windows Application Development
http://docwiki.embarcadero.com/RADStudio/en/64-bit_Windows_Application_Development

In particular:

64-bit Windows Components, Packages, and Libraries Require 32-bit Design-Time
Versions
http://docwiki.embarcadero.com/RADStudio/en/64-bit_Windows_Application_Development#64-bit_Windows_Components.2C_Packages.2C_and_Libraries_Require_32-bit_Design-Time_Versions

Making Your Components Available at Design Time and Run Time
http://docwiki.embarcadero.com/RADStudio/en/64-bit_Windows_Application_Development#Making_Your_Components_Available_at_Design_Time_and_Run_Time

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02