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.
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;
also, sometimes the release version deletes "C:\\backup\\game" while no problems with debug version
- vc++ 6.0
- API style