I have a two-fold problem and I'm familiar with neither branch of it.
Background: I've purchased a new laptop from MSI. As a feature I've never seen before, the CD-drive does not have a mechanical eject button mounted on the drive. Instead, a digital eject button is part of the "smart-bar" above the Function Keys. Unfortunately, the software underlying the smart-bar is atrocious. Even in passive mode it takes up screen real-estate and it takes up space on the task bar.* I have un-installed this software.
Project: I want to write a program that runs on startup and lies unobtrusively in the background. The only function of the program is to make that eject button eject the CD drive.
Step one: I want to find out what happens when I push that button. I suspect that I don't need to code anything but can use a utility - one of my colleagues mentioned an "event logger" but google provides nothing of use.
Step two: I want to write said program, which means I need to interact with either WIN32 or possibly the .net framework to perform the same function call windows uses when I right-click the CD-Drive under "My computer" and click "Eject."
Questions: First question: Do you know a utility that will tell me what happens when the button is pushed?
Second question: Do you know what function I need to call on that event to eject the drive?
Tertiary question: Am I overlooking some obvious other path?
I am open to any answers from "I had the same problem, here's the source code to the solution I wrote" to "I guess maybe this tutorial will help you?"
I would prefer to work in C/C++/C# but I am open to other suggestions. As the title states, I am working under Windows 7.
*For the curious, the software is the MSI S-Bar which is for some reason touted as a "feature" of this line of laptops.