This Application is oriented for people who didn't know the solution of their problem ..
the problem is when the button of the Drive is disabled . In this respect you can use
this program for your purpose. You can open and close the Drive Door without any problems ...
Download link : click here
the problem is when the button of the Drive is disabled . In this respect you can use
this program for your purpose. You can open and close the Drive Door without any problems ...
Download link : click here
- By Hamza Qdider -
The entire source code :
Eject.C
#include <windows.h>
#include "Eject.h"
BOOL OPEN = 0;
LRESULT CALLBACK Eject( HWND h, UINT msg, WPARAM wp, LPARAM lp )
{
if( msg == WM_COMMAND )
{
if( LOWORD( wp ) == EJECT_BUT )
{
if( OPEN == 1 )
{
mciSendString( "set cdaudio door closed" ,0,0,0 );
SetWindowText( ( HWND ) lp,"Eject" );
OPEN = 0;
}
else {
OPEN = 1;
mciSendString( "set cdaudio door open" ,0,0,0 );
SetWindowText( ( HWND ) lp,"Close Door" );
}
}
else if( LOWORD( wp ) == ABOUT )
{
MessageBoxA( h,
"This application is programmed by The Hidden Ghost\n\n\t All Rights Reserved. 2013",
"About the application !!!",
MB_OK | MB_ICONINFORMATION
);
}
}
else if( msg == WM_CLOSE )
{
ExitProcess( 0 );
return 0;
}
return 0;
}
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine,int nCmdShow )
{
DialogBoxParam( hInst,( int ) MAKEINTRESOURCE( EJECT ),0,Eject,0 );
return 0;
}
Eject.h && Eject.rc:
// Eject.h
#define EJECT 0001
#define EJECT_BUT 0002
#define ABOUT 0003
// Eject.rc
#include <windows.h>
#include "Eject.h"
EJECT DIALOG 0,0,110,70
STYLE WS_CAPTION | DS_CENTER | WS_SYSMENU | WS_POPUP
EXSTYLE WS_EX_TOOLWINDOW
CAPTION " Eject Drive By The Hidden Ghost - Hamza Qdider -"
{
DEFPUSHBUTTON "Eject",EJECT_BUT,25,16,60,18,WS_CAPTION
PUSHBUTTON "About...",ABOUT,25,36,60,18,WS_CAPTION
}