Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Book 4-Appendices - <b>nnetpsarp()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NNETPSARP()
 Determines the available remote printers of a print server
------------------------------------------------------------------------------
 Syntax

     NNETPSARP(<cPServer>,[<cServer>|<nConId>]) --> aRemote

     Netware: 2.2 and 3.11

 Arguments

     <cPServer> Designates the name of the print server that is accessed.

     <cServer> Designates the name of the file server used to access
     <cPServer>.  The print server checks login information on <cServer>.
     Therefore, the access rights can depend on the specified file server.
     Your workstation must be attached to <cServer>.

     <nConId> Designates the connection ID of your workstation on
     <cServer>.

 Returns

     NNETPSARP() returns an array with subarrays (two-dimensional array).
     Each subarray contains information about an available remote printer.
     For the structure of the subarrays, see the following table:

     Table 27.3:  NNETPSARP() Subarray Structure
     ------------------------------------------------------------------------
     Position     Metasymbol     CTPS.CH   Definition
     ------------------------------------------------------------------------
     1            cName          ARP_NAME  Printer name
     2            nNumber        ARP_NUM   Printer number (0..15)
     3            nTyp           ARP_TYPE  printer type
     ------------------------------------------------------------------------

     If an error occurs, the function returns an empty array.

     For the printer type, the following values are possible:

     Table 27.4:  Printer Types
     ------------------------------------------------------------------------
     Value   CTPS.CH        Definition
     ------------------------------------------------------------------------
     7       PSP_REMLPT1    Remote printer on LPT1:
     8       PSP_REMLPT2    Remote printer on LPT2:
     9       PSP_REMLPT3    Remote printer on LPT3:
     10      PSP_REMCOM1    Remote printer on COM1:
     11      PSP_REMCOM2    Remote printer on COM2:
     12      PSP_REMCOM3    Remote printer on COM3:
     13      PSP_REMCOM4    Remote printer on COM4:
     ------------------------------------------------------------------------

 Description

     NOVELL NET AVAILABLE REMOTE PRINTERS
     Netware print servers can serve printers connected to a workstation
     (remote printers).  NNETPSARP() allows you to determine which remote
     printers of a print server are available.  The sample program
     RPRINTER.PRG demonstrates how to use NNETPSARP() for the emulation of a
     remote printer.

 Example

     Display the list of available remote printers for print server PSERVER:

     #include "ctnet.ch"

     aRemote=NNETPSARP('PSERVER')
     FOR i=1 TO LEN(aRemote)
        ? aRemote[i,ARP_NAME],aRemote[i,ARP_TYPE]
     NEXT i

See Also: NNETPSRRP()

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