open.lpstrElementName = "G:\\";
open.lpstrDeviceType = (LPCSTR)MCI_DEVTYPE_CD_AUDIO;
DWORD flag = MCI_OPEN_ELEMENT | MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID
| MCI_OPEN_SHAREABLE;
mciSendCommand(NULL,MCI_OPEN,flag,(unsigned long&open);
这样为什么打不开光驱?
还得+上
mciSendCommand(open.wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN | MCI_WAIT, 0);
一句
MSDN真的看不懂!
open.lpstrDeviceType = (LPCSTR)MCI_DEVTYPE_CD_AUDIO;
DWORD flag = MCI_OPEN_ELEMENT | MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID
| MCI_OPEN_SHAREABLE;
mciSendCommand(NULL,MCI_OPEN,flag,(unsigned long&open);
这样为什么打不开光驱?
还得+上
mciSendCommand(open.wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN | MCI_WAIT, 0);
一句
MSDN真的看不懂!
The MCI_OPEN command initializes a device or file. All devices recognize this command.To send this command, call the mciSendCommand function with the following parameters.
这个只初始化设备以及文件等..