.NET class library

Top  Previous  Next

.NET applications may use XECI APIs using the XECI .NET class library. The class library is contained in the XFRAME WINAPI package in the DLL xecinet.dll.

The access to the API is performed though the class XFRAME.ECI.ExternalCallInterface.

Sample

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using XFRAME.ECI;

using System.Net;

 

namespace xecinetdemo {

   class Program {

       static void Main(string[] args) {

           try {

               ExternalCallInterface eci = new

                       ExternalCallInterface(Dns.GetHostEntry("linux02").AddressList[0], 6000, true);

                           ByteArray ca=new ByteArray(80);

                           ca.SetString("message from c#", 0, 80);

                           eci.link("XECISRV", ca.GetBytes());

                           Console.WriteLine("--> ["+ca.GetString(0, ca.Length));

                           ca.Fill(0, ca.Length, (byte)0);

                           ca.SetString("second message from c#", 0, 80);

                           eci.link("XECISRV", ca.GetBytes());

                           Console.WriteLine("--> ["+ca.GetString(0, ca.Length));

                           eci.Close();

                   } catch (Exception e) {

                           Console.Out.WriteLine(e);

                   }

       }

   }

}