Page 1 of 1
Drive Currently in Use
Posted: March 19th, 2019, 2:01 pm
by Robert Schleif
If I save an image to a USB drive, and then ask Windows 10 to eject the drive, I receive a message saying the drive is currently in use...
Closing the file in PWP does not satisfy Windows in this regard, only ending PWP does. It is no big problem since I can remove the drive anyway, but it seems like a minor imperfection somewhere.
Re: Drive Currently in Use
Posted: March 19th, 2019, 4:47 pm
by jsachs
I can confirm this happens, but as far as I know, PWP is fully releasing the file after saving it, so I am not sure where this is coming from.
Re: Drive Currently in Use
Posted: March 24th, 2019, 6:50 pm
by sfeinst
On some code I have written, if the open or save dialogs are used that are the common dialogs, the dialogs may remember what drive/directory was last used in the application. Since they point to the USB drive, Windows may consider the drives in use. Exiting the app would clear those dialogs. I haven't downloaded v8 yet so cannot test myself. But something you can try would be to save to USB, then try saving to the local hard drive. Close the image and see if you can eject the drive without closing PWP.
This does not help solve the problem, but might at least tell you why the app considers the drive in use.
Re: Drive Currently in Use
Posted: March 24th, 2019, 7:04 pm
by jsachs
Interesting... I was suspecting GetSaveFileName as the culprit and was just reviewing the many option flags. I tried adding OFN_NOCHANGEDIR and this seems to fix the problem as otherwise it sets the current directory to the folder you saved in which then prevents the drive from being ejected.
It's too late to fix in PWP 7, but I can fix it in PWP 8.