1. MOHAN KRISHNA DEVARAPU
  2. PowerBuilder
  3. Wednesday, 23 January 2019 13:29 PM UTC

I have build my PB project using 64 bit and it is not working where I have build the same code with 32 bit it is working. Can some one will help in the regard. Do we need to import any files for 64 bit complaint. 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 24 January 2019 20:35 PM UTC
  2. PowerBuilder
  3. # 1

Hi Mohan;

     AFAIK I do not believe that the PFC is 100% 64bit compliant.


FWIW: I had to change my App framework to use the GlobalMemoryStatusEx command instead. However, when using that SDK method, you can use it with both 32 & 64bit Apps, as follows:

 

HTH

Regards ... Cris

Comment
There are no comments made yet.
MOHAN KRISHNA DEVARAPU Accepted Answer Pending Moderation
  1. Thursday, 24 January 2019 14:30 PM UTC
  2. PowerBuilder
  3. # 2

I am getting diffrent values from this function while executing from development version I am getting one value while executing from commandline prompt I am getting another value.

Comment
  1. Roland Smith
  2. Thursday, 24 January 2019 15:48 PM UTC
You need to change the definition of the structure. It should be:

unsignedlong dwLength

unsignedlong dwMemoryLoad

longptr dwTotalPhys

longptr dwAvailPhys

longptr dwTotalPageFile

longptr dwAvailPageFile

longptr dwTotalVirtual

longptr dwAvailVirtual

  1. Helpful
  1. Roland Smith
  2. Thursday, 24 January 2019 16:16 PM UTC
Plus dwLength will be different depending on app bitness. You need to call GetEnvironment and check the value of ProcessBitness. For 32bit it will be 32 and for 64bit it will be 56.
  1. Helpful
There are no comments made yet.
MOHAN KRISHNA DEVARAPU Accepted Answer Pending Moderation
  1. Thursday, 24 January 2019 14:21 PM UTC
  2. PowerBuilder
  3. # 3

After some investigarion I found some issue inthe pfc library casuing by below code. Do  I need to change the below for 64 bit build

//////////////////////////////////////////////////////////////////////////////
// Public Function:  of_GetPhysicalMemory
// Arguments:    none
// Returns:     long -  total memory
// Description:    Return the total physical memory (RAM) installed in the machine
//////////////////////////////////////////////////////////////////////////////
// Rev. History   Version
//       5.0   Initial version
//////////////////////////////////////////////////////////////////////////////
/*
 * Open Source PowerBuilder Foundation Class Libraries
 *
 * Copyright (c) 2004-2017, All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted in accordance with the MIT License
 * https://opensource.org/licenses/MIT
 *
 * ====================================================================
* This software consists of voluntary contributions made by many
 * individuals.  For more information on the Open Source PowerBuilder
 * Foundation Class Libraries see
 * https://github.com/OpenSourcePFCLibraries
*/
//
//////////////////////////////////////////////////////////////////////////////
os_memorystatus lstr_memory
//structure size is 8 ulong's or 8 * 4 bytes
lstr_memory.ul_length = 32
GlobalMemoryStatus(lstr_memory)
//bytes of virtual memory available
Return (lstr_memory.ul_totalphys)
Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 24 January 2019 00:21 AM UTC
  2. PowerBuilder
  3. # 4

A 64bit app uses a different set of runtime dll files. The 64bit runtimes are in:

C:\Program Files (x86)\Appeon\Shared\PowerBuilder\x64

 

This is not documented anywhere but PBD files can be shared between 32bit and 64bit exes.

 

Some Windows API functions will need to be changed to work in 64bit. Any argument that is described as a handle in the Microsoft documentation needs to be defined as longptr. A longptr compiles as long for 32bit and longlong for 64bit.

 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 24 January 2019 19:54 PM UTC
Hi Roland;

You are correct .. this is not documented currently but ... PBD's are bit neutral. I opened a ticket recently to clear this matter up in the PB documentation and "Build Run-time Library" dialogue to make this crystal clear.

Regards ... Chris
  1. Helpful
There are no comments made yet.
Mariano Collado @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 23 January 2019 22:04 PM UTC
  2. PowerBuilder
  3. # 5

Mohan,

Try the following.

1. Open Windows Search and search for "PowerBuilder Runtime Packager"

2. Run the PowerBuilder Runtime Packager

3. Select "PowerBuilder 64-bit Components"

4. Create the .MSI file

5. Run the .MSI file to install the PowerBuilder 64-bit Runtime

6. Attempt to run your 64-Bit PowerBuilder application.

Comment
  1. MOHAN KRISHNA DEVARAPU
  2. Wednesday, 23 January 2019 22:39 PM UTC
But I donot have rights to install .msi in the client PC. In general we do create one folder in client pc by application. and we copy .pbds /.exe files to that folder and we create a shortcut and we execute the shortcut using command line arguements. This process is working when i build the pb2017 in 32build. But it is crashing while trying to build using 64bit. I have obsevered some functions are calculating memory. I am not sure I need to modify these functions example:of_GetPhysicalMemory()
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 23 January 2019 14:34 PM UTC
  2. PowerBuilder
  3. # 6

Define 'not working'.

Are you running it on the same machine that you developed on?

A 64bit exe needs a 64bit database connection, maybe that is your problem.

Comment
  1. MOHAN KRISHNA DEVARAPU
  2. Wednesday, 23 January 2019 14:59 PM UTC
I have 64 bit client installed on my PC where I am trying to execute the short cut
  1. Helpful
  1. Roland Smith
  2. Wednesday, 23 January 2019 21:23 PM UTC
The problem is that 'it is failing' and 'it is not working' doesn't tell us anything. We don't know what your application does.



You'll need to be more specific about what is not working correctly.
  1. Helpful
  1. MOHAN KRISHNA DEVARAPU
  2. Wednesday, 23 January 2019 22:43 PM UTC
1. I build the the application using 32 bit and I copied .pbd and.exc into one local folder then I execute .exe using commandline arguemnts. It is working .

But I did the same by building application 64bit it is opening and disapprearing without any error. Here my concern is while building the pb2017 in 64 bit do I need to install new .pbds or dlls.

Note: We do use PFC framework. I have downloaded from appeon site PFC17.0.zip and imported all the librairies.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.