Returns directory entry information for a given connection's file handle
#include <nwfileng.h>
int FEGetOpenFileInfo (
LONG connection,
LONG handle,
LONG *volume,
LONG *directoryNumber,
LONG *dataStream
LONG *flags);
(IN) Specifies the connection number of the object that has the file open.
(IN) Specifies the file handle for which to return volume or directoryNumber.
(OUT) Points to the number of the volume on which the directory entry is located.
(OUT) Points to the directory entry number of the entry.
(OUT) Points to the data stream with which the handle is associated.
(OUT) Points to the status of the handle (see Remarks section).
When given a connection number and a NetWare file handle, FEGetOpenFileInfo returns the information in the output parameters. The file handle for the handle parameter must be an OS file handle such as the fileHandle field returned in various FS Hooks return structures defined in nwfshook.h.
FEGetOpenFileInfo is useful if you are using FS Hooks because it gives the status/flags for an open file. However, keep in mind that fileHandle may not be populated by some callbacks—for example FSHOOK_PRE_OPENFILE if the file has not yet been opened. Also keep in mind that FEGetOpenFileInfo is a blocking function and cannot be used in a POST FS Hooks routine. In that case callback information would have to be passed to another routine to call FEGetOpenFileInfo.
The flags parameter is a composition of three fields from the file control block (FCB): flags, extraFlags, and extraExtraFlags (defined in fileio.h):