Highlighted
Absent Member.
Absent Member.
460 views

[archive] win$printer

[Migrated content. Thread originally posted on 31 January 2006]

When running on a client pc for a demo, we found that it had about 40 printers defined in its Windows XP. The initial call to win$printer as below:

CALL "WIN$PRINTER"
USING WINPRINT-GET-NO-PRINTERS,
WINPRINT-SELECTION,
GIVING W-RESULT.

did not return from the call - the system seemed to just hang. When many of the printers were deleted from XP (down to about twenty) then the problem disappeared.

Does anyone know if this is a know problem?

Keith
0 Likes
6 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] win$printer

My experience is that it is not the number of printers - it is if there are disconnected network printers in the list.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] win$printer

This was certainly the case. With a laptop this is also not that unusual. Is there a work around for this problem?

Keith
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] win$printer

By default, the runtime will try to identify all enlisted printers, assuming them to be at good health and connected. Unfortunately, as you have noticed, this is not always the case.
We do however assume this in the first case. What you may do, is to use a configuration variable;
WINPRINT-NAMES-ONLY
If this one is set to 1 (true), properties that require a physical connection are not fetched, but the name and port only.
Eventually, when you decide to use a printer, this one only will be attempted updated for its status. See documentation for further information.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] win$printer

Thanks for the tip - I will try that.

I have also noticed that the first time the run time is loaded, particularly on older slower machines, there is a significantly longer delay in getting my application up than subsequent loads of the run time - are there other activities that the run time is doing for me that I could stop if they are not required?

Keith
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] win$printer

Nothing particular that I can think of.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] win$printer

Using the WINPRINT-NAMES-ONLY works a treat - also has very significantly reduced my load time. Thanks.
Keith
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.