Drive Currently in Use

Moderator: jsachs

Post Reply
Robert Schleif
Posts: 340
Joined: May 1st, 2009, 8:28 pm

Drive Currently in Use

Post 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.
jsachs
Posts: 4203
Joined: January 22nd, 2009, 11:03 pm

Re: Drive Currently in Use

Post 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.
Jonathan Sachs
Digital Light & Color
sfeinst
Posts: 6
Joined: March 24th, 2019, 6:45 pm

Re: Drive Currently in Use

Post 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.
jsachs
Posts: 4203
Joined: January 22nd, 2009, 11:03 pm

Re: Drive Currently in Use

Post 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.
Jonathan Sachs
Digital Light & Color
Post Reply