Results 1 to 1 of 1

Thread: Can't get the volume with mciSendString

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2009

    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:

    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)))
        End If
    End Function
    The function always returns zero, and the DeviceError procedure always shows the following error.

    290;The specified parameter is invalid for this command.
    The iSend string variable holds

    status deck volume
    Where deck is the alias declared in the open statement

    Can anyone tell what am I doing wrong?

    Last edited by Santiago Barreiro; Jan 13th, 2011 at 04:20 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width