你的 DSCURSORS 结构不对。
看看下面的例子(自己准备一个Tester.wav文件):
=============================================================
Option Explicit'We ALWAYS need the root DirectX object
'Note the use of 'New' in this line - this is important.
Dim Dx As New DirectX7
'All things DirectSound come from this next object.
'The Directsound object is based on the DirectX object.
Dim Ds As DirectSound'This is a buffer for holding the sound data.
'You can have as many of these as you like, and/or you
'can have them in an array. Although, try to keep the number
'of buffers used to a minimum - for good practise. It should be
'fairly obvious to you that you shouldn't use any more of anything
'than you actually need...
Dim DsBuffer As DirectSoundBuffer'These two describe the settings for the
'Buffer. See the Initialise procedure for more details.
Dim DsDesc As DSBUFFERDESC
Dim DsWave As WAVEFORMATEXDim CurrFreq As Long
Sub Initialise()
Label1.Caption = "Initialising DirectSound"
Set Ds = Dx.DirectSoundCreate("")'It is best to check for errors before continuing
If Err.Number <> 0 Then
    MsgBox "Unable to Continue, Error creating Directsound object."
    Label1.Caption = "Error"
    Exit Sub
End If'This tells DX how much we want directsound. If it
'is set to normal DX will allow other programs to use the soundcard
'If it is set to Exclusive ONLY we get to use the soundcard. Which
'is what you want when writing a game...
Ds.SetCooperativeLevel Form1.hWnd, DSSCL_NORMAL
Label1.Caption = "Loading File into buffer"
'These settings are quite important; what you set here reflects
'in the quality that the sound plays.
'8bit + 1 channel = Poor quality, but less processing time and less memory
'16bit + 2 channels = Good quality, more memory and more processing time
'The comments about processing time and memory will only affect you
'when you start putting a heavy load on the sound card; and/or it is
'playing/storing lots of sound files.
DsDesc.lFlags = DSBCAPS_CTRLFREQUENCY Or DSBCAPS_CTRLPAN Or DSBCAPS_CTRLVOLUME Or DSBCAPS_STATIC
DsWave.nFormatTag = WAVE_FORMAT_PCM 'Sound Must be PCM otherwise we get errors
DsWave.nChannels = 2    '1= Mono, 2 = Stereo
DsWave.lSamplesPerSec = 22050
DsWave.nBitsPerSample = 16 '16 =16bit, 8=8bit
DsWave.nBlockAlign = DsWave.nBitsPerSample / 8 * DsWave.nChannels
DsWave.lAvgBytesPerSec = DsWave.lSamplesPerSec * DsWave.nBlockAlign'This line creates a sound buffer based on the information you have just
'put in the two structures
Set DsBuffer = Ds.CreateSoundBufferFromFile(App.Path & "\Tester.Wav", DsDesc, DsWave)
CurrFreq = DsBuffer.GetFrequency
Label1.Caption = "Completed Initialisation"
End Sub
Sub PlaySound()
Label1.Caption = "Now playing sound"
'Set the next lines flag to DSBPLAY_DEFAULT if you
'only want it to play once.
DsBuffer.Play DSBPLAY_LOOPING
Timer1.Enabled = True
Label1.Caption = "Sound Finished"
'One thing to note, the program will continue operating whilst the
'sound is still playing. This is called Asyncronous processing.
'If you are used to the API sound functions, you may know that
'by default you're program stops running whilst the sound plays'Because it works like this you can play multiple sounds at once.
'But, if you want you're program to wait for the sound to finish you will
'have to write in a little loop that keeps going until
'the sound has reached the end.
End Sub
Sub StopSound()
'Stopping it effectively pauses it
DsBuffer.Stop
'Only when you set the current position to 0 will
'it go back to the beginning
DsBuffer.SetCurrentPosition 0
'You can use the SetCurrentPosition to jump around
'a sound file as you like; which can be useful
End Sub
Private Sub Form_Load()
'Just sets up the interface
Label2.Caption = "Written by Jack Hoxley, June 2000" & vbCr & "www.dx4vb.da.ru"
'Make sure the form is visible before we load.
'Otherwise the user won't see anything until the program has
'finished loading the DirectX stuff - which can take several seconds
Me.Show
'YOU MUST INITIALISE THE PROGRAM BEFORE YOU TRY
'AND PLAY ANY SOUNDS!!!
Call Initialise
'This will currently loop the sound until we close the program.
Call PlaySoundEnd Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Call StopSound
End SubPrivate Sub HScroll1_Change()
DsBuffer.SetPan HScroll1.Value
End SubPrivate Sub HScroll2_Change()
DsBuffer.SetVolume HScroll2.Value
End Sub
Private Sub Picture1_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
    Case vbKeyUp
        CurrFreq = CurrFreq + 1000
        If CurrFreq >= 99999 Then CurrFreq = 99999
    Case vbKeyDown
        CurrFreq = CurrFreq - 1000
        If CurrFreq <= 101 Then CurrFreq = 101
End Select
DsBuffer.SetFrequency CurrFreq
Label1.Caption = "Frequency now at " & CStr(CurrFreq) & "hz"
End Sub
Private Sub Timer1_Timer()
Dim CurrPos As DSCURSORS
DsBuffer.GetCurrentPosition CurrPos
Me.Caption = "DirectSound Demo {" & CStr(CurrPos.lPlay) & "}"
End Sub