HAM_Load

The load-time entry point for initializing and registering a HAM.

Thread Context:Blocking

Syntax

    LONG HAM_Load (
       LONG   loadHandle,
       LONG   screenID,
       BYTE  *commandLine
       );
    
    

Parameters

loadHandle
(IN) The OS assigns the value of this parameter when it receives a command line request to load the HAM. This handle is used to identify the HAM.
screenID
(IN) The OS passes this parameter's value, which is a handle to the console. The NPA functions that output messages to the console require this handle as an argument, and it is provided in case the HAM needs to output any screen messages during its initialization.
commandLine
(IN) Points to the command line. The OS passes this pointer so the HAM can receive command line configuration options.

Return Values

The following table lists return values and descriptions.

zero

Successful

nonzero

Unsuccessful (fails the load)

Remarks

HAM_Load is the initial entry point for a HAM, and it performs HAM initialization and registration. This function becomes visible to the OS when the definition (def) file is processed by the NLMLINK utility. When the HAM is loaded, the OS calls HAM_Load, passing it the parameters listed above. loadHandle and screenID are generated by the OS to be used in allocating resources and for outputting console error messages that may occur during the load process. commandLine is a pointer to the command line arguments specified by the system operator at load time. These arguments specify I/O port addresses and ranges, memory decode addresses and lengths, interrupts, and DMA addresses.

Because the HAM might need to do some I/O with an adapter during its initialization, HAM_Load is a blocking process. It is called within the context of the NetWare LOAD utility. Additionally, the HAM might disable interrupts [see NPA_Interrupt_Control] within the context of this function if the adapters being checked are under heavy I/O traffic. Disabling interrupts might not be necessary. However, if the HAM does disable interrupts within HAM_Load, the HAM must enable them before returning from HAM_Load.