kleinwithu
March 3rd, 2009, 10:30 AM
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
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