Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Writing directly to port
Message
De
26/05/2008 18:16:17
 
 
À
26/05/2008 12:46:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Divers
Thread ID:
01319521
Message ID:
01319572
Vues:
13
>Hi All
>I use code below to print to ticket printers (POS). It works fine on WINDOWS XP but in WINDOWS VISTA nothing appens!! Any security configuration...
>Any ideas will be great.
>
>Thank's in advance,
>NPedro
>
>********** SAMPLE CODE *************
>nHANDLE = FOPEN("lpt1.dos", 2)
>IF nHANDLE>=0
> =FWRITE(nHANDLE,"sample test")
> =FCLOSE(nHANDLE)
>ENDIF
>
>********** END CODE **************

Assuming the printer shows up as an installed printer in Vista, you could redirect the LPT1 DOS printer port to its print queue. Assuming your machine name is MyComputer:

1. go into the printer Properties and share it, giving it a name such as SharedPrinter

2. Redirect LPT1 to that shared printer (even though it's on the same computer):
NET USE LPT1 \\MyComputer\SharedPrinter /persistent:y
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform