Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_capget( <cdevice>|<ndevice>, http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_CAPGET( <cDevice>|<nDevice>,
          <cAttribute1>|<nAttribute1> [, @<Memvar1> 
       [, <cAttribute2>|<nAttribute2>, @<Memvar2>... ] ] )
-- or --
N_CAPGET(<cDevice>|<nDevice>, <aAttribute>, <aSetting>)


Parameters

<cDevice> -- or -- <nDevice>
Capture device name or number. Valid names are LPT1 to LPT3. Use "LPT*" 
to refer to the default capture device (usually LPT1). Valid numbers 
are 0 through 3, where 1 stands for LPT1, 2 for LPT2, and 3 for LPT3. 
Use 0 to refer to the default capture device.

Note  Before you refer to the default device by using LPT* or 0, 
you must first have set the default device with N_CAPDFLT().

<cAttribute> -- or -- <nAttribute>
Attribute to read. May be passed as a text string or as a numeric 
value. See the table below for a list of capture attributes.

@<Memvar>
Memory variable to receive the information. If you pass only one 
attribute to read, you need not pass a memory variable to receive the 
information; instead, you can get it as a return value. See the 
Examples below.

<aAttribute>
An array containing the names or numbers of the attributes you wish to 
read. This is an alternative to passing a series of attribute/ memory 
variable pairs.

<aSetting>
An array to receive information for the attributes listed in the 
corresponding array <aAttribute>.

The number of elements in <aSetting> must be equal to or greater than 
the number of elements in <aAttribute>, or trailing values will be 
lost. For Example, if <aAttribute> has ten elements and <aSetting> 
has only seven, then attributes eight, nine, and ten will not be stored 
in the receiving array.

Clipper 5.x   If <aSetting> is initialized to zero elements, the 
function will automatically set it to the correct resize.


Returns

The function Returns the value of the last or only attribute in the 
list.

It is possible to call the function with only two Parameters, 
omitting @<Memvar>, and obtain the information desired as a return 
value.


Description

Stores information about the specified capture device into memory 
variables. You can include as many attribute/memory variable pairs as 
needed. Reading several attributes in a single call is more efficient 
than repeated calls to N_CAPGET().

Attributes may be specified by name or number. Attribute numbers are 
defined as manifest constants in CAPTURE.CH. Using constants or their 
literals will give slightly better performance than using names.

Text          #define             Attribute
AUTOEND       CAP_AUTOEND         Auto end capture
BANNER        CAP_BANNER          Print banner
COPIES        CAP_COPIES          # of copies
CPL           CAP_CPL             Characters per line
FNAME         CAP_FNAME           Name of form
FORMNO        CAP_FORMNO          Form type (class)
JOBNO         CAP_JOBNO           Job number
LPP           CAP_LPP             Lines per page
NOFF          CAP_NOFF            No form feed
NOTIFY        CAP_NOTIFY          Job completion notify
PRINTER       CAP_PRINTER         Network printer
QUEUE         CAP_QUEUE           Queue
RESET         CAP_RESET           Printer reset string
RESETMAX      CAP_RESETMAX        Reset string max
SERVER        CAP_SERVER          Server with the queue
SETUP         CAP_SETUP           Printer setup string
SETUPMAX      CAP_SETUPMAX        Setup string max
STATUS        CAP_STATUS          Capture status
TABS          CAP_TABS            Tab expansion count
TIMEOUT       CAP_TIMEOUT         Timeout (seconds)
USER          CAP_USER            Banner user name

All documents spooled to the device are affected by the settings for 
these attributes. The data types and meanings of the attributes are 
given below.

AUTOEND
Logical. True if AutoEndCap is On, false if it is Off. See N_CAPSET() 
for a Description of AutoEndCap.

BANNER
String (1-12 characters). Text for banner page. A null string means 
that a banner page will not be printed.

COPIES
Numeric (1- 99). The number of copies that will be printed.

CPL
Numeric. The maximum number of characters per line of the printed page.

FNAME
String (1-12 characters). Generally, but not necessarily, corresponds 
to the most recently specified PRINTCON form name. Because PRINTCON 
forms do not always have names, it is best to get the form type from 
the FORMNO attribute.

FORMNO
Numeric. Most recently specified form type. This generally corresponds 
to a PRINTCON form type.

JOBNO
Numeric. This is the job number that will be assigned to the print job 
when it is queued by the Queue Management System. The job number is 
assigned as soon as the first byte of print output has been captured. A 
value of zero means either that capture is not active or, if it is 
active, that data has not yet been sent to the print device.

LPP
Numeric. The maximum number of lines per page.

NOFF
Logical. False is the normal setting and means that NetWare will 
generate a page eject at the end of each print job. (This is in 
addition to any page ejects contained in the job itself.) A setting of 
true means no trailing form feed-that is, NetWare will not generate a 
page eject at the end of each print job.

NOTIFY
Logical. True means that the print server will send a broadcast message 
notifying the user when a print job is done. False means that this 
feature is Off.

Note  Not all printers support NetWare's print notify option.

PRINTER
Numeric. Number of the target printer.

QUEUE
String. Name of the print queue on which print output from the 
specified device is spooled. 

RESET
String. Printer reset buffer. Since this often contains binary data, 
you can use CH_HEXFMBIN() to convert it to a hexadecimal string.

RESETMAX
Numeric. Maximum size in bytes of the printer reset buffer.

SERVER
String. Name of the server with the queue.

SETUP
String. Printer initialization buffer. The maximum length of the string 
is the value of attribute SETUPMAX.

SETUPMAX
Numeric. Maximum size in bytes of the printer initialization buffer.

STATUS
String. Capture status is set to "A" if network capture is active. "L" 
means the device is set to local capture.

TABS
Numeric. Number of spaces that will be substituted for each tab 
character (I or ASCII 9). Zero means that there will be no tab 
expansion.

TIMEOUT
Numeric. Printer timeout value in seconds. If the program does not 
generate print output for this number of seconds, the network will 
assume that the document is complete and will place the job in the 
queue.

USER
String (1-12 characters). User name that will appear on the banner 
page, in addition to banner text, if a banner page is generated.


Examples

LOCAL cBanner := cQueue := nTimeout := NIL
LOCAL aAttribute[3], aSetting[3]

// Using attribute names
N_CAPGET('LPT1',              ;
         'BANNER', @cBanner,  ;
         'QUEUE', @cQueue,    ;
         'TIMEOUT', @nTimeout )

// Using attribute numbers
#include 'CAPTURE.CH'
N_CAPGET(1,                    ;
         CAP_BANNER, @cBanner, ;
         CAP_QUEUE, @cQueue,   ;
         CAP_TIMEOUT, @nTimeout)

// Multiple calls
cBanner = N_CAPGET('LPT1', 'BAN')
cQueue = N_CAPGET('LPT1', 'QUE')
nTimeout = N_CAPGET('LPT1', 'TIM')

// Using arrays
#include 'CAPTURE.CH'
aAttribute[1] = CAP_BANNER
aAttribute[2] = CAP_QUEUE
aAttribute[3] = CAP_TIMEOUT
N_CAPGET(1, aAttribute, aSetting)

Files
CAPTURE.CH



See Also: N_CAPDFLT() N_CAPSET() N_QJGET()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson