1. Kelly Amott
  2. PowerBuilder
  3. Wednesday, 18 May 2022 16:05 PM UTC

We recently migrated a 32 bit PB 8 app to 64 bit PB 19. Everything is looking good except for printing. The app generates "Error Number 14. Error opening DLL library pbvm80u.dll for external function...."

I have done a search on the error and it looks somewhat common but I'm having difficulty finding a specific solution. I see that the value for the DLL is hard coded in pfc_n_cst_platformunicode of pfcapsrv.pbl. 

// Dialogs
function long PFC_PrintDlg (ulong hwnd, ref s_printdlgattrib printstruct) library "pbvm80u.dll" alias for "PFC_PrintDlg;Ansi"
end prototypes

 

Is there a new DLL I should be using?

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 18 May 2022 19:32 PM UTC
  2. PowerBuilder
  3. # 1

Hi Kelly;

    Your problem looks like your App is using an outdated PFC as that NVUO and DLL are no longer used. You definitely need to grab the PB2019 version of the PFC IMHO.

Regards .. Chris

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 18 May 2022 18:23 PM UTC
  2. PowerBuilder
  3. # 2

You cannot use a 32-bit DLL for a 64-bit EXE, plus it is is possible their may be significant code changes you need to do to be compatible with 64-bit. https://docs.appeon.com/pb2021/migrating_32bit_applications_to_64bit/index.html

My suggestion is first upgrade from PB 8 to 2019 and continue to compile your project as 32-bit.  Once the upgrade to 2019 is successful, then you can have fun with 64-bit.

Keep in mind upgrading from PB 8 to 2019 will also require migration work, such as dealing with unicode conversion, PFC upgrade (as John pointed out), etc.  https://docs.appeon.com/pb2019r3/upgrading_pb_apps/index.html

Comment
  1. Kelly Amott
  2. Wednesday, 18 May 2022 18:32 PM UTC
Thanks Ameen. I'll try that out. We've got a good 2019/64 build with the print function being the only issue. We are putting the app in a Citrix environment which isn't print friendly anyway and will most likely advise the users to use the Export function of the app to get their reports. Meantime I'll see what I can get done with the 32 bit option.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Wednesday, 18 May 2022 19:26 PM UTC
That DLL you listed is most likely the problem or contributing factor... it isn't a 64-bit one supplied with PowerBuilder so I'm pretty sure it is a 32-bit one that is compatible with 64-bit .EXE that you are trying to do.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 18 May 2022 16:41 PM UTC
  2. PowerBuilder
  3. # 3

Hi, Kelly -

Instead of migrating a very old copy of the PFC libraries, you should consider using a newer version of them. There were several objects in the PFC that were either removed or modified when SAP removed support for the Solaris and AIX operating systems from PB, and also when PB went from ANSI to Unicode beginning in version 10.

While there has not been a huge amount of additions to the PFC, some nice additions have been made since the PFC was open-sourced. 

You can download a newer version (for PB 2017, 2019, and 2021 at GitHub:

   https://github.com/OpenSourcePFCLibraries

Regards, John

Comment
  1. Kelly Amott
  2. Wednesday, 18 May 2022 18:28 PM UTC
Thanks John. I'm learning the IDE as I go. I assumed it would be a simple drag and drop of the new to replace the old but when running a full build I am getting all kinds of errors now. Almost all are unknown variables and unknown functions. What is the correct procedure for deploying the new versions? I don't see a how-to for doing the updates.

Thanks for the quick reply.
  1. Helpful
  1. Olan Knight
  2. Thursday, 19 May 2022 14:45 PM UTC
Ummm, yeah. While changing the PFC libraries to a newer version SOUNDS like a great plan, and may be THE way to go, in reality it's a nightmare if your code was build using an older version. There are vast changes between the two sets of code.



Since you had good 64 bit code using the old PFC except for the print function, one approach would be be to look at updating the OLD PFC with code from the NEW PFC with regards to the printing. Do it one small step at a time until the printing works.



Then when you have time andless pressure, you can change the entire PFC and pound your way through the code changes.



JMHO, and YMMV.

:)
  1. Helpful
  1. John Fauss
  2. Thursday, 19 May 2022 15:47 PM UTC
You bring up several excellent points, Olan. I agree it might take a significant effort to upgrade the PFC libraries, particularly if the several of the old PFE-layer objects contain local extensions and/or overrides. If Kelly was migrating from a more recent version of PB & PFC, I wouldn't express the same level of concern. However, given that PB 8 came out 21 years ago (and his PFC libraries may even be older than that) and considering the breadth of changes that have occurred in Windows, in PB and in the PFC since then, I think it would be prudent to "bite the bullet" and upgrade the framework now rather than later. Kelly - Good luck with your app upgrade!
  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.