NWScanConnectionsUsingFile

Scans all connections using a specified file

NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:File System

Syntax

   #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);
   

Delphi Syntax

   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;
   

Parameters

conn

(IN) Specifies the NetWare server connection handle.

dirHandle

(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.

filePath

(IN) Points to a full file path (or a path relative to dirHandle) specifying the file to be checked (wildcards are not allowed).

iterHnd

(IN/OUT) Points to the next record to be scanned (0 initially).

fileUse

(OUT) Points to the CONN_USING_FILE structure.

fileUsed

(OUT) Points to the CONNS_USING_FILE structure.

Return Values

These are common return values; see Return Values (Return Values for C) for more information.

0x0000

SUCCESSFUL

0x8801

INVALID_CONNECTION

0x88FF

NWE_REQUESTER_FAILURE: Scan Completed

0x8996

SERVER_OUT_OF_MEMORY

0x8998

VOLUME_DOES_NOT_EXIST

0x899B

BAD_DIRECTORY_HANDLE

0x899C

INVALID_PATH

0x89A8

ERR_ACCESS_DENIED

0x89C6

NO_CONSOLE_PRIVILEGES

Remarks

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.

NCP Calls