Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MCI problems in Win2k
Message
From
05/12/2001 12:37:30
 
 
To
05/12/2001 12:22:13
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00589552
Message ID:
00589977
Views:
28
>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.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform