HAM_Unload_Check

The HAM's first unload-time entry point that checks to see which devices are currently bound to the HAM.

Thread Context:Non-Blocking

Syntax

    LONG HAM_Unload_Check (
       LONG screenID
       );
    
    

Parameters

screenID
(IN) The OS passes the value of this parameter, which is a handle to the console. The NPA functions that output messages to the console require this handle as an argument.

Return Values

The following table lists return values and descriptions.

zero

No devices are locked, meaning that the HAM can be cleanly unloaded.

nonzero

One or more devices are currently being used by an application.

Remarks

This entry point is called by the OS prior to calling HAM_Unload.

HAM_Unload_Check is called when the OS receives a request from the console to unload the HAM. This function is responsible for checking to see if any of the HAM's devices are currently being used (locked) by an application. HAM_Unload_Check checks the lock status for a particular adapter by calling NPA_Unload_Module_Check.

The OS looks at the return value to determine if the HAM can be cleanly unloaded, meaning that there are no current I/O processes on the devices controlled by this HAM. If any devices are locked, the OS displays a message at the console listing the devices that will be deactivated and the corresponding NetWare volumes that will be dismounted if the action is continued. The user then has the option to either continue or abort the unload.