From: Holysmoke on
Hi,

I have to handle a VB 6.0 Application Generated event in my WPF application.

I tried this following things but it does n't work. Could anyone of help to
resolve this problem. May be pointing out good example of this scenario will
also more helpful.

Created a ActiveX Dll Project in VB 6.0 with a class


Public Event OnConnectedEvent(FromPhoneURI As String)

Public Event OnTerminatedEvent(FromPhoneURI As String)

Public Sub Connect(ByVal FromPhoneURI As String)

RaiseEvent OnConnectedEvent(FromPhoneURI)

End Sub


Public Sub Terminate(ByVal FromPhoneURI As String)

RaiseEvent OnTerminatedEvent(FromPhoneURI)

End Sub


Then Created a VB EXE project for TEST

on a button click I call,

Private m_CCM As New PhoneticaCCM.Totem
Private Sub Command1_Click()


m_CCM.Connect ("9908(a)10.50.32.50")


End Sub

Private Sub Command2_Click()

m_CCM.Terminate ("9908(a)10.50.32.50")

End Sub


On WPF side, I reference this COM object and registered this event


private PhoneticaCCM.TotemClass myCOMObject = new
PhoneticaCCM.TotemClass();

public Window1()
{

myCOMObject .OnTotemConnectedEvent +=new
PhoneticaCCM.__Totem_OnTotemConnectedEventEventHandler(totem_OnTotemConnectedEvent);
InitializeComponent();

}

public void totem_OnTotemConnectedEvent(ref string FromPhoneURI)
{
MessageBox.Show(FromPhoneURI);
}


and my MessageBOX never shows up.

but I call the myCOMObject.Connect method from WPF the event pops up but I
call the same method from VB EXE never pops up

Please help.

TIA,
Holy