GetDeviceCaps
http://support.microsoft.com/kb/114709/it