Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using mci functions

Status
Not open for further replies.

jd21

Programmer
Joined
Nov 27, 2005
Messages
1
Location
GB
I'm programming a win32 console app in Visual C++ Express to play a cd from my laptop. The problem is mcisendstring keeps returning the same error (292)

'The specified command requires and alias, file, driver, or device name. Please supply one.'

Can anyone see my problem??

Thanks


My code:

char szErrorBuf[MAXERRORLENGTH];
char cd_desc[] = "cdaudio";
char alias[] = "MyCDAudio";
char mciCommand[128];

sprintf(mciCommand, "open %s alias %s", cd_desc, alias);

// opens cd audio device as MyCDAudio
DWORD dwtemp = mciSendString((LPWSTR)mciCommand, 0, 0, 0);

mciGetErrorString(dwtemp,(LPWSTR) szErrorBuf, MAXERRORLENGTH);



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top