Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
ianb Absent Member.
Absent Member.
1905 views

WIN$PRINT and Undefined Tray Number Values

Hi,

I was just wondering if anyone has done any work trying to interpret WINPRINT-MEDIA-TRAYS values over 255?  These are the user-defined values, which probably mean something to the author of the printer driver, but are meaningless to an end-user without some sort of text description.

Yours hopefully,

Ian

0 Likes
4 Replies
Micro Focus Expert
Micro Focus Expert

RE: WIN$PRINT and Undefined Tray Number Values

There was a discussion related to this on this forum .. see community.microfocus.com/.../6265.aspx

Hopefully that will help.

0 Likes
ianb Absent Member.
Absent Member.

RE: WIN$PRINT and Undefined Tray Number Values

Thanks for the reply, but it doesn't really help me much.  I was hoping someone could share how they have actually done it - from the ground up.  For example, how do you interact with any Windows API?  Is it a call to a DLL as described in section 3.3 of "A Guide to Interoperating with ACUCOBOL-GT"?

We deploy solely on Linux hosts, so our experience with Windows and Windows programming is very limited.  i.e. we need hand-holding 😛

0 Likes
PHenskens Absent Member.
Absent Member.

RE: WIN$PRINT and Undefined Tray Number Values

Hello Ian,

I might have the answer for you, a UK customer also tried getting at paper tray numbers >255 and get their description etc. through calling the appropriate Windows API but they didn´t succeed so they went the Turbo Pascal route and wrote a Turbo Pascal program that collects all useful printer data and writes it into a text file that they then open in an Acucobol program and read through.

I have the Turbo Pascal source and copy files and the executable and told me that I was free to distribute it to other Acucobol users.  There are now at least 2 other companies using it with great satisfaction.

I can´t upload the file as it is  bigger than 64 KB but you can download it for some time form my Dropbox via the below link:

https://dl.dropboxusercontent.com/u/29099462/ExtendAndAcucobol/ColBins.zip

in the Colbins.txt you´ll have some example code on how to read through the sequential file with printer(tray) info produced by colbins.exe.

Please let me know if it works for you.

Best regards,

Piet

0 Likes
ianb Absent Member.
Absent Member.

RE: WIN$PRINT and Undefined Tray Number Values

Thanks Piet - I'll have a good look at it.

Cheers,

Ian

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.