I have some question about how to play VCD,DVD and detect CD type in the CDROM.

1. About how to play VCD, DVD, I saw mciSendString() and mciSendCommand() can be use. But I don't know how to set the paramater about this two method. Can any body tell me how to do this?

[Method1]:It can eject CD, but how to change the string paramater to play, pause, previous, next VCD,DVD.

¡@¡@mciSendString ("Set cdaudio door open", NULL, 0, NULL);


[Method2]:Compiler will be error.

¡@¡@#include <windows.h>
¡@¡@#include <Mmsystem.h>

¡@¡@typedef struct {
¡@¡@¡@¡@¡@¡@DWORD dwCallback;
¡@¡@¡@¡@¡@¡@DWORD dwFrom;
¡@¡@¡@¡@¡@¡@DWORD dwTo;
¡@¡@} MCI_PLAY_PARMS;

¡@¡@MCI_PLAY_PARMS *pMci_Play;
¡@¡@unsigned long err;
¡@¡@MCIDEVICEID wDeviceID;

¡@¡@MCIERROR mciSendCommand(
wDeviceID,
MCI_PLAY,
MCI_NOTIFY_ABORTED,
pMci_Play
¡@¡@);


2. About How to Detect CD type in CDROM, I saw get_MediaStatus() can be use.

[Method]:Compiler is error.

¡@¡@Get Media Status
¡@¡@MEDIASTATUS pMediaStatus;
¡@¡@UINT MediaResult = get_MediaStatus(pMediaStatus);
¡@¡@switch (MediaResult)
¡@¡@{
¡@¡@case MS_INSERTED :
¡@¡@ MessageBox("MS_INSERTED");
¡@¡@case MS_REMOVED :
¡@¡@ MessageBox("MS_REMOVED);
¡@¡@case MS_LOADING :
¡@¡@ MessageBox("MS_LOADING");
¡@¡@case MS_UNKNOWN :
¡@¡@ MessageBox("MS_UNKNOWN");
¡@¡@}