RegisterTrackedResource

Registers a resource tag signature for tracking.

Library:LibC
Classification:NetWare OS
Service:NetWare Platform

Syntax

  #include <netware.h> 
   
  int RegisterTrackedResource (
     void         *NLMHandle,
     uint32_t      signature,
     Cleanup_t     cleanup,
     const char   *description);
  

Parameters

NLMHandle

(IN) Points to the handle of the NLM application for which a tracked resource is desired; the NLM handle is obtained by calling getnlmhandle.

signature

(IN) Specifies the type of tracked resource desired. For the types defined the NetWare operating system, see Section 30.2, Resource Tag Signatures. Select a unique value for your resource tag.

cleanup

(IN) Specifies the function to call when the tracked resource is unregistered.

description

(IN) Points to a string describing the resource tag. This string can be anything, and it is displayed on the NetWare Console Monitor and the Novell Remote Manager. It has a maximum length of 63 characters.

Return Values

If successful, returns 0.

Remarks

The RegisterTrackedResource function allows you to create a resource tag signature to use with your application. If one of your NLM applications using this tag fails to release all of its resources when it unloads, the operating system calls your cleanup function to finish the task.

The cleanup function must conform to the syntax of the following prototype:

  typedef void (
     *Cleanup_t)(
         rtag_t    rTag, 
         int       forceFlag);
  

The parameters are used to specify the following.

rTag

(IN) Specifies a resource tag.

forceFlag

(IN) Not currently used. Set this to TRUE.

See Also