DYNLNK32.C -- Source code for a small
Win32 program which demonstrates how to call the undocumented
LoadLibrary16 and GetProcAddress16 APIs provided by
KERNEL32. This version is corrected from the version that appears
in Unauthorized Windows 95.
After the book was written, KERNEL32.DLL stopped exporting the
undocumented LoadLibrary16, GetProcAddress16, and
FreeLibrary16 Win32 functions by name. These functions
are still present, and are exported -- but by number, not
name. (LoadLibrary16 is KERNEL32.35, FreeLibrary16
is KERNEL32.36, and GetProcAddress16 is KERNEL32.37.) However,
KERNEL32 does not allow imports by ordinal. To access these functions,
DYNLNK32.C now uses the GetK32ProcAddress function from
K32EXP.C.
DYNLNK32.EXE -- A small Win32 program
which demonstrates run-time dynamic linking to Win16 APIs. Sample
output (note the program shows linking, but not thunk calling):