You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using your code, and attempting to eject a USB drive (that has been being used for writing a zip file) the Eject function throws an exception.
I think here
int hr = Native.CM_Request_Device_Eject(device.InstanceHandle, out veto, sb, sb.Capacity, 0);
if (hr != 0)
throw new Win32Exception(hr);
The exception reported is x80004005 "not allowed to write"
However if I do it again the ejection proceeds without problem. It is only the first time the exception is thrown. What could be the cause of this failure?
I would appreciate some help on this matter
The text was updated successfully, but these errors were encountered:
While using your code, and attempting to eject a USB drive (that has been being used for writing a zip file) the Eject function throws an exception.
I think here
The exception reported is x80004005 "not allowed to write"
However if I do it again the ejection proceeds without problem. It is only the first time the exception is thrown. What could be the cause of this failure?
I would appreciate some help on this matter
The text was updated successfully, but these errors were encountered: