antiblock
https://arwen2.global/
  • Chatbox

    You don't have permission to chat.
    Load More
Sign in to follow this  
V¡®u§

Abrir e fechar drive de CD/DVD em C++

1 post in this topic

Imagem colocada

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
antiblock
https://arwen2.global/

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this