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 CLEAR =doMCI("OPEN c:\windows\media\chord.wav alias MyMedia WAIT") =doMCI("SET MyMedia time format milliseconds") nMediaLength = VAL(doMCI("STATUS MyMedia Length")) ?nMediaLength =doMCI("CLOSE MyMedia") FUNCTION doMCI LPARAMETERS cMCIcmd cRetString = space(80) nRetValue = mciSendString(cMCIcmd,@cRetString,len(cRetString),0) IF nRetValue > 0 nError = nRetValue cErrorString = SPACE(256) CeRR = mciGetErrorString(nError,@cErrorString,len(cErrorString)) RETURN CeRR ENDIF RETURN TRIM(STRTRAN(cRetString,chr(0),""))