I'm not sure if you already have a working solution, but if not, I found an app called USB Disk Ejector. I'm not sure of the quality of the source code for it, but it was written in Delphi, so should be fairly easy to integrate this code into the Menu.
I read that the application currently only works in XP and Vista, but with the team of developers we now have for the menu, it shouldn't be too difficult to adapt to work with other Windows versions as well.
The source code is not available from the application's page, but is available at the bottom of their full list of software.
Here is a direct link to the source code as well.