Event code 22 — DLL initialization event

Purpose

This event is designed to be used by languages with Dynamic Link Libraries (DLLs) to perform initialization specific to the use of those DLLs. The event is driven during Language Environment enclave initialization, after the debugger initialization events but prior to the invocation of the main routine. The event is also driven by Language Environment whenever a new module has been loaded, immediately following the invocation of the New Load Module Event (8). In all cases, this event will be followed by a call to the Static Constructor Event (25).

Syntax

Call CEEEVnnn (22, idinfo, loadinfo)
INT4      *idinfo;
INT4      *loadinfo;
idinfo (input)
A fullword that indicates to the member language additional information identifying the calling environment. A new executable unit (load module or program object) is introduced to the enclave by COBOL dynamic call, PL/1 or C fetch, CEEPIPI services, or DLL implicit or explicit load. The following bits are defined:
0 - 23
reserved
24 - 31
The value indicates the load_reason. The values are defined as follows:
0
The load was due to main Language Environment initialization.
1
The load was due to dynamic call, fetch, or ceepipi service.
2
The load was due to the explicit or implicit reference of a DLL.
loadinfo (input/output)
A fullword returned from the New Load Module (8) event containing information about the module that was just loaded. If this event is being called as part of main Language Environment initialization flow (load_reason is zero), then the New Load Module event was not called and loadinfo is zero. It can optionally be modified by this event for use by the subsequent call to the Static Object Constructor event.
A return code is placed in R15 by the Event Handler. The following return codes (in decimal) are defined:
-4
The Event Handler does not want to process the event.
0
The Event Handler was successful.
16
The Event Handler encountered an unrecoverable error.