Can't get the volume with mciSendString
Hello Everyone!!!
I am working in a multimedio player. I have being working with mcisendstring with fairly success, until recently with two problems, one of which I will like to address in this thread.
I do open, close, play, stop and pause the device ok. I use the seek, position, length. The problem is with trying to retrieve the current volume level, which I am supposed to do with the following statement:
Code:
Private Function DeviceVolumeGet() As Integer
Dim iSend As String
Dim iVolIs As Integer
If mDeckOpened = True Then
iSend = "status " & Trim(mDeckAlias) & " volume"
mDeckSendStringResult = Space(128)
mDeckSendStringRtn = mciSendString(iSend, mDeckSendStringResult, 128, 0)
iVolIs = Val(RemoveStr(mDeckSendStringResult, Chr(0)))
DeviceError
DeviceVolumeGet=iVolIs
End If
End Function
The function always returns zero, and the DeviceError procedure always shows the following error.
Quote:
290;The specified parameter is invalid for this command.
The iSend string variable holds
Quote:
status deck volume
Where deck is the alias declared in the open statement
Can anyone tell what am I doing wrong?
Regards