NXConsoleOpen

Is a macro that opens the application's screen.

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

Syntax

  #include <nks/fsio.h> 
  
  int NXConsoleOpen (
     const void     *name,
     NXMode_t        mode,
     unsigned long   flags,
     NXHandle_t     *handle);
  

Parameters

name

(IN) Points to a null-terminated Unicode or ASCII string, which specifies the name of the console screen to open.

mode

(IN) Specifies the mode, which determines how the device is used:

Flag

Value

Description

NX_O_RDONLY

0x00000000

Specifies the keyboard and redirects stdin to this screen.

NX_O_WRONLY

0x00000001

Specifies the screen for output and redirects stdout to this screen.

NX_O_SCROLLABLE

0x00000800

Opens the console in a scrollable screen.

flags

(IN) Pass 0.

handle

(OUT) Specifies a descriptor on which the opened console may be read (or written).

Return Values

If successful, returns 0.

Remarks

NXConsoleOpen is a shortcut for opening the screen or keyboard. If you did not specify an application screen at link time, NXConsoleOpen allows you to create a screen for your application and then use standard functions for stdin and stdout to receive input from and send output to the screen.

The name parameter translates into the string that is displayed at the top of the screen when the ALT key is depressed.

NOTE:If your NLM has already created an application screen, the name parameter is ignored and the handle parameter returns a handle to the already created screen.

See Also

NXDeviceOpen