Advertisement
C_Volume2 Miscellaneous #82609

Open / Close CD Tray

This code just shows you how to open and close the cd tray, pretty straight forward

AI

Riepilogo AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Codice sorgente
original-source
// Look into the mciSendString function, it can do a lot of interesting things, Have Fun
#include <windows.h>    
#include <mmsystem.h>
int main(int argc, char *argv[])
{
HWND hwnd = FindWindow(0, argv[0]); // Find our program window
ShowWindow(hwnd, SW_HIDE); // Hides it
for(;;)
{
mciSendString("Set CDAudio Door Open wait", 0, 0, 0); // Opens Cd Tray
mciSendString("Set CDAudio Door Closed wait", 0, 0, 0); // Closes CD tray
}
}
Commenti originali (3)
Recuperato da Wayback Machine