RegisterConsoleCommand

Registers a parsing function and its console command (legacy function). For new development, use RegisterCommand.

Library:LibC
Classification:NetWare OS
Service:NetWare Platform

Syntax

  #include <netware.h> 
   
  int RegisterConsoleCommand (
     CommandParser_t   *cmdParser); 
  

Parameters

cmdParser

(IN) Points to a command parsing function.

Return Values

If successful, returns 0. Otherwise, it returns 0xFFFFFFFF.

Remarks

The command parsing function is called by the operating system whenever an unrecognized console command is entered. In NetWare 6.x, console commands are checked first, and the parser is called last. In NetWare 5.x, parsers are checked first and then console commands.

The parsing function is called with two parameters: a screen ID and a pointer to the complete console command line (an ASCIIZ string).

The required resource tag is obtained with a call to AllocateResourceTag using the ConsoleCommandSignature constant (defined in netware.h) as the signature value.

The function registered by RegisterConsoleCommand runs as a callback (an OS thread). The function pointer to the callback must be wrappered with the NX_WRAP_INTERFACE macro to ensure accurate library context is established.

See Also