Coder Profile - Show off your skills, get a coder profile.
 
 
 
The Author
xDUtCH
Anthony
Send A Message
Rating
6.00
out of 10
( 1 Ratings )
Please login to rate source codes.

Click here to register a free account with us.
General Details
C++
Posted 121 Days Ago
182 Views
Received 1 Rating
More Codes By This Author
Small Number Loop
Open/Close CD Tray

Open/Close CD Tray


Description
Basicly just opens up your CD tray...
Technical
Microsoft Visual C++ 6.0
Source Code
Comments
Please login to post comments.
 
FallingTears     Posted 11 Days Ago
 
 
This is a sweet code.
 
otoom     Posted 113 Days Ago
 
 
Lakario, make sure you are using Visual C++ 6.0, if not you will have to link them.
For Dev it would be -lwinmm.

You can put this into one file instead, without making a functions file.

//////////////////////////////// main.cpp ///////////////////////////
// If you are using such as dev-cpp. You will have to link the following ->
-lwinmm.
#pragma comment(lib, "winmm.lib") // Comment this out if NOT using
Microsoft Visual C++


#include <windows.h>

void OpenCDTray()
{
mciSendString("set cdaudio door open", NULL, 0, NULL);
}

void CloseCDTray()
{
mciSendString("set cdaudio door close", NULL, 0, NULL);
}


int main()
{
OpenCDTray();
CloseCDTray();
}
 
Lakario     Posted 115 Days Ago
 
 
what is that functions.h? I have no such library.
 
mikeMarek     Posted 119 Days Ago
 
 
Nice, i was always wondering how to do that! Maybe I can loop it continuously and
place it on my brother's PC (as you can tell from my other posts around here
I'm not too keen on my brother :P).

You also forgot to close your function void CloseCDTray(). You should have a
closing curly brace on line 24.

Best regards,
-Mike
Page 1 of 1
More "C++" Source Codes By This Author
Recently Posted "C++" Source Codes
Recently Rated "C++" Source Codes
 
 
Latest News About Coder Profile
Coder Profile Poll
What would you rate the usability of Coder Profile?

9 to 10
7 to 8
5 to 6
3 to 4
1 to 2


please login to cast your vote
and see the results of this poll
Latest Coder Profile Changes
Coder Profile was last updated
5 Days Ago
Official Blog :: Make A Donation :: Credits :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents :: Wallpapers
Version 1.46.00
Copyright © 2007 - 2008, Scott Thompson, All Rights Reserved