On 11/7/05, Christian Costa titan.costa@wanadoo.fr wrote:
The error (21) suggest the drive is not ready or is finishing something. Could you add a delay before the ejection IOCTL ?
No difference with this:
if (!DeviceIoControl( handle, IOCTL_STORAGE_MEDIA_REMOVAL, &removal, sizeof(removal), NULL, 0, &result, NULL )) WINE_WARN( "IOCTL_STORAGE_MEDIA_REMOVAL failed with err %ld\n", GetLastError() );
+ sleep(60); + if (!unmount_only) { if (!DeviceIoControl( handle, IOCTL_STORAGE_EJECT_MEDIA, NULL, 0, NULL, 0, &result, NULL ))
It still umounts and then exits. Running it a second time works. It's a laptop, not sure if that matters.
-Brian