## Unauthorized Windows 95 Update -- DYNLNK32

- 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):

      C:\BOOKS\UNAUTHW\NEW>dynlnk32 kernel getprocaddress
      LoadLibrary16 @ BFF97E6Eh
      GetProcAddress16 @ BFF97A7Eh
      LoadLibrary16("kernel") ==> 0x0000012F
      GetProcAddress16(0x0000012F, "getprocaddress") ==> 0x011F002C
      kernel!getprocaddress at 011F:002C

The O'Reilly Windows Center

Unauthorized Windows 95 Update