Skip to main content

[archive] New desktop no have been added to it yet

  • August 21, 2009
  • 2 replies
  • 0 views

[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

2 replies

[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
This is an old bug, and should be okay as of version 8.0.0.
If you are receiving this error on version 8.0.0 or later, please report to tech support.

You could check out the registry for installed printers.

[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
Thank you, that is what Acucorp support has said, I am going to test this out on our 8.1 runtime.