Highlighted
Absent Member.
Absent Member.
415 views

[archive] WIN$PRINTER on Win XP not working

[Migrated content. Thread originally posted on 12 January 2011]

We have a client that upgraded from Acu Runtime 7.2.2 to Acu 8.1. In our software we capture the CTL-P key press to print the screen to the default printer. I have debugged this and when the WIN$PRINTER is executed a return code of 0 (zero) is returned from WIN$PRINTER. This code is returned whenever WIN$PRINTER is called on a machine that is not a Windows machine. Obviously it is a Windows computer, Windows XP with latest patches installed.

What dll is WIN$PRINTER in from AcuCorp?

Here is the code were it is blowing up:

CALL "WIN$PRINTER" USING WINPRINT-GET-NO-PRINTERS
WINPRINT-SELECTION
GIVING CALL-RESULT.
The client does have printers installed that are not actually connected to the workstation, could this be the actual error?

Does anyone have any ideas

Thanks, Jim Whalen
0 Likes
5 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] WIN$PRINTER on Win XP not working

Hi Jim,

Try turning on WINPRINT_NAMES_ONLY before the call to get-no-printers.

SET ENVIRONMENT "WINPRINT-NAMES-ONLY" TO 1.

Then set it back to zero when you want to get detailed information about the printer.

See the graphprn.cbl sample program for details.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] WIN$PRINTER on Win XP not working

Does this happen on any XP installation, or this workstation in particular?

It should not matter whether there are remote printers. I assume they have local printers as well?

Does it reproduce with any of the example programs provided, like the one Doug suggests? (graphprn.cbl, prndemox.cbl)
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] WIN$PRINTER on Win XP not working

Well the funny thing about this is we have 2 different versions of our software installed on this WIN XP machine. The old version is using the 7.2 version of the runtime and the New version is using the 8.1 version of the runtime. The old version works fine but the new version does not work.

What version of the .Net framework does Acu runtime 8.1 require?

The actual program issueing the WIN$PRINTER call has not changed between the different versions.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] WIN$PRINTER on Win XP not working

If the runtime starts, then the version of the .Net framework is not the issue. There is no use of .net in the printing routine.

Have you tried one of the standard sample programs?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] WIN$PRINTER on Win XP not working

I don't know if it makes any difference, but there are different set of Microsoft DLL's used for 7.2 versus 8.1. Have you installed the different set with the appropriate runtime?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.