470,591 Members | 2,137 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,591 developers. It's quick & easy.

JIT Debugging failed with the following error: 0x800405a6

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_CallCon nected);
oTAPI.CallDisconnected+=new
my_TAPI_Lib_v1.myCTapi.OnCallDisconnect(oTAPI_Call Disconnected);
oTAPI.CallIncoming+=new
my_TAPI_Lib_v1.myCTapi.OnCallIncoming(oTAPI_CallIn coming);
oTAPI.CallRinging+=new
my_TAPI_Lib_v1.myCTapi.OnCallRinging(oTAPI_CallRin ging);

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.InterfaceIsIDispatc h)]
public interface IdialerEvents
{
[DispId(1)]
void CallConnected();

[DispId(2)]
void CallDisconnected();

}
}
Mar 26 '06 #1
2 4678
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" <ha*******@yahoo.com> wrote in message
news:OG*************@TK2MSFTNGP09.phx.gbl...
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_CallCon nected);
oTAPI.CallDisconnected+=new
my_TAPI_Lib_v1.myCTapi.OnCallDisconnect(oTAPI_Call Disconnected);
oTAPI.CallIncoming+=new
my_TAPI_Lib_v1.myCTapi.OnCallIncoming(oTAPI_CallIn coming);
oTAPI.CallRinging+=new
my_TAPI_Lib_v1.myCTapi.OnCallRinging(oTAPI_CallRin ging);

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.InterfaceIsIDispatc h)]
public interface IdialerEvents
{
[DispId(1)]
void CallConnected();

[DispId(2)]
void CallDisconnected();

}
}

Mar 27 '06 #2
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" <ha*******@yahoo.com> wrote in message
news:OG*************@TK2MSFTNGP09.phx.gbl...
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_CallCon nected);
oTAPI.CallDisconnected+=new
my_TAPI_Lib_v1.myCTapi.OnCallDisconnect(oTAPI_Call Disconnected);
oTAPI.CallIncoming+=new
my_TAPI_Lib_v1.myCTapi.OnCallIncoming(oTAPI_CallIn coming);
oTAPI.CallRinging+=new
my_TAPI_Lib_v1.myCTapi.OnCallRinging(oTAPI_CallRin ging);

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.InterfaceIsIDispatc h)]
public interface IdialerEvents
{
[DispId(1)]
void CallConnected();

[DispId(2)]
void CallDisconnected();

}
}

Mar 27 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Steve Wark | last post: by
1 post views Thread by Stephen | last post: by
1 post views Thread by si_owen | last post: by
reply views Thread by Benny | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.