## Unauthorized Windows 95 Update -- CHGDIR

- CHGDIR.C -- Source code for a Win32 Console app which demonstrates that Win32 tasks in Windows 95 maintain the current drive and directory in a Win16 task data block (TDB). This version is corrected from the version that appears in Unauthorized Windows 95 (IDG Books, 1994), pp. 446-448.
  After the book was written, the GetCurrentThreadId function in Win95 changed to return obfuscated thread IDs. CHGDIR.C now uses the TIDToTDB() function from UNOBFUSC.C to de-obfuscate the thread ID into a Ring 3 thread control block.
  Also after the book was written, KERNEL32.DLL stopped exporting the VxDCall function by name. This function has ordinal #1 in KERNEL32.DLL. However, KERNEL32 does not allow imports by ordinal. To access VxDCall, CHGDIR.C now uses the GetK32ProcAddress function from K32EXP.C.
- CHGDIR.EXE -- The CHGDIR executable file (a character-mode Win32 app). See Unauthorized Windows 95, page 450, for an explanation of how to use CHGDIR, and see pages 444-451 ("Where's the Windows 95 Current Directory?") for a more general explanation.
- CHGDIR.ZIP -- A zip file containing everything needed to build the CHGDIR example. You can download this rather than getting all the individual files.

The O'Reilly Windows Center

Unauthorized Windows 95 Update