Problem in SHFileOperation

Hai,
I am using SHFileOperation() function to copy a file. It returns 0 if successfull. But when the source file does not exitst in the specified folder, the function is not returning a non zero value. Do any body know why?
[237 byte] By [Siva Prakash] at [2007-11-18 1:39:48]
# 1 Re: Problem in SHFileOperation
What does it return instead?? Also 0?
Andreas Masur at 2007-11-10 8:54:13 >
# 2 Re: Problem in SHFileOperation
Yes it is returning 0
Siva Prakash at 2007-11-10 8:55:13 >
# 3 Re: Problem in SHFileOperation
Originally posted by Siva Prakash
Yes it is returning 0
Hmmm...strange. I have to admit that I used the shell functions many times...at least never for file operations.

If you do not necessarely need to use this function you can use the API function 'CopyFile()' instead...

if(::CopyFile("c:\test.txt", // Source
"c:\temp\test.txt", // Destination
TRUE) == FALSE) // Flag whether function fails if file already exists
// Error -> call '::GetLastError()'
Andreas Masur at 2007-11-10 8:56:12 >