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

GlobalMemoryStatus returns 0 on 64-bit operating system – PB Docs 2022 – PowerBuilder Library

GlobalMemoryStatus returns 0 on 64-bit operating system – PB Docs 2022

GlobalMemoryStatus returns 0 on 64-bit operating system

Symptom

When deploying an application as 64-bit in PowerBuilder, calls to
the function GlobalMemoryStatus () will always return 0 for available
physical and virtual memory.

Environment

  • Any 64-bit Windows Operating System

  • PowerBuilder

Reproducing the Issue

Call the function GlobalMemoryStatus(), passing an appropriate
memory object, and read the values of memobject.ll_availphys and
memobject.ll_availvirtual. Both will be 0 on a 64-bit operating system
even when running the application in 32-bit.

Cause

The size of the structure passed to the API is 64-bits and this
data is not parsed correctly when stored in a 32-bit object’s
variables.

Solution

  1. You can redefine the GlobalMemoryStatus local external
    function and a new structure to pass to the function:

  2. Define a new structure to hold the data:

  3. Make sure the memory object’s ul_length variable equals 64
    before calling GlobalMemoryStatus():


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