>The program returns a 277 error "The MCI device you are using does not recognize the specified command" when it is run. This occurs when a basic open statment is used.
>
>DECLARE Statements used in Form.Init
>
>
>DECLARE INTEGER mciSendString ;
> IN WinMM.DLL ;
> STRING cMCIString,;
> STRING @cRetString,;
> INTEGER nRetLength,;
> INTEGER hInstance
>
>DECLARE INTEGER mciGetErrorString ;
> IN WINMM.DLL ;
> INTEGER nErrorno, ;
> STRING @cBuffer, ;
> INTEGER nBufSize
>
>
>Open Code
> cCmd = ('OPEN "' + cFileName + '" alias FoxMedia' + ;
> ' style child parent ' + ALLTRIM(STR(cur_window)) + ' WAIT')
> THISFORM.doMCI(cCmd)
>
>
>PLAY Code
>THISFORM.doMCI("PLAY FoxMedia")
>
>
>
>DoMCI Code
>LPARAMETERS cMCIcmd
>cRetString = space(80)
>nRetValue = mciSendString(cMCIcmd,@cRetString,len(cRetString),0)
>cErr = THIS.getMCIerror(nRetValue)
>IF nRetValue > 0
> RETURN CeRR
>ENDIF
>RETURN TRIM(STRTRAN(cRetString,chr(0),""))
>
>
>Any Ideas?
My guess, not having done much with the MCI API calls, is that cFilename potentially contains embedded delimiters; if that's the case, it must me encapsulated to indicate that it is a single argument, probably with single or double quotes. It's a SWAG.