??????????? ???????? ?? ??? Visual Basic ??? Soundcard ??? ???? ????

???? ?????? ???? ??????
???? ID: 180032 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

??????

?? ???? ????? ???? ?? ?? WaveAudio ?????? (soundcard) ????? ??????????? ???????? (MCI32.ocx) Visual Basic ?? ????? ?? ??? ???? ?? ??? ???? ?????

???? ???????

WaveAudio ?????? (soundcard) ?????? ??????????? ???????? ????? ?? ??? ???? ?? ??? ?? mciSendCommand API ?? ????? ???? ?????? ??????????? ???????? ???? ?????? ?? ??????? ???? ?? ????? ?? ??? ????? ???? ???? ?? ??? ??? ???? ???? ?????? ?????

????? Visual Basic ????? ??? ?? ???? WaveAudio ?????? ?? ??? ????? ?? ?? ?????? ?? ????????? ???? ?? ??? mciSendCommand ?? ????? ???? ?? ??? ?????? ???

????? ???

????? ?????? ????????? ?? declarations ???? ?? ??? ??? ??????? ????? ?????:
   Public Const MMSYSERR_NOERROR = 0
   Public Const MCI_SET = &H80D
   Public Const MCI_WAVE_OUTPUT = &H800000
   Type MCI_WAVE_SET_PARMS
       dwCallback As Long
       dwTimeFormat As Long
       dwAudio As Long
       wInput As Long
       wOutput As Long
       wFormatTag As Integer
       wReserved2 As Integer
       nChannels As Integer
       wReserved3 As Integer
       nSamplesPerSec As Long
       nAvgBytesPerSec As Long
       nBlockAlign As Integer
       wReserved4 As Integer
       wBitsPerSample As Integer
       wReserved5 As Integer
   End Type

   Declare Function mciGetErrorString Lib "winmm.dll" _
       Alias "mciGetErrorStringA" (ByVal dwError As Long, _
       ByVal lpstrBuffer As String, ByVal uLength As Long) As Long

   Declare Function mciSendCommand Lib "winmm.dll" Alias _
       "mciSendCommandA" (ByVal wDeviceID As Long, _
       ByVal uMessage As Long, ByVal dwParam1 As Long, _
       ByRef dwParam2 As Any) As Long

				

????? ???

????? ??? ?????? ?????? ??? ???? ??? ?? ??? ????? "MMControl1." ???? ?? ??????????? ???????? ?? ??? ???? ????? ?? MMControl1 ?????? ???? ??? ?? ??? ?? ??? ?? ??? ???? ?? ???? ???? ??????
   Dim parms As MCI_WAVE_SET_PARMS
    Dim rc As Long

    ' Specify the soundcard. This specifies the soundcard with a deviceID
    ' of 0. If you have a single soundcard, then this will open it. If you
    ' have multiple soundcards, the deviceIDs will be 0, 1, 2, etc.
    parms.wOutput = 0

    ' Send the MCI command to set the output device.
    rc = mciSendCommand(MMControl1.DeviceID, MCI_SET, _
        MCI_WAVE_OUTPUT, parms)

    if (rc <> MMSYSERR_NOERROR) then
        ' The command failed.
    End If
				

??????

Win32 SDK ?????????? ??? mciSendCommand ?? ???????? ??????

???

???? ID: 180032 - ????? ???????: 02 ?????? 2010 - ??????: 4.0
???? ???? ???? ??:
  • Microsoft Win32 Application Programming Interface, ?? ???? ??? ?????? ???? ???:
    • Microsoft Windows 95
??????: 
kbhowto kbmt KB180032 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:180032

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com