This is an offshoot of a specific problem I've posted in the C# forum.
However, it applies to C++ as well.
If you have opened a file, specifically, an image file, but would like to rename (or, as MSDN says, 'move) the directory the file resides in, what are the requirements for being able to move the directory without the system complaining about access violations?
The imagefile I'm using is opened in a picturebox control, but making the picturebox show another image does not help. Only the complete commenting out of code that loads information about the picture seems to help, but it's necessary for me to be able to view the picture both before and after the move/renaming.
Is there a way to unload, detach, or close a file from an application such that the parent directory can be moved without problems?
How does the application/OS recognize that it cannot move the active file?
Thanks in advance.