General information
Category:
Windows API functions
Title:
CopyFile not working with captured port
Hello,
We've got a Novell file/print server with about 150 clients. The clients are running either Win9x or Win2k with the appropriate Novell Netware client.
I'm trying to use CopyFile (from the Win API) to send a file directly to a printer. I've tried the following syntaxes (which others have told me are correct) but I'm not having any luck.
(Syntax I'm showing is the way I would type them from the Fox command window)
? CopyFile("c:\test\rodd.txt","LPT1:",0)
? CopyFile("c:\test\rodd.txt","PRN:",0)
? CopyFile("c:\test\rodd.txt","\\servername\queuename",0)
(I actually used the correct servername and queuename when I ran the command of course).
I had no problem running the command to copy a file to a new file.
? CopyFile("c:\test\rodd.txt","c:\test\rodd2.txt",0)
In the first example (LPT1:), I had that port captured to the proper Novell print queue but the CopyFile command continually returned 0.
I'm guessing this has something to do with Novell being in the mix but I'd like to hear it from someone who knows. It still seems like it should work in that other DOS apps seem to care less about the capture when you tell them to print to LPT1, they just do it and everything works great. I'm not sure why CopyFile would be any different.
Thanks in advance for your help.
Rodd Harris
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only