V¡®u§ 849 Posted April 3, 2012 Logo abaixo segue um código de um pequeno programa feito em c++ builder para abrir e fechar o drive de cd://--------------------------------------------------------------------------- #include #pragma hdrstop #include "Unit1.h" #include "MMSYSTEM.h" #include "windows.h" #include //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; using std::cout; using std::cin; using std::endl; typedef MCIERROR WINAPI(*CDROM)(const char*, char*, unsigned, HWND); CDROM Command; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm1::Button1Click(TObject *Sender) { Command = (CDROM) GetProcAddress(LoadLibrary("winmm.dll"), "mciSendStringA"); Command("Set CDAudio Door Open", NULL, 0, NULL); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button2Click(TObject *Sender) { Command = (CDROM) GetProcAddress(LoadLibrary("winmm.dll"), "mciSendStringA"); Command("Set CDAudio Door closed wait", NULL, 0, NULL); } //--------------------------------------------------------------------------- Download Source: http://www.filejungle.com/f/YxXK72 http://rapidshare.com/files/211980565/Abrir_e_fechar_drive_de_cd.rar http://www.sendspace.com/file/z6gu8i http://turbobit.net/hnfeo6o93br4.html http://ul.to/q2vxbbnf http://www.ziddu.com/download/19053689/Abrirefechardrivedecd.rar.html http://www10.zippyshare.com/v/95608572/file.html Share this post Link to post Share on other sites