NPA_Unload_Module_Check

Determines if a module can be cleanly unloaded, meaning that no applications are currently using devices it controls.

Thread Context:Non-Blocking

Syntax

    LONG NPA_Unload_Module_Check (
       LONG   npaHandle,
       LONG   novellAssignedModuleID,
       LONG   screenID
       );
    
    

Parameters

npaHandle
(IN) The CDM's or HAM's module handle for using the NPA APIs, assigned during NPA_Register_CDM_Module or NPA_Register_HAM_Module, respectively.
novellAssignedModuleID
(IN) Unique ID for the module to be unloaded. These IDs are assigned to a vendor upon request from Developer Services.
screenID
(IN) ID to the server console. Its value was passed to the HAM through HAM_Unload_Check.

Return Values

The following table lists return values and descriptions.

zero

No devices are locked.

nonzero

One or more devices are locked by an application.

Remarks

The purpose of NPA_Unload_Module_Check is to determine if the module can be cleanly unloaded without losing any current I/O processes and to determine if an application is currently using any devices controlled by the module

A CDM or HAM should call this API within the context of their respective unload-time entry points, CDM_Unload_Check and HAM_Unload_Check respectively. The OS calls these entry points when the UNLOAD command is issued on the CDM or HAM from the command line.