64-bit Windows Applications

Create 64-bit native application in PowerBuilder Classic. To build a 64-bit application, select the platform in the Project painter General tab.

If you need to deliver both 32-bit and 64-bit versions of your application, you should use separate projects and separate folders for the deploy output.

There is no IDE for 64-bit development. Design time uses the same 32-bit interface and 64-bit features display at runtime when you deploy the application. When you click the running man button, the project runs as a 32-bit application.

32-bit remains the default for new and upgraded applications. During the deploy process, PowerBuilder checks and reports unsupported features used in the application.

New Property for Environment Object

The new ProcessBitness property identifies whether the application is a 32-bit or 64-bit process.

  • Datatype -- integer

  • Values -- 32 stands for 32-bit, and 64 stands for 64-bit

See the section called “Environment object” in Objects and Controls for more about the Environment object. See the section called “GetEnvironment” in PowerScript Reference to read about the GetEnvironment function.

New Datatype

The longptr datatype is 4 bytes in the 32-bit platform and 8 bytes in the 64-bit platform. In the 32-bit platform, longptr is the same as long; you can continue using long where longptr is required in 32-bit applications. In 64-bit applications, using long to hold longptr variables will lead to data truncation from 8 bytes to 4 bytes, or memory corruption if you pass a long ref variable when a longptr ref is required. If you want to move to 64-bit, use longptr wherever required. It does no harm to 32-bit.

Since PowerBuilder does not have a datatype corresponding to the C++ pointer type, and there are no pointer operations in PowerBuilder, longptr is not full-fledged PowerBuilder datatype. You can use it to hold/pass window handles, database handles and other objects that re essentially memory addresses. Doing complex operations on longptr type might not work. If you want to represent/compute 8-byte long integers, use longlong.

System Requirements

The design time environment requires:

  • Windows SDK for Windows 7 or later

  • .NET Framework 4.0 or later

  • 64-bit Windows OS to test (development requires 32-bit only)

The runtime environment requires:

  • 64-bit Windows OS

  • PowerBuilder 12.6 64-bit system files

  • 64-bit third-party libraries, such as database drivers and external dlls

  • Greater than 4GB physical memory to avoid performance issues

Limitations

  • To consume Web services, you must use the .Net engine. EasySOAP is not supported

  • You can use OLE and ActiveX components in your applications, but you must use the 32-bit versions in the PowerBuilder Classic IDE. At runtime you must have the correct 64-bit ActiveX components installed.

  • The RichText DataWindow header does not display when the HeaderFooter property is true until you call ShowHeadFoot(true). If you do not:

    • Selecttext (long ll, long c1, longl2, long c2, band b Header!) returns 0 and selected text is "" (string with 0 length)

    • Selecttext (long ll, long c1, long l2, long c2, band b Footer!) returns 0 and selected text is "" (string with 0 length)

  • Scrolling in a RichText DataWindow loses focus

  • CopyRTF(false,header!) works only when you call ShowHeadFoot(true) when Header/Footer is true

  • InsertDocument("*.htm", true) returns -1

  • InsertDocument("*.doc", true) returns -1

  • Position returns the header when the footer is in focus

  • SaveDocument(string f,{FileTypeDoc!|FileTypeHTML!|FileTypePDF!}) returns -1 and FileExists event is triggered

Unsupported Features

  • COM+ runtime

  • Machine code generation

  • TabletPC

  • PBNI SDK for developing 64-bit PowerBuilder extensions

  • DataWindow RichText style column

  • DataWindow Web control for ActiveX

  • Status bar

  • Grid table

  • ClearAll() function

  • Clear(true) function

  • Change Pointer does not work on RichTextEdit controls

  • Mouse wheel does not scroll on a RichTextEdit page

  • Application server support

NOTE: If you select Properties in the RichTextEdit Object Dialog popup menu, the application crashes if you select the Print Spec tabpage and click OK.

Behavior Differences

The RichText preview mode behaves differently; in 64-bit, it is more like a print preview

PowerBuilder Native Interface (PBNI)

You can only use 32-bit PowerBuilder extensions in the PowerBuilder Classic IDE. For runtime, package and distribute 64-bit extension libraries with your 64-bit applications. The file names of your 64-bit extension should match the 32-bit file names, since the application references it by file name.

OrcaScript

To build 64-bit native applications with OrcaScript, use the new X64 option to build executable commands.

Syntax:

build executable <exeName> < iconName> <pbrName> <pbdflags> <machinecode> <newvstylecontrols> x64