NPA_Register_HAM_Module
Registers a HAM with NWPA.
LONG NPA_Register_HAM_Module ( LONG *npaHandle, LONG novellAssignedModuleID, LONG loadHandle, LONG (*HAM_Check_Option)(), LONG (*HAM_Software_Hot_Replace)(), LONG (*HAM_ISR)(), LONG (*HAM_Execute_HACB)(), LONG (*HAM_Abort_HACB)() LONG instance );
NWPA recognizes reentrant modules, meaning that a single code image of the HAM manages multiple adapters. Therefore, if a reentrant HAM calls NPA_Register_HAM_Module again to assign a new instance number to the new adapter board instance, NWPA ensures that the value output to this variable is the same for each call.
Hot replacement is an optional feature for a HAM. If the HAM does not support hot replacement, it should set this parameter to zero. Doing so forces NWPA to never allow hot replacement of this HAM.
This value must be ORed with 0x00010000 if the HAM is multi processor enabled.
The following table lists return values and descriptions.
The driver being loaded has a novellAssignedModuleID identical to that of a driver that is already loaded.
NPA_Register_HAM_Module is used to register the HAM module with NWPA, along with the application's entry points. This function should be the first API called during the module's load-time entry point, HAM_Load. It is during the context of this API that the HAM receives its unique NWPA handle. This handle is a necessary argument for using the other NPA APIs that provide system resources to the module
NPA_Register_HAM_Module also determines if a version of a HAM currently loaded in server memory is to be hot replaced with a newer HAM version. NPA_Register_HAM_Module makes this determination by comparing the novellAssignedModuleID and the loadHandle of a newly loaded HAM with other HAMs that are already loaded. If there is a match in novellAssignedModuleID values between the newly loaded HAM and an already loaded HAM, but their respective loadHandle values differ, then NWPA determines that the newly loaded HAM is hot replacing the already loaded HAM.