win 32 for safety removal of disc

Hey all, I am trying to find a win32 command for ejecting a removable disc. I'v found this Which I heavly modified for my own code. However is there a win 32 way of doing it.

thank you in advance
There is DevEject (including C++ source code):

However what's wrong with Microsoft example ? It should work.
Oh it does work, just seeing if there was a win 32 way of doing it.
Device IOControl() looks enough win 32 way to do it for me, you do not agree ? Do you expect one single line of code to do it ?
I just wondered if there was a better way. I usually ask the senior programmer the best way of doing it. As it is the weekend now thought I would just check. As I do a load of programming, then he finds a much better way of doing it.
Topic archived. No new replies allowed.