2010-02-05 10 views
0

Existe-t-il un moyen d'interroger le périphérique mci pour interroger la position de lecture actuelle afin que nous puissions reprendre à partir de là pour jouer plus tard?pourquoi mciSendString() pour obtenir la position de statut échoue dans mon code?

cmd.Format (L "statut% d position waveaudio", m_iDeviceIDPlayer);

mcirez = mciSendString (cmd, buff.GetBuffer(), 1024, NULL);

donne cette erreur: « Le périphérique spécifié n'est pas ouvert ou non reconnu par MCI »

est-il un problème avec la commande?

Répondre

0
MCI_STATUS_PARMS status; 
status.dwItem = MCI_STATUS_POSITION; 
status.dwCallback = 0; 

dwReturn = mciSendCommand(m_iDeviceIDPlayer,MCI_STATUS,MCI_STATUS_ITEM|MCI_WAIT,(DWORD_PTR)&status);  

Position -> status.dwReturn est la position requise.