Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Callback function
Message
From
20/12/2002 10:52:11
Andrew Fell-Gordon
Calypso Publications Ltd
Enfield, United Kingdom
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Callback function
Miscellaneous
Thread ID:
00734905
Message ID:
00734905
Views:
57
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
Map
View

Click here to load this message in the networking platform