CDM_Load

The CDM's load-time entry point for initializing and registering the CDM.

Thread Context:Non-Blocking

Syntax

    LONG CDM_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 CDM. Its value is the CDM's load handle, and the OS uses this handle to keep track of the CDM.
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, and it is provided in case the CDM needs to output any screen messages during its initialization.
commandLine
(IN) This parameter is a pointer to the command line. The OS passes this pointer so that the CDM can receive command line configuration options if any are required.

Return Values

The following table lists return values and descriptions.

zero

Successful

nonzero

Unsuccessful (fails the load)

Remarks

CDM_Load is the initial entry point for a CDM, and it performs CDM initialization and registration. This function becomes visible to the OS when the definition (.def) file is processed by the NLMLINK utility. When the CDM is loaded, the OS calls CDM_Load passing it three parameters, loadHandle, screenID, and commandLine. loadHandle and screenID are generated by the OS to be used in allocating resources and for outputting console error messages that might occur during the load process. commandLine is a pointer to the command line arguments specified by the system operator at load time. These arguments can specify any configuration required by the CDM, provided that the CDM supports command line options.