RegisterSetParameter

Registers a settable parameter, defined by an application.

Library:LibC
Classification:NetWare OS
Service:NetWare Platform

Syntax

  #include <netware.h> 
   
  #ifdef USE_CATEGORY_NUMBER
  int RegisterSetParameter (
     void           *NLMHandle,
     rtag_t          rtag,
     int             categoryNumber,
     void          (*callback)( uint32_t oldValue ),
     int             flags,
     void           *value,
     const char     *name,
     const char     *description,
     int             type,
     unsigned long   lower_limit,
     unsigned long   upper_limit);
  
  #else
  int RegisterSetParameter (
     void           *NLMHandle,
     rtag_t          rtag,
     const char     *catname,
     void          (*callback)( uint32_t oldValue ),
     int             flags,
     void           *value,
     const char     *name,
     const char     *description,
     int             type,
     unsigned long   lower_limit,
     unsigned long   upper_limit);
  #endif
  

Parameters

NLMHandle

(IN) Points to the handle for the NML that uses the settable parameter.

rTag

(IN) Specifies a resource tag created by calling AllocateResourceTag with the signature parameter set to SettableParameterSignature.

categoryNumber or catname

(IN) Specifies the category in which the parameter is listed. If the parameter is categoryNumber, specify the number of the category. If the parameter is catname, point to a string containing the category's name.

callback

(IN) Points to the name of a function to call when the parameter's value is set. This is optional and can be set to NULL.

flags

(IN) Specifies who can modify the parameter and when. If you are using the catname parameter, this bit mask must include the SP_USE_CATEGORY_NAME flag. For possible values, see Section 30.4, Settable Parameter Flags.

value

(IN) Points to a value for the parameter. Its data type must match what is specified in the the type parameter.

name

(IN) Points to the name of the settable parameter. The parameter name is an ASCII string, which can contain spaces.

description

(IN) Points to a string which describes the purpose of the settable parameter.

type

(IN) Specifies the type of data contained in the value field. For possible values, see Section 30.5, Settable Parameter Types.

lower_limit

(IN) Specifies the lowest valid value for the parameter, if appropriate for the parameter type. Otherwise, set it to 0.

upper_limit

(IN) Specifies the highest valid value for the parameter, if appropriate for the parameter type. Otherwise, set it to 0.

Return Values

If successful, returns 0. Otherwise, returns a nonzero error code. For a list of possible values, see Section 30.6, Settable Parameter Return Codes.

Remarks

Two versions of this function exist. If you use the version that allows you to specify the category name, the flags parameter must include SP_USE_CATEGORY_NAME.

This function adds a settable parameter to the NetWare operating system. Before your application unloads, you need to deregister the parameter (see DeRegisterSetParameter).

You can use settable parameters to store application configuration information and for debugging.

See Also