Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CopyFile, Win98 and 64K limit?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00568500
Message ID:
00568842
Vues:
30
Rodd,

Using the below code I get 2 as the last error which is "File not found".
The only help I can give (which is isn't much help at all really) is just
to tell you that I am using Windows 2000 not 98, maybe you have found *another*
bug in the Win9x API.

Sorry I can't be of any more help. One thing I will tell you is that you should
use the SetLastError function as I have done below whenever using API functions
with GetLastError for error checking, just in case a previous error has
occurred.


Cheers,

Chris
declare integer CopyFile in Kernel32.dll string @source, string @dest, integer fail
declare integer GetLastError in Kernel32
DECLARE integer SetLastError in Kernel32 INTEGER


clear &&Just to clear the screen

SetLastError(0) && Reset Any previouse errors

? "Copy: " + TRANSFORM(CopyFile("c:\failfile","c:\temp\rodd.tst",0)) 
* Above command returns 0 - fail

lnError = GetLastError()

? "Error: " + TRANSFORM(lnError) && I get 2 (ERROR_FILE_NOT_FOUND)
Have a nice day :)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform