Scans all connections using a specified file
#include <nwfile.h>
or
#include <nwcalls.h>
N_EXTERN_LIBRARY(NWCCODE) NWScanConnectionsUsingFile (
NWCONN_HANDLE conn,
NWDIR_HANDLE dirHandle,
const nstr8 N_FAR *filePath,
pnint16 iterHandle,
CONN_USING_FILE N_FAR *fileUse,
CONNS_USING_FILE N_FAR *fileUsed);
uses calwin32
Function NWScanConnectionsUsingFile
(conn : NWCONN_HANDLE;
dirHandle : NWDIR_HANDLE;
filePath : pnstr8;
iterhandle : pnint16;
Var fileUse : CONN_USING_FILE;
Var fileUsed : CONNS_USING_FILE
) : NWCCODE;
(IN) Specifies the NetWare server connection handle.
(IN) Specifies the directory handle associated with the desired directory path. Use the DOS namespace as input parameter for the full path of filename, when the directory handle is 0.
(IN) Points to a full file path (or a path relative to dirHandle) specifying the file to be checked (wildcards are not allowed).
(IN/OUT) Points to the next record to be scanned (0 initially).
(OUT) Points to the CONN_USING_FILE structure.
(OUT) Points to the CONNS_USING_FILE structure.
These are common return values; see Return Values (Return Values for C) for more information.
You must have console operator rights to call NWScanConnectionsUsingFile.
Upon each subsequent call, the number of the next record to be scanned is returned in the iterHnd parameter. This value should not be changed during the scan. NWScanConnectionsUsingFile returns 0xFFFFFFFF upon completion.
If no connections are using the specified file, the structure returned by the fileUsed parameter will contain zeroes. Check the connCount parameter in the returned structure to see the number of connections actually using the file.
If the fileUse parameter is NULL, the records are returned in the fileUsed parameter in groups, instead of one at a time.
Use the DOS namespace as input parameter for the full path of filename, when the directoryhandle is 0.