1. Olan Knight
  2. PowerBuilder
  3. Tuesday, 23 June 2020 16:57 PM UTC

PB v12.1, b6158
Windows 10, 64 bit platform - this is a VM with 12 GB RAM


This is a non-PFC utility.
This code has been working forever. Until today.

STRING                             &
    ls_printer_detail_array,    &
    ls_printer_detail_printer_name, ls_ver, ls_title
    
ls_printer_detail_array             = PrintGetPrinter()
ll_position                              = PosA  (ls_printer_detail_array, "~t")
ls_printer_detail_printer_name = LeftA (ls_printer_detail_array, ll_position - 1)


I'm running in the IDE in DEBUG mode.
When the line in blue is executed, the entire IDE abends - it just vanishes.
I did a Full Build on the utility before starting the DEBUG session.

Q:  Any idea why this is occuring, and how to fix it?


Thank You,

Olan

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 23 June 2020 18:48 PM UTC
  2. PowerBuilder
  3. # 1

Hi Olan, Can you reproduce this problem with PB 2017 R3 or PB 2019 R2?  These versions support Windows 10.

Comment
  1. Olan Knight
  2. Tuesday, 23 June 2020 22:51 PM UTC
TODAY is the day I started migrating our various apps and utitiles over to PB2019R2 b2328!

YAY that this is finally happening.

When this utility is migrated, I'll try it. Good idea.



Thanks,

Olan
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Tuesday, 23 June 2020 23:32 PM UTC
Glad to hear you are moving forward!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 23 June 2020 17:22 PM UTC
  2. PowerBuilder
  3. # 2

Hi Olan;

  That is weird but it could certainly be an issue on W10 as PB 12.x was not really designed & tested for that O/S.

  My workaround suggestion would be to use the MS-Windows Printer API(s) instead.

For example (external declaration):

  • FUNCTION boolean GetPrinter (ulong hPrinter, ulong Level, ref Byte pPrinter, ulong cbBuf, ref ulong pcbNeeded)     LIBRARY "winspool" ALIAS FOR "GetPrinterW"

HTH
Regards ... Chris

Comment
  1. Olan Knight
  2. Tuesday, 23 June 2020 20:18 PM UTC
Thank you, that has a LOT of information in it!

By the way, I very much appreciate your time and effort!



Sadly, the process in the article uses PrintGetPrinter() in order to get the name of the printer for which the status will be found. Still, there's lots of good info, maybe I can use that to kludge my way to victory!



Thank You Again,



Olan

  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 23 June 2020 20:29 PM UTC
Best of luck Olan .. fingers crossed for you!

Maybe if your good ... Santa will bring you PB 2019 Rx for "Chris"tmas. ;-)
  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.