Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with CopyFile API to network printer
Message
De
24/04/2003 01:55:06
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Problem with CopyFile API to network printer
Divers
Thread ID:
00781000
Message ID:
00781000
Vues:
53
The below code works when PRN is local printer, but fails when it is network printer.
GetLastError() returns 29
/The system cannot write to the specified device. ERROR_WRITE_FAULT /
What can I do?

#DEFINE C_OUT_PORT "PRN:"
DECLARE INTEGER CopyFile IN KERNEL32.DLL ;
STRING lpExistingFileName, ; && name of an existing file
STRING lpNewFileName, ; && name of new file
INTEGER bFailIfExists && operation if file exists

lcErr = CopyFile("winpage.$$$", C_OUT_PORT, 0)=0
do while lcErr
lcRet = messagebox("Error ???",5+16)
if lcRet<>4
this.enabled=.t.
retu
endif
lcErr = CopyFile("winpage.$$$", C_OUT_PORT, 0)= 0
enddo
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform