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

From the sound of it, my guess would be that using the OS() function to determine the operating system would be the proper way to do it.

hth,
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform