Custom Component 64-bit suport

I ve created new package and a new component using Component\New
Component.. menu.

Compiled and Installed new component.
It is getting disabled in Tool Palette when i select 64-bit target platform.

How can i add 64-bit and OSX supoort to a custom component?

i ve tried ComponentPlatformsAttribute but it did not work.

    [ComponentPlatformsAttribute(pidWin32 or pidWin64 or pidOSX32)]
    TMyControl = class(TControl, IViewport3D)
    private
    ...
    end;

procedure Register;

implementation

procedure Register;
begin
    RegisterComponents('Example Group', [TMyControl]);
end;

initialization
    RegisterFmxClasses([TMyControl]);
-1
Eray
10/22/2011 7:09:27 PM
public.delphi.vcl.writing 510 articles. 0 followers. Follow

13 Replies
813 Views

Similar Articles

[PageSpeed] 42

Eray HANOGLU wrote:

> I ve created new package and a new component using Component\New
> Component.. menu.
> 
> Compiled and Installed new component.
> It is getting disabled in Tool Palette when i select 64-bit target
> platform.
> 
> How can i add 64-bit and OSX supoort to a custom component?
> 
> i ve tried ComponentPlatformsAttribute but it did not work.
> 
>     [ComponentPlatformsAttribute(pidWin32 or pidWin64 or pidOSX32)]
>     TMyControl = class(TControl, IViewport3D)
>     private
>     ...
>     end;
> 
> procedure Register;
> 
> implementation
> 
> procedure Register;
> begin
>     RegisterComponents('Example Group', [TMyControl]);
> end;
> 
> initialization
>     RegisterFmxClasses([TMyControl]);

The IDE itself is a 32 bit process and cannot use 64 bit code modules.
The intended process is to build the application as a Win32 project
first and then recompile it for Win64 and other platforms. So you need
both 32 bit and 64 bit versions of your component and the only one you
need to install is the 32 bit version. The 64 bit version does not need
any design-time support at the moment.

The alternative is to create the components in code, not in the
designer.

-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://codenewsfast.com
http://groups.google.com
-1
Peter
10/23/2011 8:49:08 AM
"Peter Below" <none@nomail.please> wrote in message 
news:413300@forums.embarcadero.com...

> The IDE itself is a 32 bit process and cannot use 64 bit code
> modules. The intended process is to build the application as a
> Win32 project first and then recompile it for Win64 and other
> platforms. So you need both 32 bit and 64 bit versions of your
> component and the only one you need to install is the 32 bit
> version. The 64 bit version does not need any design-time
> support at the moment.

The way I read it, Eray has already installed the component into the IDE, 
but the IDE is not letting him use the component in a 64-bit application 
project at design-time.

-- 
Remy Lebeau (TeamB)
-1
Remy
10/23/2011 8:56:10 AM
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> The way I read it, Eray has already installed the component into the IDE, 
> but the IDE is not letting him use the component in a 64-bit application 
> project at design-time.
> 
> -- 
> Remy Lebeau (TeamB)

Could it be because he's created a combined runtime-and-designtime package?
It works fine for me, but I have separate runtime and designtime packages (x86 and x64 runtimes, x86 designtime)
-1
karl
10/23/2011 12:34:44 PM
karl pritchett wrote:
>> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
>> The way I read it, Eray has already installed the component into the IDE,
>> but the IDE is not letting him use the component in a 64-bit application
>> project at design-time.
>>
>> --
>> Remy Lebeau (TeamB)
>
> Could it be because he's created a combined runtime-and-designtime package?
> It works fine for me, but I have separate runtime and designtime packages (x86 and x64 runtimes, x86 designtime)

Nope, it's most likely because he did not set the appropriate attribute 
on the class:

   [ComponentPlatformsAttribute(pidWin32 or pidWin64)]
   TJvArrowButton = class(TJvGraphicControl)
-1
Olivier
10/24/2011 7:42:48 AM
Hi Olivier,

> Nope, it's most likely because he did not set the appropriate attribute
> on the class:
>
>     [ComponentPlatformsAttribute(pidWin32 or pidWin64)]
>     TJvArrowButton = class(TJvGraphicControl)

Actually, he did that...

