The current implementation of SysWinSetDefaultPrinter is not correct for Windows 2000, or any later OS. The code looks like it should only work on Windows NT, but may work on Windows 98, etc.. But, it is not the documented method for setting the default printer on Windows ME, 98, or 95.
The code looks like someone may have started to make an attempt to detect the current OS, but that was never carried through. I'll fix the code so that it detects the current OS and works properly on W2k and later. I'll also fix the code so that if an earlier OS is detectd it follows the documented way to set the default printer on NT. If that works on earlier OSes then fine, but I'm not going to test it or support it for earlier OSes.