The variable descriptor control block (VDCB) defines a structure
that provides information that is need to reference a variable from
an application. For example, a DLL application can use compiler-generated
code to implicitly refer to imported variables. The compiler-generated
code tests the first word for zero and, if it is zero, calls the CEETLOR
stub routine to resolve the address of the variable. All VDCBs reside
in the C_WSA because they are placed there by the Binder. Figure 1 shows the format of the VDCB.
Figure 1. Variable descriptor control block (VDCB)
format
The fields in the VDCB are defined as follows:
CEEVDCB_VARPQCON
pseudo-Qcon for the variable. A pseudo-Qcon, which
is a concept introduced in C/C++, is a displacement that gives the
address of the referenced DLL's variables when it is added to the
base address of the area (C_WSA) in which the referencing program
object's descriptors are defined. That is, this displacement is an
offset from the base address of one area to a storage location in
a different area.
CEEVDCB_DLLE
Address in the referencing program object's Import/Export Table
(IET), from which the name of the exporting DLL can be found. The
Binder sets this field.
CEEVDCB_CEESTARTPTR
The Binder sets this field to the address of CEESTART, which
is a CSECT in every Language Environment®-enabled application module that provides
a path to other information in the executable program.
CEEVDCB_CWSA
Address of this program object's C_WSA, which is the base address
of the area in which its descriptors for imported symbols are defined.
The Loader sets this field to the address of the WSA in which the
VDCB is define. This is used to decode each pseudo-Qcon of
a DLL's variable, which provides the location of the imported variable
on terms of the start of the referencing program object's C_WSA. It
is also used, when working with the referencing program object's Import/Export
table, to decode its Qcons for the descriptors of its imports.