1. prasanth kalivarapu
  2. PowerBuilder
  3. Monday, 15 July 2019 06:16 AM UTC

Hi All

Migrating PowerBuilder application developed in 7.0 to appeon PowerBuilder 2019. I am having trouble with Dll's declared and used in external variables by having a reference to a DLL developed in VC98 using C++ language. 

What are the steps to make it work in Appeon PowerBuilder 2019, Do we have any documentation to proceed?

Thanks for your help.

Prasanth

Prasanth Kalivarapu Accepted Answer Pending Moderation
  1. Tuesday, 23 July 2019 11:36 AM UTC
  2. PowerBuilder
  3. # 1

Thanks for all the responses.

I was able to use old dll's by following both the practices mentioned above.

To Continue to use old dll's Alias is first point which i have added to make it ansi. Secondly I have used another function to convert code to unicode(2 bytes).

Example: 

Originally I had something like this as below:

Function long MyFunction(string szArgument) Library "MyDll.dll"

Updated to the below so as to use it with Migrated code.

Function long MyFunction(string szArgument) Library "MyDll.dll" Alias For "MyFunction;Ansi" progma_pack(1)

 

Thanks once again.

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Monday, 15 July 2019 20:33 PM UTC
  2. PowerBuilder
  3. # 2

Besides what Roland suggested, you need to take the C++ source code and re-compile it using Visual Studio 2017 or newer.  We have discovered some incompatibilities when customers use really old versions of VC because we are using newer version of Visual Studio to compile the C++ code of PowerBuilder 2017 and 2019.

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Monday, 15 July 2019 12:48 PM UTC
  2. PowerBuilder
  3. # 3

Starting with PB 10, all string and character variables are Unicode (2 bytes) as opposed to Ansi (1 byte).

To continue to use your older Ansi dll, you need to use the Alias clause with ;Ansi at the end. This tells PB to convert the string.

Function long MyFunction(string szArgument) Library "MyDll.dll" Alias For "MyFunction;Ansi"

 

Comment
  1. Michael Kramer
  2. Tuesday, 16 July 2019 02:11 AM UTC
PBVM internally uses UTF-16 so it is also different than UTF-8.

Beyond shift to Unicode there is also a "byte alignment" system option you need to consider.

  1. Helpful
  1. Roland Smith
  2. Tuesday, 16 July 2019 12:26 PM UTC
Yes, that can be an issue for passed structures.
  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.