![[About]](r:\html\lsrxabout.gif)
![[Toc]](r:\html\lsrxtoc.gif)
0.9b (c) 1995 Peter Childs
The function retrieves information about a particular shared resource on a server.
Syntax
MyRc = NetGetInfo(NETSHARE, 'shareInfo', SrvName, NetworkName)
Parameters
The parameters specified are:
'shareInfo' The REXX variable receiving the result. The variable is
divided into:
o shareInfo.netname
The network name of the resource
o shareInfo.type
The share type (For example Serial Device)
o shareInfo.remark
The share remark
o shareInfo.permissions
The shareInfo.permissions is used only for DLS and DLR applications
and ignored for OS/2 applications. The meaning of this field depends
on which type of resource is in query.
If shareInfo.type is "Disk Drive", this field can be any combination
of the following permissions, except for ACCESS_READ + ACCESS_CREATE.
These are defined as follows:
Value Meaning
----- -------
1 Permission to read data from a resource.
2 Permission to write data to a resource.
4 Permission to create an instance of the resource
(such as a file). Data can be written to the
resource as the resource is created.
If shareInfo.type is "Spooler Queue", the shareInfo.permissions
parameter specifies the form control at the end of a print job. These
are defined as follows:
Value Meaning
----- -------
2 The printer will not be sent a command at the
end of any print job to position to the top of
the page.
4 An attempt is made to determine whether a form
feed is needed for a print job. If the last 64
bytes of the file contain no form feed command
or follow a form feed command with printable
characters, a form feed command is issued to the
printer.
32 A form feed command is issued to the printer at
the end of each print job to position to the top
of the next form (default).
Note:
DLS and DLR does not support sharing of serial devices. In some
circumstances, however, COM devices, such as COM1, can be shared as
print devices; for example, if operating in synchronous communication
mode, such as with a serial printer
o shareInfo.max_uses
The maximum number of concurrent connections that the shared resource
can accommodate
o shareInfo.current_uses
The number of connections that are currently made to the resource
o shareInfo.path
The local path name of the shared resource. For disks, it is the path
being shared. For spooler queues, it is the name of the spooler queue
being shared. For serial device queues, it is a string of one or more
communication device names separated by spaces (For example, COM1
COM2)
SrvName The server computer name
NetName The network name
Note
The server computer name can be specified as '' for a local server.
Example
/* Get share information */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETSHARE = 190 SrvName = '\\FSC30DCR' NetworkName = 'FORALL' myRc = NetGetInfo(NETSHARE, 'shareInfo', SrvName, NetworkName) if myRc <> '0' then do say 'Got error from NetGetInfo() ' myRc call DropLsRxutFuncs exit 9 end say say 'Network name: ' shareInfo.netname say 'Share type: ' shareInfo.type say 'Comment: ' shareInfo.remark say 'Maximum uses: ' shareInfo.max_uses say 'Current uses: ' shareInfo.current_uses say 'Local resource path: ' shareInfo.path call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit 0
Example Output
Network name: FORALL Share type: Disk Drive Comment: For all users Maximum uses: 45 Current uses: 1 Local resource path: D:\APPS\BOOKS
Inf-HTML End Run - Successful