Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CopyFile API
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00454724
Message ID:
00455002
Views:
33
>>With VS, you can also install the Visual Studio Tools. I highly recommend them. Using the Error Lookup utility:
>>
>>Error 2 - The system cannot find the file specified.
>>
>>Did you NULL terminate the file names? Use Chr(0).
>>
>>HTH.
>
>Larry,
>
>Thanks for the reply. I didn't buy VS, just VFP. Is the error lookup utitlity available another way, what is the name of the program?
>
>Regarding error 2, I am still confused. I am trying to use the CopyFile function to send a print file to a shared network printer. If I issue the command like this:
>
>CopyFile('c:\temp\test.prn', 'LPT1:',0)
>
>It works fine and the file is copied to LPT1. If I then change to the following:
>
>CopyFile('c:\temp\test.prn', '\\MyServer\MyPrinter', 0)
>
>I then get the error number 2. I have tried both using the actual shared printer name in quotes and also the return value from the APRINTERS(aPrinters) function. In my setup, I have 2 printers defined and the network printer is the second one. So I am using aPrinters[2,1] to get the exact shared name. Thanks again for your ideas.
>
>Kind Regards,
>
>Mat

Mat,
What OS are you using as the client? By any chance is it Win9X? If so, you may have a problem using this technique with printer share names that are longer than 8.3 or have embedded spaces. You might try changing the share name.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform