[Migrated content. Thread originally posted on 20 August 2009]
Problem:We have a nagging problem when our clients install a new desktop, laptop etc to the network and start our application.
Our startup programs first step is to issue the following:
CALL "WIN$PRINTER" USING
WINPRINT-GET-NO-PRINTERS
WINPRINT-SELECTION
GIVING CALL-RESULT.
Then search the default printer and place this printer name onto the status bar.
The problem with this call is that it assumes there have been printers added under the windows "printers and faxes" area.
Well, if infact there are no printers assigned the Acuruntime aborts with a memory access violation and terminates.
My question is, is there a way to first check to see if there are any printers out there before I issue this call, so we don't get the Memory Access violation and I could submit our own message with aborting ?
Thank you;
Alex



