CDM_Unload_Check

The CDM's first unload-time entry point that checks to see which devices are currently bound to the CDM. This entry point is called by the OS prior to calling CDM_Unload.

Thread Context:Non-Blocking

Syntax

    LONG CDM_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 CDM can be cleanly unloaded.

nonzero

The CDM is bound to one or more devices.

Remarks

CDM_Unload_Check is called when the OS receives a request from the console to unload the CDM. This function is responsible for checking to see if any of the CDM's devices are currently being used (locked) by an application. CDM_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 CDM can be cleanly unloaded, meaning that there are no current I/O processes on the devices controlled by this CDM. 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.