NXIoGetOpenMode

Gets the open mode for consoles, devices, FIFOs, and files.

Library:LibC
Classification:NKS
Service:File and Directory I/O

Syntax

  #include <nks/fsio.h> 
  
  int NXIoGetOpenMode (
     NXHandle_t   handle, 
     NXMode_t    *mode);
  

Parameters

handle

(IN) Specifies a handle (or descriptor) from a previously opened console, device, FIFO, or file.

mode

(OUT) Points to the open mode of the object. See NKS Open Modes.

Return Values

If successful, returns 0. Otherwise, returns the following error code:

Decimal

Hex

Constant

Description

4

0x04

NX_EBADF

handle no longer specifies an open object.

105

0x69

NX_ENOCONTEXT

The calling thread has no NKS context.

Remarks

NXIoGetOpenMode returns the mode specified at the time the object was opened or, in the case of FIFOs, the current mode in respect to blocking or non-blocking may be different than at time of open.

See Also

NXIoSetBlockingState