Brian Vincent wrote:
On 11/7/05, Christian Costa <[EMAIL PROTECTED]> 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
60s ! Stange !
And during this delay are you able to eject by pushing the drive button ?
Are there files opened during this delay ?
Another thing, you may try duplicating the code and adding delays to
reproduce the 2 invocations of eject and
then narrow down things to determine which ioctl should be called twice.
Bye,
Christian