|
-
March 3rd, 2009, 11:30 AM
#1
Problem in using WIN32 API "CopyFile"
Dear all,
I am trying to use WIN32 API "CopyFile" to copy a file from a remote machine to local.
dest = "\\\\desk\\data\\mydata\\test\\1.txt";
bRet = CopyFile(src, dest, false);
But, this always fails. GetLastError() returns 3. It looks like "The system cannot find the path specified."
If I map the shared folder as a network drive like \\desk\data\mydata\test\ -> X:\, the following code will work.
dest = "X:\\1.txt";
bRet = CopyFile(src, dest, false);
Could anybody please give me a little hint? Thanks!
Edit/Delete Message
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|