Advertisement

Problems with my "mciSendCommand" function,can you help me? thanks!

Started by December 21, 2002 06:17 AM
0 comments, last by cuqq 21 years, 10 months ago
the err message is: can''t parse the exterior command; my complier entirement is visual c++.net the complete code is the following: //////////////////////////////////////////////////////////////// int Game::Init() { QueryPerformanceFrequency((LARGE_INTEGER*)&freq); MCI_OPEN_PARMS OpenParms; OpenParms.lpstrDeviceType= (LPCSTR) MCI_DEVTYPE_SEQUENCER; OpenParms.lpstrElementName=(LPCSTR) "northspr.mid"; OpenParms.wDeviceID=0; mciSendCommand (NULL, MCI_OPEN, MCI_WAIT | MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID | MCI_OPEN_ELEMENT, (DWORD)(LPVOID) &OpenParms); //<------ error MCI_PLAY_PARMS PlayParms; PlayParms.dwFrom=0; mciSendCommand(OpenParms.wDeviceID, MCI_PLAY, MCI_FROM, (DWORD)(LPVOID)&PlayParms);//<------ error return graph->Init(); } //////////////////////////////////////////////////////////////// Nice to meet you! Let''''s study together... will u? ^_^
£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­Nice to meet you!Let''s study together... will u? ^_^
I''ve solved this problem,the reason is i didn''t add the following code to my .cpp file

#include "mmsystem.h"
#pragma comment (lib,"WINMM.LIB")



Nice to meet you!
Let''''s study together... will u? ^_^
£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­Nice to meet you!Let''s study together... will u? ^_^

This topic is closed to new replies.

Advertisement