1. Jason Schultz
  2. PowerBuilder
  3. Wednesday, 4 January 2023 21:53 PM UTC

After upgrading from PB2019R2 to PB2022 (build 1878) and migrating our source code, we've experienced some difficulties / inconsistencies between running our application via the IDE (in x64 mode) vs. a complied/deployed .exe (64-bit).

When running within the IDE, we didn't experience any runtime issues. Attempting to run our deployed .exe, we got application errors. Troubleshooting the issue identified a number of Windows API calls in our code where the parameter values needed to be changed from Long to LongPTR and/or Long to ULong. We're in the process of idenfiting all the API calls and we're going to refactor our code to use any unicode version (if applicable).

While troubleshooting the above behavior, we did reach out to Appeon customer service and was told the PB2022 IDE and a PB2022 deployed .exe rely on the same runtime engine. If that's the case, why do we see the difference in behavior? Just trying to get a better understanding of what we're experiencing. 


Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 11 January 2023 16:24 PM UTC
  2. PowerBuilder
  3. # Permalink
Hi Jason; That is probably because you started deploying PB Apps in 64 bit mode using PB 12.6 which was built using Microsoft C++ version 2010. The same for PB 2017 through 2021 (C++ 2010). However PB 2022 is now built using Microsoft C++ version 2019 and that MS version has stricter requirements. Regards ... Chris
There are no comments made yet.
kitty he @Appeon Accepted Answer Pending Moderation
  1. Thursday, 12 January 2023 05:45 AM UTC
  2. PowerBuilder
  3. # 1

Hi Jason,


When running 64-bit in the IDE, the PowerBuilder 64-bit debugging service is used to communicate between the 64-bit PBVM and the IDE. When running the exe, it directly communicates with the 64-bit PBVM.


So for the issue you have, we need a test case to debug the issue. Please open a ticket at https://www.appeon.com/standardsupport/newbug and provide a small case that can reproduce the issue for us to further analyze it.




There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 5 January 2023 16:43 PM UTC
  2. PowerBuilder
  3. # 2

Hi Jason, You definitely need to change Long to LongPTR and/or Long to ULong... that is requirement of 64-bit migration along with other code changes may be required to properly move to 64-bit.  

Migrating a project from 32-bit to 64-bit is really a migration.  Please refer to the 64-bit migration guide: https://docs.appeon.com/pb2022/migrating_32bit_applications_to_64bit/index.html

As far as it working in the PB IDE, when you are running in the PB IDE did you set the dropdown to x64?  By default, the PB IDE will run the app as 32-bit in PB 2022 and in PB 2019 R2 it only could run as 32-bit (64-bit not supported)  so that might explain the difference you are seeing.


  1. Armeen Mazda @Appeon
  2. Thursday, 5 January 2023 16:54 PM UTC
Hi Miguel, It uses the exact same runtime DLLs so theoretically should not be different. So other than the app is not really running as 64-bit in PB 2022 (because back in PB 2019 R2 it only ran 32-bit in the IDE) I can't think of anything else.
  1. Helpful 1
  1. Jason Schultz
  2. Thursday, 5 January 2023 19:52 PM UTC
Thanks for the input. Our code is approx. 20 years old. Back in 2015 we started deploying 64-bit .exe only, and have incremented through all the PB versions over time. We've never experienced any issues with the the older Windows API calls until attempting to compile/deploy with PB2022.

When running within the 2022 IDE, I'm selecting 'x64' from the dropdown and can run the application just fine. It's an oddity since you would expect consistent behavior between the IDE and deployed.

As mentioned in my original post, we're in the process of identifying/revising all the API calls needing enhanced and will re-visit deploying with PB2022 then. For now, we've had to revert back to using PB 2019R2.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 5 January 2023 20:33 PM UTC
I think Chris may be right, but still I can't guess why it would work in the PB IDE. Anyway, your plan sounds good to revert back to PB 2019 R2 until you can do proper migration of the code for 64-bit compatibility.
  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.