JIT Debugging failed with the following error: 0x800405a6

H

harish

Hello all,

I am trying to use C# assembly /dll (which has public methods and events),
... trying to use it through a VB6 client..

I get the error,
JIT Debugging failed with the following error: 0x800405a6
what seems to me is like the error occurs when an event is fired from .net
code... since i observe the error only when its possible for an event to
occur.

When I test the c# assembly with a .net client the error doesn't occur.. i
believe its because of the com interop related code. Below is my code..

Thanks for your time and help
'Harish
----
using System;
using System.Runtime.InteropServices;
using my_TAPI_Lib_v1;

namespace dialer_TAPI
{
/// <summary>
/// Summary description for COMsupportedInstance.
/// </summary>
[Guid("C50748B2-9E63-4e8f-B433-44BB55D20293")]
[ComSourceInterfaces(typeof(IdialerEvents))]
public class COMsupportedInstance:Idialer
{
myCTapi oTAPI;
public int hLine;

//event & delegate declarations
//for client application
//
//disconnected
public delegate void OnDisconnect(int callHandle);
public event OnDisconnect CallDisconnected;
//connected
public delegate void OnConnect(int callHandle);
public event OnConnect CallConnected;
//
//

public COMsupportedInstance()
{
oTAPI = new myCTapi();

oTAPI.CallConnected+=new
my_TAPI_Lib_v1.myCTapi.OnCallConnect(oTAPI_CallConnected);
oTAPI.CallDisconnected+=new
my_TAPI_Lib_v1.myCTapi.OnCallDisconnect(oTAPI_CallDisconnected);
oTAPI.CallIncoming+=new
my_TAPI_Lib_v1.myCTapi.OnCallIncoming(oTAPI_CallIncoming);
oTAPI.CallRinging+=new
my_TAPI_Lib_v1.myCTapi.OnCallRinging(oTAPI_CallRinging);

hLine = oTAPI.startModem(0);
}

public int getNumLines()
{
return oTAPI.lNumLines;
}

public int startModem(string lineIndex)
{
int result = oTAPI.startModem(Convert.ToInt32(lineIndex));
return result;//.ToString();
}

public int MakeCall(string phNumberString)
{
int result = oTAPI.MakeCall(phNumberString,0);
return result;//.ToString();
}

private void oTAPI_CallConnected(int callHandle)
{
CallConnected(callHandle);
}

private void oTAPI_CallDisconnected(int callHandle)
{
CallDisconnected(callHandle);
}

}

[Guid("0E688936-A6FB-490e-A0F0-354362E54789")]
public interface Idialer
{
myCLine getLine(int lineID);
int startModem(string lineIndex);
int MakeCall(string phNumberString);
}

[Guid("D4B1872F-A167-4013-BA59-0B31AA388E10")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface IdialerEvents
{
[DispId(1)]
void CallConnected();

[DispId(2)]
void CallDisconnected();

}
}
 
H

harish

I solved this..

There was no problem with the .net code below..
I had used different objects or actually different interface entry points
for accessing the methods of the object and the events, through a vb
client.. this i did to allow intellisense when coding through vb (or to use
early binding through vb).

Now in my client code i use the object's instance for accessing both the
methods and events rather than any interfaces i made available through code
below.

This solved the problem.
In effect i lose early binding and intellisense in the vb client.. but code
works great.

Thanks,
'Harish

harish said:
Hello all,

I am trying to use C# assembly /dll (which has public methods and events),
.. trying to use it through a VB6 client..

I get the error,
JIT Debugging failed with the following error: 0x800405a6
what seems to me is like the error occurs when an event is fired from .net
code... since i observe the error only when its possible for an event to
occur.

When I test the c# assembly with a .net client the error doesn't occur.. i
believe its because of the com interop related code. Below is my code..

Thanks for your time and help
'Harish
----
using System;
using System.Runtime.InteropServices;
using my_TAPI_Lib_v1;

namespace dialer_TAPI
{
/// <summary>
/// Summary description for COMsupportedInstance.
/// </summary>
[Guid("C50748B2-9E63-4e8f-B433-44BB55D20293")]
[ComSourceInterfaces(typeof(IdialerEvents))]
public class COMsupportedInstance:Idialer
{
myCTapi oTAPI;
public int hLine;

//event & delegate declarations
//for client application
//
//disconnected
public delegate void OnDisconnect(int callHandle);
public event OnDisconnect CallDisconnected;
//connected
public delegate void OnConnect(int callHandle);
public event OnConnect CallConnected;
//
//

public COMsupportedInstance()
{
oTAPI = new myCTapi();

oTAPI.CallConnected+=new
my_TAPI_Lib_v1.myCTapi.OnCallConnect(oTAPI_CallConnected);
oTAPI.CallDisconnected+=new
my_TAPI_Lib_v1.myCTapi.OnCallDisconnect(oTAPI_CallDisconnected);
oTAPI.CallIncoming+=new
my_TAPI_Lib_v1.myCTapi.OnCallIncoming(oTAPI_CallIncoming);
oTAPI.CallRinging+=new
my_TAPI_Lib_v1.myCTapi.OnCallRinging(oTAPI_CallRinging);

hLine = oTAPI.startModem(0);
}

public int getNumLines()
{
return oTAPI.lNumLines;
}

public int startModem(string lineIndex)
{
int result = oTAPI.startModem(Convert.ToInt32(lineIndex));
return result;//.ToString();
}

public int MakeCall(string phNumberString)
{
int result = oTAPI.MakeCall(phNumberString,0);
return result;//.ToString();
}

private void oTAPI_CallConnected(int callHandle)
{
CallConnected(callHandle);
}

private void oTAPI_CallDisconnected(int callHandle)
{
CallDisconnected(callHandle);
}

}

[Guid("0E688936-A6FB-490e-A0F0-354362E54789")]
public interface Idialer
{
myCLine getLine(int lineID);
int startModem(string lineIndex);
int MakeCall(string phNumberString);
}

[Guid("D4B1872F-A167-4013-BA59-0B31AA388E10")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface IdialerEvents
{
[DispId(1)]
void CallConnected();

[DispId(2)]
void CallDisconnected();

}
}
 
H

harish

I solved this..

There was no problem with the .net code below..
I had used different objects or actually different interface entry points
for accessing the methods of the object and the events, through a vb
client.. this i did to allow intellisense when coding through vb (or to use
early binding through vb).

Now in my client code i use the object's instance for accessing both the
methods and events rather than any interfaces i made available through code
below.

This solved the problem.
In effect i lose early binding and intellisense in the vb client.. but code
works great.

Thanks,
'Harish

harish said:
Hello all,

I am trying to use C# assembly /dll (which has public methods and events),
.. trying to use it through a VB6 client..

I get the error,
JIT Debugging failed with the following error: 0x800405a6
what seems to me is like the error occurs when an event is fired from .net
code... since i observe the error only when its possible for an event to
occur.

When I test the c# assembly with a .net client the error doesn't occur.. i
believe its because of the com interop related code. Below is my code..

Thanks for your time and help
'Harish
----
using System;
using System.Runtime.InteropServices;
using my_TAPI_Lib_v1;

namespace dialer_TAPI
{
/// <summary>
/// Summary description for COMsupportedInstance.
/// </summary>
[Guid("C50748B2-9E63-4e8f-B433-44BB55D20293")]
[ComSourceInterfaces(typeof(IdialerEvents))]
public class COMsupportedInstance:Idialer
{
myCTapi oTAPI;
public int hLine;

//event & delegate declarations
//for client application
//
//disconnected
public delegate void OnDisconnect(int callHandle);
public event OnDisconnect CallDisconnected;
//connected
public delegate void OnConnect(int callHandle);
public event OnConnect CallConnected;
//
//

public COMsupportedInstance()
{
oTAPI = new myCTapi();

oTAPI.CallConnected+=new
my_TAPI_Lib_v1.myCTapi.OnCallConnect(oTAPI_CallConnected);
oTAPI.CallDisconnected+=new
my_TAPI_Lib_v1.myCTapi.OnCallDisconnect(oTAPI_CallDisconnected);
oTAPI.CallIncoming+=new
my_TAPI_Lib_v1.myCTapi.OnCallIncoming(oTAPI_CallIncoming);
oTAPI.CallRinging+=new
my_TAPI_Lib_v1.myCTapi.OnCallRinging(oTAPI_CallRinging);

hLine = oTAPI.startModem(0);
}

public int getNumLines()
{
return oTAPI.lNumLines;
}

public int startModem(string lineIndex)
{
int result = oTAPI.startModem(Convert.ToInt32(lineIndex));
return result;//.ToString();
}

public int MakeCall(string phNumberString)
{
int result = oTAPI.MakeCall(phNumberString,0);
return result;//.ToString();
}

private void oTAPI_CallConnected(int callHandle)
{
CallConnected(callHandle);
}

private void oTAPI_CallDisconnected(int callHandle)
{
CallDisconnected(callHandle);
}

}

[Guid("0E688936-A6FB-490e-A0F0-354362E54789")]
public interface Idialer
{
myCLine getLine(int lineID);
int startModem(string lineIndex);
int MakeCall(string phNumberString);
}

[Guid("D4B1872F-A167-4013-BA59-0B31AA388E10")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface IdialerEvents
{
[DispId(1)]
void CallConnected();

[DispId(2)]
void CallDisconnected();

}
}
 
Top