The name of the default printer can be read from the Windows Registry: use GetProfileString function with "Windows" and "Device" passed as first two parameters.
Note that GetDefaultPrinter function requires at least Win2K and is not supported on older Windows versions. On Win9*/Me the EnumPrinters called with PRINTER_ENUM_DEFAULT flag returns information about the default printer.
Credits: PHP (4.4.9), an HTML-embedded scripting language,
MySQL (5.1.55-log), the Open Source standard SQL database,
Version 4, freeware HTML Editor of choice. Hosted by Korax Online Inc.