Hi,

I have a .NET (C#) control which is hosted by the VB6 application. How can I pass notifications from the control to the application?

The possible solution could be the following: The VB6 app will pass the function pointer (callback) to the control. The control remembers the pointer and sends via it the notifications to the app. That's normal callback mechanism. However, whenever I try to call this VB6 callback from the control I get the "Object reference not set to an instance of the object" error.

VB6 code:
----------
Function EventCB(eventID As Integer)
... do something ...
End Function

control.RegisterEventCallback( AddressOf EventCB )

.NET C# code (control):
-----------------------
int EventCallbackPointer;

RegisterEventCallback( int CBPtr )
{
EventCallbackPointer = CBPtr;
}

void OnEvent( int eventID )
{
WANT TO CALL EventCB via EventCallbackPointer - HOW ???
}

Thanks for your help.

Peter