So maybe he's looking at the tool palette from a VCL instead of a 
FireMonkey application? (since he wrote:

   [ComponentPlatformsAttribute(pidWin32 or pidWin64 or pidOSX32)]
   TMyControl = class(TControl, IViewport3D)

which seems to require FireMonkey and not VCL...

Groetjes,
           Bob Swart

-- 
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
Chairman Delphi Development Network (DDN) powered by SDN - www.sdn.nl
Embarcadero Technology Partner  Delphi & RAD Studio Reseller Eurozone
http://twitter.com/eBob42 LinkedIn: http://nl.linkedin.com/in/drbob42
Delphi Win32 & .NET books on Lulu.com: http://stores.lulu.com/drbob42
Personal courseware + e-mail support http://www.ebob42.com/courseware
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
-1
Bob
10/24/2011 9:31:55 AM
Bob Swart wrote:
> Hi Olivier,
>
>> Nope, it's most likely because he did not set the appropriate attribute
>> on the class:
>>
>>      [ComponentPlatformsAttribute(pidWin32 or pidWin64)]
>>      TJvArrowButton = class(TJvGraphicControl)
>
> Actually, he did that...

Boy, I should really wake up before posting...


> So maybe he's looking at the tool palette from a VCL instead of a
> FireMonkey application? (since he wrote:
>
>     [ComponentPlatformsAttribute(pidWin32 or pidWin64 or pidOSX32)]
>     TMyControl = class(TControl, IViewport3D)
>
> which seems to require FireMonkey and not VCL...

For the x64 part, there is no need for FireMonkey, VCL is just fine
-1
Olivier
10/24/2011 9:37:19 AM
Hi Oilvier,

>> So maybe he's looking at the tool palette from a VCL instead of a
>> FireMonkey application? (since he wrote:
>>
>>      [ComponentPlatformsAttribute(pidWin32 or pidWin64 or pidOSX32)]
>>      TMyControl = class(TControl, IViewport3D)
>>
>> which seems to require FireMonkey and not VCL...
>
> For the x64 part, there is no need for FireMonkey, VCL is just fine

I know, but look at the IViewPort3D interface, which belongs to 
FireMonkey (unless he has defined a similar interface for VCL)...

Groetjes,
           Bob Swart

-- 
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
Chairman Delphi Development Network (DDN) powered by SDN - www.sdn.nl
Embarcadero Technology Partner  Delphi & RAD Studio Reseller Eurozone
http://twitter.com/eBob42 LinkedIn: http://nl.linkedin.com/in/drbob42
Delphi Win32 & .NET books on Lulu.com: http://stores.lulu.com/drbob42
Personal courseware + e-mail support http://www.ebob42.com/courseware
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
-1
Bob
10/24/2011 9:57:40 AM
Bob Swart wrote:
> Hi Oilvier,
>
>>> So maybe he's looking at the tool palette from a VCL instead of a
>>> FireMonkey application? (since he wrote:
>>>
>>>       [ComponentPlatformsAttribute(pidWin32 or pidWin64 or pidOSX32)]
>>>       TMyControl = class(TControl, IViewport3D)
>>>
>>> which seems to require FireMonkey and not VCL...
>>
>> For the x64 part, there is no need for FireMonkey, VCL is just fine
>
> I know, but look at the IViewPort3D interface, which belongs to
> FireMonkey (unless he has defined a similar interface for VCL)...

Ah yes, of course!
That must be it.
-1
Olivier
10/24/2011 12:36:52 PM
I'm looking the tool palette from a firemonkey project. in the tool 
palette hint IDE says "supported platforms : 32 bit windows" only.

Does not any body tried to create any custom firemonkey component?


24.10.2011 12:31, Bob Swart yazmış:
> Hi Olivier,
>
>> Nope, it's most likely because he did not set the appropriate attribute
>> on the class:
>>
>>      [ComponentPlatformsAttribute(pidWin32 or pidWin64)]
>>      TJvArrowButton = class(TJvGraphicControl)
>
> Actually, he did that...
>
> So maybe he's looking at the tool palette from a VCL instead of a
> FireMonkey application? (since he wrote:
>
>     [ComponentPlatformsAttribute(pidWin32 or pidWin64 or pidOSX32)]
>     TMyControl = class(TControl, IViewport3D)
>
> which seems to require FireMonkey and not VCL...
>
> Groetjes,
>             Bob Swart
>
-1
Eray
10/24/2011 12:40:02 PM
Eray HANOGLU wrote:
> I'm looking the tool palette from a firemonkey project. in the tool
> palette hint IDE says "supported platforms : 32 bit windows" only.
>
> Does not any body tried to create any custom firemonkey component?

Have you looked at what pidXXX values are available ?
Maybe there is one more that needs to be added
-1
Olivier
10/24/2011 12:59:33 PM
24.10.2011 15:59, Olivier Sannier yazmış:
> Eray HANOGLU wrote:
>> I'm looking the tool palette from a firemonkey project. in the tool
>> palette hint IDE says "supported platforms : 32 bit windows" only.
>>
>> Does not any body tried to create any custom firemonkey component?
>
> Have you looked at what pidXXX values are available ?
> Maybe there is one more that needs to be added

There is only 3 (pidWin32, pidWin64, pidOSX32)
-1
Eray
10/24/2011 1:17:16 PM
Hey, 

to do that you class declaration and class attribute should be in same unit as Register procedure (main design time pas unit). I had same problems. I have class declaration in unit that is in the runtime package and in design time package I just call Register (under uses I have my unit from runtime package). In that case it didn't worked then I just declared new descendant class in design time unit and added attribute and now it works just fine. I can see my component has 32bit nad 64 bit support.

Solution:

package_r.bpl
  - unit uMyclass.pas
  - insideu Myclass unit I have class: type TMyClass =....

package_d.bpl
  - unit ComponentRegister.pas
  - inside ComponentRegister i added uses uMyclass
  - and new class TMySpecialClass derrived from TMyClass (type  TMySpecialClass = (TMyClass) ) with class attribute [ComponentPlatformsAttribute(pidWin32 or pidWin64)]
  - declaration for procedure Register
  - Register ('MyClass', TMySpecialClass)

I hope this steps helps you.

Br.



> {quote:title=Eray HANOGLU wrote:}{quote}
> I ve created new package and a new component using Component\New
> Component.. menu.
> 
> Compiled and Installed new component.
> It is getting disabled in Tool Palette when i select 64-bit target platform.
> 
> How can i add 64-bit and OSX supoort to a custom component?
> 
> i ve tried ComponentPlatformsAttribute but it did not work.
> 
>     [ComponentPlatformsAttribute(pidWin32 or pidWin64 or pidOSX32)]
>     TMyControl = class(TControl, IViewport3D)
>     private
>     ...
>     end;
> 
> procedure Register;
> 
> implementation
> 
> procedure Register;
> begin
>     RegisterComponents('Example Group', [TMyControl]);
> end;
> 
> initialization
>     RegisterFmxClasses([TMyControl]);
-1
Boris
5/17/2012 11:05:31 PM
Boris wrote:

> I just declared new descendant class in design time unit and added
> attribute and now it works just fine. I can see my component has 32bit
> nad 64 bit support.

That is NOT the correct solution, not even close.

Since you are registering a descendant class that is implemented in a design-time 
package, the IDE is going to create instances of the descendant class at 
design-time, and require user's projects to contain references to the design-time 
package in order for that class to function properly at run-time.  Needless 
to say, referencing the design-time package in run-time code is not allowed.

If your only design-time functionality is to call RegisterComponents() and 
no other design-time functionality, then you don't actually need a design-time 
package at all.  RegisterComponents() is implemented in the VCL's run-time 
package, and thus can be called by your run-time package.  Simply move your 
entire Register() function into the run-time package.  You only need a separate 
design-time package if you are implementing actual design-time functionality, 
like property/components editors, wizards, OpenTools plugins, etc.

If you do need to create a separate design-time package, the ComponentPlatforms 
attribute DOES NOT need to be attached to a class in the design-time package! 
 It needs to be attached to the actual run-time component where it belongs, 
and you need to have the design-time package register the actual run-time 
component.  This works just fine when used correctly.  If it is not working 
for you, then you are not using it correctly.  Read the documentation for 
how to get the IDE to recognize the available platforms of run-time components.

In fact, it works fine for me even without using the ComponentPlatforms attribute 
at all.  It is enough to simply add both 32bit and 64bit build platforms 
to the run-time package, that is all you need.  The IDE creates a special 
PLATFORMTARGETS resource in the 32bit run-time package.  As long as the 32bit 
design-time package refers to the 32bit run-time package, the IDE can find 
the PLATFORMTARGETS resource and filter its Palettes accordingly.  You only 
need to use the ComponentPlatforms attribute if you have components in the 
run-time package that are available to different platforms than the run-time 
package's build platforms.

As a test, I created a run-time package that had a test component and both 
32bit and 64bit build platforms, then created a 32bit design-time package 
that Requires the 32bit run-time package and registers the component.  With 
just the build platforms alone, my component was available to both 32bit 
and 64bit application projects at both design-time and run-time.  I did not 
have to do anything funky with descendant in the design-time package!  I 
then tried applying the ComponentPlatformsAttrbute to specify just 32bit 
by itself, but left the 64bit build platform in place, then re-registered 
everything, and the component was still available to 64bit projects.  Go 
figure.

--
Remy Lebeau (TeamB)
-1
Remy
5/18/2012 12:12:33 AM
Reply:

Similar Artilces:

Custom component 64 bit [Edit]
I have a custom component compiled on target platform Win32, everything works fine. For Win64bit application it needs 64bit-compiled component. In doc is written simply create 32bit and compile and next set Target platform to 64bit and compile. When i open the package with component, in Project manager/Add platform there is NO selection for 64-bit windows( only OSX and 32bit win). When i create application, there IS a selection 64-bit in Project manager/Add platform. Linker needs "package.a" library instead of "package.lib" but how to create "package.a"? What ...

Delphi XE2 64-bits with third party components
Im using in Delphi XE the following third party components: -DBIsam from Elevate Software (www.elevatesoft.com) -SecureBlackBox from Eidos (www.eidos.com) -SuiPack from Sunisoft (sunisoft.com) -PivotCube from PivotCube (pivotCube.com) And other visual (based in VCL) and non-visual components developed by myself, and dll for 32bits. I guess that will work XE2 if compiled in Delphi for 32 bits. But what happens when I want to want to generate a 64-bit executable? I need a separate 64-bit version of these components or dll, or the compiler performs the required conversion? > {quote...

64 bit cpu // 64 bit Os version // 64 bit powerbuilder?
Hi guys, Does anyone know if Powebuilder is available in 64 bit? Kind regards A 64-bit version of PB does not (yet) exist. -- HTH Arnoud Url: http://www.gloriant.be Also check out my PB Reference site : http://www.pbinfo.be "Gunther Huygens" <ghuygens@be.xrt.com> wrote in message news:eoSjDRaCDHA.331@forums-1-dub... > Hi guys, > > Does anyone know if Powebuilder is available in 64 bit? > > Kind regards > > > > Since there are no OS Windows 64 bits, i wonder how it could be possible. Since there is a 64 bi...

Using Delphi XE2 to write a 64-bit UDF with BLOBs
Hello, We are upgrading a product to Interbase XE (x64) and we use a UDF with BLOBs (written in Delphi). Previously (in x86 land) we have used the TBlob definition in IBExternals to allow GetSegment and PutSegment with blobs in the UDF, but in this causes an AV when we build a the UDF as a Win64 DLL in Delphi XE2 for Interbase XE (64-bit on Win7 Pro). All the other UDF functions work correctly. The TBlob definition from XE2 is below - what is wrong? Regards, Graham TISC_BlobGetSegment = function(BlobHandle: PInt; Buffer: PByte; ...

Issues writing Interbase XE 64-bit UDFs in Delphi XE2
I am having major issues trying to convert our old UDFs to 64-bit UDFs in Delphi XE2. The *only* success I have had is in returning a constant value! {*****************************************************************} {code}library SixtyFourUDF; uses SysUtils, Classes; function ReturnFive: Integer; export; begin Result := 5; end; Exports Return_Five; begin end. {code} {*****************************************************************} I can't even get a simple multiply function to work. {*****************************************************************} ...

Can I write addin for Office 1010 64 bit with Delphi for Windows?
Hi, Can I write addin for Office 1010 64 bit with the native Delphi compiler? You know, I don't care about the 64-bit support in Delphi when developing EXEs, but it will became a very very serious problem when I want to develop addin for Office 2010 (check how many outlook addins in the market) and the Windows Explorer in Windows 64-bit. Am 15.01.2010 05:31, Edwin Ye wrote: > Hi, > > Can I write addin for Office 1010 64 bit with the native Delphi compiler? You know, I don't care about the 64-bit support in Delphi when developing EXEs, but it will became a very very ser...

64 bit static library sets invalid custom properties for components
I have 32 bit components I wrote in C++. They work fine and have worked for years I created a new package and imported one into the package. Works fine in 32 bits. Now I created a 64 bit static library of the same name and added all the component files cpp, res, and h to the library. Compiled the program in 64 bits and the component almost works. The background turned out to be black. After debugging, I discovered the that this happens for ALL my components IF there are values in the DFM file and that is a published property NOT from the inherited component. For the package clas...

Custom components in 64-bit C++ Builder (creating standalone executable) [Edit]
As stated http://docwiki.embarcadero.com/RADStudio/XE3/en/C%2B%2BBuilder_64-bit_Windows_Differences#Producing_64-bit_Packages_Not_Supported , creating 64-bit packages (meaning installing custom components for 64-bit target) isn't yet supported in C++ Builder. But as creating and using 64-bit libraries is supported, is possible to use custom components in standalone (without runtime packages) 64-bit executable too. There is our temporay solution, maybe useful for someone else too: * create 32-bit component package, * create parallel 64-bit library project (New, Other, Static Library) t...

is there a support for 128 bit at 64 bit delphi?
Hi, There is one bcd number has 20 digit. But it doesn't fit to 64 bit. It needs 66 bit to store :/ Anyway I need to convert this 20 digit number to hex format. I mean, input is 20 digit bcd number as string, output should be hexadecimal number as string. What is the pratical way to do this? Thank you. Am 22.02.2012 19:20, schrieb Mehmet Fide: > Hi, > > There is one bcd number has 20 digit. But it doesn't fit to 64 bit. It > needs 66 bit to store :/ Anyway I need to convert this 20 digit number > to hex format. I mean, input is 20 digit bcd numbe...

is there a support for 128 bit at 64 bit delphi?
Hi, There is one bcd number has 20 digit. But it doesn't fit into 64 bit. It needs 66 bit to store. Anyway I need to convert this 20 digit number to hex format. I mean, input is 20 digit bcd number as string, output should be hexadecimal number as string. What is the pratical way to do this? Thank you. > {quote:title=Mehmet Fide wrote:}{quote} > Hi, > > There is one bcd number has 20 digit. But it doesn't fit into 64 bit. > It > needs 66 bit to store. Anyway I need to convert this 20 digit number > to hex format. I mean, input is 20 digit bc...

Delphi 64 bit / Future Direction of Delphi
I am responding to the various requests for 64 bit and the discussion about the future direction of Delphi. I have a small company - we write software for new and used auto dealerships - sales and finance - coming out with accounting now and parts and service in the next few years. Our customers don't care about 32 bit vs 64 bit, etc. They want me to provide simple and convenient solutions to make their jobs easier. We have stuck with Delphi 5 for many years - I should have upgraded 5 years ago but it did the job. We are now in the early stages of a significant up...

Excel 64-bit and Delphi 32-bit
Hi, Any known issues with using Excel 2010 64-bit with a Delphi 32-bit app (Delphi 2009) My app uses the ExcelXP TExcelApplication object and nothing real fancy. I basically opens Excel, gets a list of all the ranges, and then updates the cells. It works fine with Excel 2007 but I have one customer who is reporting problems and he has Excel 2010 64-bit. Also, is there a way for my app to determine if Excel is 32 or 64-bit so that I can log an appropriate message. -- Bob Small I think one the main points of the new Delphi 64-bit compiler was that it was required to be able...

XML for Delphi XE6 32-bit/64-bit
I am looking for a straight-forward no frills XML library or component that allows me to easily form an XML file and to parse it easily as a means to transfer text (could be long and lengthy) information back and forth between applications. I would appreciate any recommendation of such a resource. Or maybe XML is not a good option for my application? Thanking you all in advance. Andy Andy wrote: > I am looking for a straight-forward no frills XML library or component > that allows me to easily form an XML file and to parse it easily as a > means to transfer text (co...

Web resources about - Custom Component 64-bit suport - public.delphi.vcl.writing

Component - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

AirAsia disaster: Indonesia cites faulty component, crew response in crash
Pilots appear to have reset the computer system's circuit breaker, leading to a series of failures that caused them to lose control of the plane ...

Samsung announces big profits for Q3 2015, driven by components business
... So beneficial was the weakened won that it translated to quarterly gains of approximately 800 billion won ($705 million), primarily from component ...

Teardown of iPad Pro reveals revamped component layout
... Apple device teardown on the iPad Pro on Wednesday, revealing a reworked internal design dominated by massive batteries and bespoke audio components. ...

Japan follows US lead in banning certain Takata components
Filed under: Government/Legal , Safety , Japan Like the US, Japan will ban certain Takata's airbag inflators from vehicles in development, and ...

Samsung reportedly lost key iPhone 7 component business
... for Samsung , which is ironic considering the two companies are fierce rivals in the mobile business. The Korean giant produces various components ...

Crew, faulty component caused AirAsia crash
Indonesian investigators said crew action and a faulty component caused the AirAsia jet crash in the Java Sea last year, killing 162 passengers. ...

IDG Contributor Network: Four critical patches for November Patch Tuesday update core Windows and Office ...
Microsoft's November Patch Tuesday brings us four critical updates and eight important patches that attempt to resolve 54 reported vulnerabilities ...

Immigration Law Enforcement: A Vital Component Of National Security And Counterterrorism
While the administration claims that these refugees are being vetted, there is no way to actually screen these people

OLEDWorks finalizes acquisition of key parts of Philips OLED light source components business
OLEDWorks has announced that it has completed the acquisition of key OLED assets and relevant intellectual property from Royal Philips. Manufacturing ...

Resources last updated: 12/12/2015 12:45:30 AM