Does anyone know the source or know somewhere i could find the info that is needed to open and close the cd tray?
Does anyone know the source or know somewhere i could find the info that is needed to open and close the cd tray?
gees nobody know this.
If you're using Windows, this should work (you'll have to replace the cd drive letter) -
Code:#include <iostream> #include <windows.h> using namespace std; int main() { DWORD bytes; HANDLE HCDrom = CreateFile("\\\\.\\F:",GENERIC_READ,0,0,OPEN_EXISTING,0,0); if(HCDrom==INVALID_HANDLE_VALUE) cout << "error"; DeviceIoControl(HCDrom,IOCTL_STORAGE_EJECT_MEDIA, 0, 0,0, 0,&bytes,0); return 0; }
zen
look up MCISendString at msdn.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi