FEGetOpenFileInfoForNS

Returns name space specific directory entry information for a given connection's file handle

Local Servers:blocking
Remote Servers:N/A
NetWare Server:4.x, 5.x, 6.x
Platform:NLM
Service:File Engine

Syntax

   #include <nwfileng.h>  
    
   int FEGetOpenFileInfoForNS  (  
      LONG    connection,   
      LONG    handle,   
      LONG   *volume,  
      LONG   *DOSDirectoryNumber,   
      LONG   *directoryNumber,  
      LONG   *nameSpace,  
      LONG   *dataStream 
      LONG   *flags);
   

Parameters

connection

(IN) Specifies the connection number of the object that has the file open.

handle

(IN) Specifies the file handle for which to return volume or directoryNumber.

volume

(OUT) Points to the number of the volume on which the directory entry is located.

DOSDirectoryNumber

(OUT) Points to the DOS directory entry number of the entry.

directoryNumber

(OUT) Points to the directory entry number of the entry corresponding with nameSpace.

nameSpace

(OUT) Points to the name space corresponding with directoryNumber (see Section 20.5, Name Space Flag Values).

dataStream

(OUT) Points to the data stream with which the handle is associated.

flags

(OUT) Points to the status of the handle.

Return Values

See Return Values for C for more information.

0

Success

0xFF

Failure

Remarks

When given a connection number and a NetWare file handle, FEGetOpenFileInfoForNS returns the information in the output parameters.

FEGetOpenFileInfoForNS is useful if you are using FS Hooks because it gives the status/flags for an open file as well as some name space specific directory entry information.

The flags parameter is a composition of three fields from the file control block (FCB): flags, extraFlags, and extraExtraFlags (defined in fileio.h):

flags bits:

0x00000001

NotReadableBit

0x00000002

NotWritableBit

0x00000004

WrittenBit

0x00000008

DetachedBit

0x00000010

SwitchingToDirectFileSystemModeBit

0x00000020

DirectFileSystemModeBit

0x00000040

FileWriteThroughBit

0x00000080

HasFileWritePrivilegeBit

extraFlags bits:

0x00010000

DiskBlockReturnedBit

0x00020000

IAmOnTheOpenFileListBit

0x00040000

FileReadAuditBit

0x00080000

FileWriteAuditBit

0x00100000

FileCloseAuditBit

0x00200000

DontFileWriteSystemAlertBit

0x00400000

ReadAheadHintBit

0x00800000

NotifyCompressionOnCloseBit

extraExtraFlags bits:

0x01000000

IsWritingCompressedBit

0x02000000

HasTimeDateBit

0x04000000

DoingDeCompressionBit

0x08000000

NoSubAllocBit

0x10000000

IsATransactionFileBit

0x20000000

HasFileWritePrivilegeBit

0x40000000

TTSReadAuditBit

0x80000000

TTSWriteAuditBit