Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using APRINTERS to select printers
Message
From
16/04/1999 17:19:00
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Using APRINTERS to select printers
Miscellaneous
Thread ID:
00209215
Message ID:
00209215
Views:
60
We've created a printer selection dialog to let the user select different printers for different output types (reports versus labels, etc.) When then use SET PRINTER TO NAME {printer} to select the correct printer. A problems occurs when you consider different OSs.

We've notices that Win9x expects {printer} to be the windows printer name (as it appears in the Printers folder) while NT expects {printer} to be the full UNC path to the printer \\servername\queue. Since APRINTERS will give you both versions of the printer name, we can simply detect the OS (we're using the W32API function GetVersion) and then using the UNC path or name as needed.

Is there a better way to do this? Also, is there a SYS call that will tell you the OS? We don't want to use the sysinfo OCX since there's a potential problem with registration on users machines (as with all OCX's).

Thanks,
Chris Vesper
Next
Reply
Map
View

Click here to load this message in the networking platform