Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CopyFile
Message
De
17/01/2000 10:13:45
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00318954
Message ID:
00318964
Vues:
25
>I was wondering if anyone has had any success using the CopyFile Win32Api call to print to a Novell network printer. It works for me to print to PRN (my default printer), and it works when I copy a file to the file server, but when I specify \\FileServerName\PrinterName, it does not work. Any ideas? An example:
>
>DECLARE INTEGER CopyFile IN KERNEL32.DLL ;
> STRING @SourceFileName, ;
> STRING @DestFileName, ;
> INTEGER bFailIfExists
>=CopyFile("c:\autoexec.bat","\\fs1\QMIS",0)

You have to specify a queue name and it's the name of the print server, which may not be the same as the file server's name.

If you can't get it to work this way, you may want to try mapping the printer to a local port (the WSH's Wscript.Network object has a method AddPrinterConnection that can do this if you don't want to use the Novell command line CAPTURE command ahead of time) and then copy to the port.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform