notsofossil wrote:So, the Win32API is the common ground between 9x and NT?
Only part of it.
Win9x does not support all of the Win32API functions, and for the functions it does support, some parameters are not supported/not implemented. Most commonly, a lot of Win32API functions allow you to pass SECURITY_ATTRIBUTES. Win9x does not implement a security model, so it just ignores this.
notsofossil wrote:But at their cores and in the lower levels, they are completely different?
Yup, at all levels really. They are different kernels, and each has their own implementation of the Win32API on top of that kernel. So while both Oses have the same usual DLLs, such as user32.dll, gdi.dll etc, they are completely different DLLs.
notsofossil wrote:Why is it occasionally there are 32-bit Windows 9x games that refuse to work on older versions of Windows NT? System Shock 2 on Windows 2000, for example.
This became a problem when many developers used Win9x to develop Win32 applications. They had never tested on the full Win32API during development (with NT3 or NT4), so when people moved to Windows 2000/XP, they suddenly found that all sorts of apps didn't work properly anymore.
This was because these apps just 'happened to work' on Win9x, but in reality, certain parameters or return values were not set correctly according to the Win32API specification. Parameters and return values that the limited Win32 implementation in Win9x just ignored.
Or sometimes Win9x gave you access to things that you shouldn't have access to. Eg, you could just read back the status register on the VGA card directly on Win9x. In NT (or Win32 in general) you're not supposed to access any hardware directly from your application, and you have to use a driver/API instead.
You could even get 'ring 0' access in Win9x quite easily with a simple hack, which allowed you to tweak some low-level system options.
Another problem can be that some software uses custom drivers to get direct access to the system. Win9x drivers were not compatible with NT, so such software will not work if only Win9x drivers exist.