here's a snippet of my code
what i intented to do was to delete the whole directory "C:\\WINDOWS\\Desktop\\Game", and then restore the directory from "C:\\backup\\game" so that my desktop "game" directory isnt too messy.
what happens is that the debug version deletes "C:\\WINDOWS\\Desktop\\Game" as it should while the release version does not.Code:SHFILEOPSTRUCT file_struct; ZeroMemory(&file_struct, sizeof(file_struct)); game_dir = "C:\\WINDOWS\\Desktop\\Game"; game_dir_org = "C:\\backup\\game" ; file_struct.wFunc = FO_DELETE; file_struct.pFrom = game_dir ; // deletes the "game" dir on desktop int iz = SHFileOperation(&file_struct); file_struct.wFunc = FO_COPY; file_struct.pFrom = game_dir_org; file_struct.pTo = game_dir; SHFileOperation(&file_struct); ShellExecute(0,"open",game_dir,0,0,SW_SHOWMAXIMIZED);
also, sometimes the release version deletes "C:\\backup\\game" while no problems with debug version
- vc++ 6.0
- API style