I am trying to implement a DirectSound callback function in VB.net and getting very confused. This is probably due to the fact that I'm very new to .Net but made worse bacause all the examples of DirectSound callback i can find are VB6 and .Net seems to operate differently.
I have a class which is a wrapper for a directsound buffer and I want it to be notified when the buffer starts playing. As far as I can see, the class has to implement a DirectEvent8 interface so my class declaration looks like this
Imports DxVBLibA
Public Class recIntelliBuffer
Implements DirectXEvent8
Then I have a callback method in the class
Public Sub DirectxEvent8_DXCallback(ByVal eventid As Long) _
Implements DirectXEvent8.DXCallback
' callback handling
End Sub
The latter Implements clause was selected from Intellisense however I am getting two compile errors.
One on the class declaration says
'MusSoundBuffer.recIntelliBuffer' must implement 'Overridable Overloads Sub DXCallback(eventid As Integer)' for interface 'DxVBLibA.DirectXEvent8'.
The error on the callback declaration is
'DirectxEvent8_DXCallback' cannot implement 'DXCallback' because there is no matching sub on interface 'DirectXEvent8'.
Without getting into the world of DirectX, am I doing something obvoulsy wrong in declaring my implementation of the interface?
Any help or comments would be most welcome.
Thanks
Andrew
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only