分类: C/C++
2011-06-10 11:30:05
转载请注明出处
一 引入头文件,声明函数原型
#ifdef _WIN32
#include
#include
#include
#pragma comment(lib,"winmm.lib")
WINMMAPI MCIERROR WINAPI mciSendStringA( __in LPCSTR lpstrCommand, __out_ecount_opt(uReturnLength) LPSTR lpstrReturnString,
__in UINT uReturnLength, __in_opt HWND hwndCallback);
#else
#endif
二 弹出光驱
#ifdef _WIN32
mciSendStringA("set cdaudio door open", 0, 0, 0);
#else
#endif
三 进仓
#ifdef _WIN32
mciSendStringA( "set cdaudio door closed ", 0, 0, 0);
#else
#endif