Click here to Skip to main content
13,088,846 members (54,514 online)
Rate this:
Please Sign up or sign in to vote.
I'm working on a project about USB disk Control and I need to eject USB disk via driveletter or serial number
I've read a lot of articles, posts ...
But i couldn't find anythig that i can use
Could u help me ??

Note: Ive read Eject USB disks using C#[^] but i need just eject function(Method)
Posted 30-Jun-11 20:20pm
SAKryukov 1-Jul-11 2:22am
What do you mean "just eject"? Do you think this article does not explain eject, or you're just lazy to look through all of it? Just asking...
yigido580638 1-Jul-11 2:56am
eject = safely remove
i cant speak Eng. very well
i wanna a Function that it takes drive letter or serial number of usb disk and it will safely remove the usb disk
i hope i could explain it
Prerak Patel 1-Jul-11 4:30am
You can download the source and get any function, and if it is not there, you can create with help of that code.
SAKryukov 3-Jul-11 1:26am
I agree with Prerak. OP, please look at the name of the article -- the code is there.
jsharrison 13-Jul-11 20:13pm
Hi, I have to also agree with Prerak, this is not a simple task and there is no single function you can call to safely remove a USB disk. I recently wrote some software to allow users to format or delete files from a memory stick and searched high and low for how to do this and found the code in the article you’ve read to be the only way to be able to safely remove USB disks.

I am thinking about posting an article about what I found and this could include a DLL that has such a function (ie EjectDisk(driveLetter)) for those not wanting to dig into the lower level stuff, if you are interested?


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 1 Jul 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100