Take the following code:
Code:
SHFileOp.hwnd = NULL;
SHFileOp.wFunc = FO_COPY;
SHFileOp.pFrom = szDisFileLst;
SHFileOp.pTo = szFileLst;
SHFileOp.fFlags = FOF_SIMPLEPROGRESS | FOF_SILENT | FOF_NOCONFIRMATION;
//The Copying Function
x = SHFileOperation(&SHFileOp);
This is part of a program which is supposed to grab a video off of a server and copy it over to the client's computer. It works in both 32-bit and 64-bit Windows 7 environments, despite the fact that it seems to be using some old-fashioned coding, but right now I'm having issues getting it to work on a particular 64-bit Windows 7 computer.
Basically x is being set to 124, which supposedly means the source and/or destination are not in correct formats. This isn't the case though; I've compared both paths/filenames between this computer and another computer that they work just fine on - they're the same.
Also I'm able to simply punch in the source into IE's URL textbox and immediately start watching the video in Windows Media Player (the URL involves the local IP), so connectivity or access to the other computer doesn't seem to be a problem. I did notice, however, that the computer this is having issues with is more locked-down with this "Run as Administrator" crap than the ones it has worked on, and from Googling around, it looks like SHFileOperation() can return 124 even when it's a permissions issue. I've shared the destination folder to everyone for read and write permissions, I'm running IE as an administrator, the program completes SHFileOperation() and then logs something in the destination's directory, etc.
What else should I look at? This is not my program, and I'm not that good at programming specifically for Windows in C++. I would like to at least have some more leads to look into though. Thanks!
...By the way, I'm going to need to avoid changing the program as much as possible. Very tiny changes to barely make it work at the moment are fine, but replacing APIs or anything aren't gonna be a possibility for the time being.