
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> capresstrget() / capresstrset()</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
CapResStrGet() / CapResStrSet()
------------------------------------------------------------------------------
Purpose:
Get / set the capture reset string.
Syntax:
lpszString=CapResStrGet( iLPTNum )
lpszString=CapResStrSet( iLPTNum, lpszNewStr )
Parameters:
iLPTNum The LPT device. 1=LPT1: 2=LPT2: 3=LPT3:
lpszNewStr The new reset string.
Returns:
A character string of length 16.
Description:
CapResStrGet() returns the reset string for the specified LPT device
iLPTNum. The printer reset string normally consists of a series of escape
codes sent to the printer from the calling workstation after each print
job to change the printer settings.
CapResStrSet() sets the specified reset string to lpszNewStr for the
specified LPT device iLPTNum and returns the previous reset string.
Both functions return an empty string if an error occurs. The length of the
reset string is controlled by the workstation shell and defaults to a
maximum of 16 characters in length. To increase the length of the reset
string, include the line:
PRINT TAIL=<length>
in the workstation's SHELL.CFG file.
Example:
// To reset an HP Laserjet compatible printer to its default
// settings after each captured print job sent to LPT1:
lpszResetString = chr(27)+"E"
// ESC E is the reset code for HP LaserJet printers
CapResStrSet( 1, lpszResetString )
if( NWErrorGet() = 0 )
? "The HPLaserJet being captured to on LPT1 will be "
? "reset after each print job"
endif
Notes:
If an empty string is returned, check NWErrorGet().
See Also: CapSetStrGet() / CapSetStrSet()
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson