Constantly Open/Close the CD tray [FUNNY] 10-23-2013, 10:27 PM
#1
I've recently been messing around with interfacing with the hardware, in this case I've been playing with MCI (Media Control Interface) in Windows, I just had a but of fun and play a prank on my friend, I did a very quick 2 minute program that will constantly open/close the CD tray. Now his doesn't close by it's self as it is spring//coil operated - but every time he close the tray it kept on opening. His face was so funny and he thought it was broke until I explained what I'd done... anyway without more rambling here's the code:
Code:
#include <windows.h>
#pragma comment(lib, "winmm")
int main()
{
while(true)
{
if(!mciSendString("set CDAudio door open", NULL, 0, NULL))
mciSendString("set CDAudio door closed", NULL, 0, NULL);
}
return 0;
}