Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CopyFile not working with captured port
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00510833
Message ID:
00545957
Views:
8
>YES!!
>
>Thanks so much for your help Ed! That did it. I tried the same CopyFile syntax but just chose a queue on our server with a much shorter name and it worked great.
>
>I do have a further question for you though, if you have the time and patience for it. 8?)
>
>I tried (on the Win9x client) to use net use to connect lpt1 to the shortened queue:
>net use lpt1 \\ntm_2001\dataproc
>
>That returned the Error 53 message (network path can't be located). (Funny, cuz that network path worked fine for the CopyFile() function).
>
>Since that didn't work, I instead captured lpt1 to dataproc. I then tried the CopyFile() function again with the following syntax:
>
>? copyfile("c:\temp\rodd.txt","LPT1:",0)
>
>However, this returns a 0 and GetLastError returns 87 again. Up to this point I've been assuming that LPT1 was a sort of system defined parm ... that the system used the string LPT1 as a parm to reference the actual port. Am I wrong? Do I explicitly have to set up a system variable LPT1 somewhere?
>
>Once again, thanks for all your help! The whole issue of the length of the queue name was a major breakthrough!
>

You might want to try using my recently-released direct print spooler manipulation class, DIRPRTCLASS.PRG, once the sysop gets around to posting it in the Files section. I posted the source in a message I left in the past coupe of days; you'd want to look at using the PrinterOpen(), SpoolFile() and PrinterClose() methods to handle spooling files out to mapped print devices.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform