Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using APRINTERS to select printers
Message
De
16/04/1999 17:19:00
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Using APRINTERS to select printers
Divers
Thread ID:
00209215
Message ID:
00209215
Vues:
59
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform