Stijn Posted March 1, 2004 Posted March 1, 2004 I wrote an application where the user needs an USB memory stick. When the user closes the program, some data is written to the stick. Can I write some code so my application is closing the usb stick whithout an action of the user? When I do not implement this, the user have to click on an icon in the taskbar for removing the usb stick safely. But i want to keep it simpel for the user ;) Does anyone knows some solution? Quote
*Gurus* Derek Stone Posted March 2, 2004 *Gurus* Posted March 2, 2004 I believe passing the control code FSCTL_DISMOUNT_VOLUME to the Win32 API [api]DeviceIOControl[/api] will dismount the USB memory stick. Getting a IO handle to the disk is as simple as calling [api]CreateFile[/api]. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.