Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Callback function
Message
From
20/12/2002 18:28:45
Andrew Fell-Gordon
Calypso Publications Ltd
Enfield, United Kingdom
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00734905
Message ID:
00735056
Views:
19
Very many thanks. I'll go through the sample code over the weekend but I can see what you are saying about implementing the interface.

Have a good Christmas

Andrew

>Andrew,
>
>Here is a link of some sample code provided to work with DirectX in VB.NET:
>
>http://www.developersdex.com/vb/message.asp?p=1121&ID=%3C%23rG3VIMkCHA%2E2632%40tkmsftngp12%3E
>
>As far as your errors, your function calls must match the data types exactly because .NET allows for overloading of functions. It appears that the DXCallback function requires an Integer data type to be passed in as well as the Long type. You also have to implement all the functions in the interface, even if you will not add any code to them.
>
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform