Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Datatypes – PB Docs 2022 – PowerBuilder Library

Datatypes – PB Docs 2022

Datatypes

Datatypes like Long/Ulong need to be changed in order to support
64-bit.

LongPtr is not a full-fledged PowerBuilder data type because there
are no pointer operations in PowerBuilder. You can use it to hold/pass
window handles, database handles, and other objects that are essentially
memory addresses, but complex operations on LongPtr type might not
work.

In PowerBuilder 32-bit applications, LongPtr is the same as
Long/ULong, and you can use Long/ULong wherever LongPtr is required. In
64-bit applications, misuse of data types may lead to data truncation
(for example, from 8 bytes to 4 bytes) or memory corruption.

Follow the suggestions below to change Long/ULong to LongPtr or
LongLong for 64-bit applications:

  • If you are passing a Long ref variable when a LongPtr ref is
    required, change Long/ULong to LongPtr.

  • In complex operations that represent/compute 8-byte long
    integers, change Long/ULong to LongLong. LongLong is for 64-bit
    signed integers, from -9223372036854775808 to 9223372036854775807.
    Keep in mind that
    LongLong
    continues using literals
    as integers, but longer numbers are permitted.

  • When declaring PowerBuilder functions for using external APIs,
    if any of the following condition is met, change Long/ULong to
    LongPtr:

    • The PowerBuilder function uses Long or ULong to correspond
      with the pointer-type parameter or return value of an external
      API (that is, the functions’ source definition);

    • The PowerBuilder function uses Long or ULong to correspond
      with the 64-bit parameter or return value of an external
      API;

    • The PowerBuilder function uses Long or ULong to correspond
      with the Handle type return value of an external API.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x