24.2 Loader Data Table

In addition to the loader functions, the first segment of a self-loading Windows application contains a loader data table with far pointers to each of the loader functions. The format of this table follows:

Location Description

0x00 Specifies the version number (this value must be 0xA0).
0x02 Reserved.
0x04 Points to a startup procedure, which the application developer provides.
0x08 Points to a reloading procedure, which the application developer provides.
0x0C Reserved.
0x10 Points to a memory-allocation procedure, which the kernel provides.
0x14 Points to an entry-number procedure, which the kernel provides.
0x18 Points to an exit procedure, which the application developer provides.
0x1C Reserved.
0x1E Reserved.
0x20 Reserved.
0x22 Reserved.
0x24 Points to a set-owner procedure, which the kernel provides.

All of the pointers in this table must point to locations within the first segment. There can be no fixups outside this segment.

After the segment table for an executable file is loaded into memory, each entry contains an additional 16-bit value. This value is a segment selector (or handle) that the loader created.