.NET DLL

The place where software developers meet

Moderator: marcus

.NET DLL

Postby lagommette » Mon 24. Jan 2011, 21:07

Hello,

I am actually rewriting HC-SKIPPER's connection module in order to use the .NET dll and abandon the active-x. It works great. It is really pleasant to deal with this dll :)
I encounter a problem though when trying (for tests purposes) to connect to the wrong IP. For example I write this code:

Try
Device = New IRTransServer("localhos")

Catch ex As IRTrans.NET.IRTransConnectionException
MsgBox("Wrong IP !")
End Try
lagommette
 
Posts: 35
Joined: Wed 29. Jul 2009, 20:38

Re: .NET DLL

Postby lagommette » Mon 24. Jan 2011, 21:07

An IRTrans.NET.IRTransConnectionException is indeed raised and the message is shown. But once I click on the OK button of the message, application breaks with this error:
System.NullReferenceException was unhandled
Message=La référence d'objet n'est pas définie à une instance d'un objet.
Source=IRTrans.NET
StackTrace:
à IRTrans.NET.IRTransServer.Close()
à IRTrans.NET.IRTransServer.Dispose(Boolean disposing)
à IRTrans.NET.IRTransServer.Finalize()
InnerException:

It seems that the error is inside the dll. What can I do to prevent my app from breaking ? Dll's release is 4.0.18.26026.

Thanks for your help.

Regards,

lagommette
lagommette
 
Posts: 35
Joined: Wed 29. Jul 2009, 20:38

Re: .NET DLL

Postby IRTrans » Mon 24. Jan 2011, 21:10

Hi,
can you send us some code so that we can reproduce the problem here?

Then we will surely be able to fix that.

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32

Re: .NET DLL

Postby lagommette » Mon 24. Jan 2011, 22:30

Hi,

I am developping in VB for .NET. But I've just tried with your c# example and it breaks the same:



private void Form1_Load(object sender, System.EventArgs e)
{
try
{
irt = new IRTransServer("localhos");

irt.StartAsnycReceiver ();

irt.IRReceive += new IRTrans.NET.IRTransServer.IRReceiveEventHandler (IRReceived);
}
catch (IRTransConnectionException ex)
{
MessageBox.Show(ex.Message);
}
}

You have to comment the protected override void Dispose method.

I notice that this error occurs only when I pass for example "localhos" instead of "localhost". If I pass a wrong address like "192.168.0.0" it does not break.

I have found a solution. Before calling the IRTransServer function I make a ping on the address. If the reply is success then I continue.

regards,

lagommette
lagommette
 
Posts: 35
Joined: Wed 29. Jul 2009, 20:38

Re: .NET DLL

Postby lagommette » Thu 10. Feb 2011, 21:15

Hi,

Where can I get some detailled information about the methods, properties returned errors etc. for the object IRTransServer ?

How can I reload database with the .NET dll ?

Thanks for your help.

Regards,

lagommette
lagommette
 
Posts: 35
Joined: Wed 29. Jul 2009, 20:38

Re: .NET DLL

Postby IRTrans » Sat 12. Feb 2011, 17:02

Hi,
currently we do not have comprehensive instructions for the .NET DLL. If you have any questions on some of the calls we can of course help you.

I will need to check how you can reload the database.

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32

Re: .NET DLL

Postby IRTrans » Mon 14. Feb 2011, 08:53

Hi,
here is how to reload the database:

Public Function ReloadDatabase() As IRTrans.NET.NETWORKSTATUS
Member von: IRTrans.NET.IRTransServer

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32

Re: .NET DLL

Postby lagommette » Tue 22. Feb 2011, 21:12

Hi,

I can't find this method. Maybe I am not using the correct version of the dll:

Runtime version = v1.1.4322
Version = 2.7.2.0

This method is not listed in the Object Browser of visual studio.

Any idea ?

Regards,

lagommette
lagommette
 
Posts: 35
Joined: Wed 29. Jul 2009, 20:38

Re: .NET DLL

Postby IRTrans » Tue 22. Feb 2011, 21:30

Hi,
looks like you are using a VERY old DLL.

Download our latest SW - it includes a current version of the DLL.

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32

Re: .NET DLL

Postby lagommette » Tue 22. Feb 2011, 22:22

Indeed, its much better with the last realease :D

Thanks for your help !

Regards,

lagommette
lagommette
 
Posts: 35
Joined: Wed 29. Jul 2009, 20:38

Next

Return to APIs

Who is online

Users browsing this forum: No registered users and 14 guests