Difference between revisions of "FAQ. Microsoft .NET framework"

From Overbyte
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
 
== Deployment ==
 
== Deployment ==
  
Additionally to the your own files and the ICS-dll you created you need to deploy these Delphi-files: Borland.Delphi.dll, Borland.Vcl.dll and Borland.VclRtl.dll.
+
The following files are needed when deploying your application
 +
 
 +
* ICS.dll (the file that you have created yourself as per description above)
 +
* Borland.Delphi.dll
 +
* Borland.Vcl.dll  
 +
* Borland.VclRtl.dll.
  
 
== Examples ==
 
== Examples ==
Line 17: Line 22:
 
=== Creating a socket in C# ===
 
=== Creating a socket in C# ===
  
Add a reference to the DLL that you created. Then add using and the code at proper places.
+
Add a reference to the DLL that you created. Then add something like this to your using-section and code:
  
 
   using OverByte.Ics;
 
   using OverByte.Ics;

Latest revision as of 09:38, 28 October 2010

Main page -> FAQ -> Microsoft .NET framework

Creating a .Net package in Delphi for .Net

  1. Create a .net package (recommendation from dr Bob at http://www.drbob42.com/examines/examin55.htm)
  2. Add the units in the DotNet-folder of ICS e g Overbyte.Ics.Component.pas et c.
  3. Add the Borland VCL (the units implicity uses them so they are needed as a reference)
  4. Compile and the finished DLL-can be used by .Net environments like Visual Studio 2005.


Deployment

The following files are needed when deploying your application

  • ICS.dll (the file that you have created yourself as per description above)
  • Borland.Delphi.dll
  • Borland.Vcl.dll
  • Borland.VclRtl.dll.

Examples

Creating a socket in C#

Add a reference to the DLL that you created. Then add something like this to your using-section and code:

 using OverByte.Ics;
 using OverByte.Ics.Units;
 
 lSocket = new TWSocket(null);
 lSocket.Addr = "127.0.0.1";
 lSocket.Port = "10001";
 lSocket.LineMode = true;
 lSocket.OnSessionConnected += new TSessionConnected(lSocket_OnSessionConnected);
 lSocket.OnDataAvailable += new TDataAvailable(lSocket_OnDataAvailable);
 lSocket.Connect();