Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing directly to port
Message
From
26/05/2008 18:16:17
 
 
To
26/05/2008 12:46:39
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Miscellaneous
Thread ID:
01319521
Message ID:
01319572
Views:
12
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform