1. Riccardo Pasqualetti
  2. PowerBuilder
  3. Tuesday, 31 January 2023 10:29 AM UTC

Hi everyone,

i have a pbx library to intercept sap event in my powerbuilder application.

I'm making migration my application to powerbuilder 2022

I have compiled my pbx in 32 environment and sdk pbini 2022, imported pbx into my application.

If i execute my application in 32 environment all  works fine.

Then I compiled pbx in 64 environment but if i execute my application (in 64 environment) i have an error from my pbx, PBINI exception

Maybe i'm doing something wrong in 64 build of my pbx?

If someone faced this issue kindly help me?

 

Umberto

Heiko Bergner Accepted Answer Pending Moderation
  1. Friday, 15 December 2023 14:04 PM UTC
  2. PowerBuilder
  3. # 1

Hello Riccardo,

I think I have the same problem. I also have a pbx library, that connects to the SAPbouiCOM.

In PB 2021 the pbx worked fine in 32 and 64 Bit. The 64 Bit pbx was compiled with VS2017 , the 32 Bit was even an older version.

Now with PB 2022 R2 the 32 Bit version still works, the 64 Bit version gets an exeption (in the PBX).

 

Did you solve your problem? What was the reason?

 

Best regards,

Heiko

Comment
  1. Chris Pollach @Appeon
  2. Friday, 15 December 2023 15:04 PM UTC
Hi Heiko;

FYI: PB 2021 was using the old VC++2010 MS compiler whereas PB 2022 R2 (and soon to be R3) are using the VC++ 2022 MS compiler.

There have been many C++ changes that 64 bit external API calls must abide by.

Regards .. Chris
  1. Helpful
  1. Heiko Bergner
  2. Friday, 15 December 2023 15:14 PM UTC
Hi Chris,

I compiled my PBX with VC++ 2022 but his did not solve the problem. And as far as I saw, there where no special warnings, that I use something;

that is not allowed anymore.



Regards, Heiko
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 15 December 2023 15:37 PM UTC
The changes need to be done in your PowerScript for 64 bit external API handling.
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 19 April 2023 20:16 PM UTC
  2. PowerBuilder
  3. # 2

If your PBX is making calls into a SAP DLL, they both have to be the same bitness.

Comment
There are no comments made yet.
Riccardo Pasqualetti Accepted Answer Pending Moderation
  1. Thursday, 13 April 2023 15:50 PM UTC
  2. PowerBuilder
  3. # 3

Hi Chris,

but when I compile my PBX for 64 bit environment, with Visual Studio 2022, do I have to use different settings than compiling in 32 bit? Or is it enough to change the platform from 32 to 64?

Thanks

Comment
  1. Roland Smith
  2. Thursday, 13 April 2023 16:54 PM UTC
Changing the platform to x64 and compiling should be all you need.

The only thing I noticed is that there isn't support for the longptr datatype. If you need to pass a handle from PB to C++, you'll have to use longlong and then copy it to a HANDLE variable in the C++ code.
  1. Helpful 2
  1. Riccardo Pasqualetti
  2. Wednesday, 19 April 2023 15:36 PM UTC
Thanks Roland,

using longlong datatype the problem seems resolved

But longptr was supported in Pb 2019 becuse my PBX didn't have problems. So is PB 2022 that dont support anymore longptr?



Anyway, thank you very mach Roland for you support.
  1. Helpful
  1. John Fauss
  2. Wednesday, 19 April 2023 16:00 PM UTC
PB supports Longptr datatype, but PBNI does not, I believe. That is why Roland suggested using the LongLong datatype.
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 31 January 2023 16:36 PM UTC
  2. PowerBuilder
  3. # 4

I have created several 64-bit PBX files and they work fine with a 64-bit PB executable.

Are you sure you paired the 64-bit PBX with the 64-bit EXE?

For running in the PB 2022 IDE I created a second copy of the target and put the 32-bit PBX in one target folder and the 64-bit PBX in the other folder. That way I can run both in the IDE.

Note that the 'Import PB Extension' option only has to be done once, usually with the 32-bit PBX while the IDE is 32-bit.

I can take a look at it if you get me the VS solution and a sample app.

Comment
There are no comments made yet.
Riccardo Pasqualetti Accepted Answer Pending Moderation
  1. Tuesday, 31 January 2023 16:11 PM UTC
  2. PowerBuilder
  3. # 5

Hi Chris,

the same PBX works compiled with SDK PBINI PB2019 in 32 and 64bit

Now I simply compiled PBX change include in C++ project using SDK PB2022

PBX compiled 32bit works, compiled 64 doesn't works

Must change somethings in c++ project before compiling?



Thanks

Riccardo

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 31 January 2023 22:06 PM UTC
Ahhh .. that is because the old PB version(s) were compiled with VC++ 2010 whereas the new PB 2022 is built & compiled using VC++ 2019. Thus, the "C" compiler differences are not compatible any longer (ny best guess). You would need a newer PBX that is compliant with VC++ 2019 64 bit compiler options.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 31 January 2023 13:49 PM UTC
  2. PowerBuilder
  3. # 6

Hi Ricardo;

  Yes, PBX's a bitness specific. So it seems that you're restricted to the 32bit realm for now with that old SAP PBX. 

Regards ... Chris 

Comment
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.