Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CopyFile, Win98 and 64K limit?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00568500
Message ID:
00568842
Views:
28
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 :)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform