Page 1 of 2
.NET DLL

Posted:
Mon 24. Jan 2011, 21:07
by lagommette
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
Re: .NET DLL

Posted:
Mon 24. Jan 2011, 21:07
by lagommette
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
Re: .NET DLL

Posted:
Mon 24. Jan 2011, 21:10
by IRTrans
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
Re: .NET DLL

Posted:
Mon 24. Jan 2011, 22:30
by lagommette
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
Re: .NET DLL

Posted:
Thu 10. Feb 2011, 21:15
by lagommette
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
Re: .NET DLL

Posted:
Sat 12. Feb 2011, 17:02
by IRTrans
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
Re: .NET DLL

Posted:
Mon 14. Feb 2011, 08:53
by IRTrans
Hi,
here is how to reload the database:
Public Function ReloadDatabase() As IRTrans.NET.NETWORKSTATUS
Member von: IRTrans.NET.IRTransServer
IRTrans
Re: .NET DLL

Posted:
Tue 22. Feb 2011, 21:12
by lagommette
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
Re: .NET DLL

Posted:
Tue 22. Feb 2011, 21:30
by IRTrans
Hi,
looks like you are using a VERY old DLL.
Download our latest SW - it includes a current version of the DLL.
IRTrans
Re: .NET DLL

Posted:
Tue 22. Feb 2011, 22:22
by lagommette
Indeed, its much better with the last realease
Thanks for your help !
Regards,
lagommette