PowerTCP Emulation for .NET

from $699.00
Available Platforms

Polished VT Emulation

PowerTCP Emulation for .NET has been re-designed to provide the most advanced VT Emulation and Telnet components available. In addition to a sophisticated VT Display control, it includes all of the classes found in PowerTCP Telnet for .NET. Requires fewer resources, provides more flexibility, and elicits code that is easy to re-use and maintain.

  • Utilizes .NET 2.0 features including generics, IPv6, and X509 certificates
  • Secure Socket Layer (SSL/TLS) security is fully integrated
  • Lightweight, single vt.dll streamlines your app

//Connect to the server
telnet1.Connect("myServer");
//Login and marshal data to the UI thread
telnet1.Marshal(telnet1.Login(new Credentials("myUser", "myPass", "~$")), "", null);
//Send a list command
telnet1.Write("ls -la\r");
//Wait for prompt, marshal data to the UI thread
telnet1.Marshal(telnet1.ReadToDelimiter("~$"), "", null);
//Send an exit command; server will close the connection
telnet1.Write("exit\r");
//Read any remaining data before the shutdown
telnet1.Marshal(telnet1.ReadToEnd(), "", null);

Feature Overview

Features
  • VT52, VT100, VT220, VT320 terminal support, with many ANSI extensions
  • Versatile
    - use interactively for terminal applications
    - use invisibly for screen-scraping applications
    - integrated scrollback buffer displays scrolled lines
  • Telnet, Rlogin, Rexec and Rsh communication components
  • International characters, including double-high, double-wide Unicode support
  • Screen customization with numerous display options
  • Renders ANSI color schemes
  • TrueType font and ClearType smoothing support provides sharper character cells
  • Graphic characters fully supported for all fonts
  • Comprehensive style information for every cell in the display
Easy To Use
  • SetStream() method connects the control to any Stream
  • Key mapping is simplified with a specialized KeyDown event
  • Optional automatic HTML conversion of scraped text
  • Powerful printing capabilities, including auto-print

Samples and Documentation

  • Many sample projects for C# and VB.NET (Windows Forms, Console, ASP.NET)
  • Online, MS Help 2.0 and Help Viewer 1.0 integrated documentation
  • .NET Framework 4 Client Profile compatible
  • 64-bit OS support

Included with Emulation for .NET

  • Sophisticated VT Display control
  • Telnet, Rexec, Rlogin and Rsh components
  • Many sample projects for both C# and VB.NET, including ASP.NET
  • Comprehensive MS Help 2.0 integrated documentation
  • Free Introductory Support

 

Component Description
Vt Control Display or scrape VT data within any .NET application.
Telnet Component Enables the use of the Telnet protocol within any .NET application.
Rlogin Component Enables the use of the remote login protocol within any .NET application.
Rexec Component Enables the use of the remote execution protocol within any .NET application.
Rsh Component Enables the use of the remote shell protocol within any .NET application.

 

 

Supported Environments

All PowerTCP for .NET 4.x components and classes will operate on any Microsoft operating system that fully supports the Microsoft .NET Framework, including 64-bit Windows. .NET components are dependent on the Framework rather than a specific operating system. Products support .NET Framework versions 2.0, 3.0, 3.5, 4.0, 4.5, 4.6 and 4.7. The components can be used with any .NET compliant language, including the following languages:

Supported languages:
  • C#
  • VB.NET
  • Managed C++
Tested in the following application environments:
  • Standard Windows desktop applications
  • Console applications
  • ASP.NET web applications and Web Sites
  • Windows service applications
  • Windows Presentation Foundation (WPF) applications
  • Web service applications
Tested in the following development environments:
  • Visual Studio .NET (2005, 2008, 2010, 2012, 2013, 2015, 2017, 2019, 2022)

 

 

 

PowerTCP for .NET components do not currently support execution within Silverlight. If you are interested in using Dart products within your Silverlight solution, contact support@dart.com for more options.

Code Examples

These PowerTCP Emulation for .NET code snippets can be copied and pasted into your project.

 

Code Snippet Description
Automated Session Demonstrates how to write a scripted automated session.
Key Mapping Demonstrates how to map a sequence to the press of a key.
Receive and Display Data Demonstrates how to receive and display data asynchronously, without blocking the UI.

 

 

Example Projects

Samples are working applications demonstrating Emulation for .NET components in C#, VB.NET, C++/CLI and PowerShell. Source code included.

 

Sample Name Sample Description
Telnet Client Demonstrates a user-interactive Telnet client using the VT display's SetStream auto send/receive capabilities.
Telnet Client (Independent Data Source) Demonstrates a user-interactive Telnet client using an autonomous data source (in this case, the included Telnet component).
Screen Scraping Demonstrates how to scrape the contents of the VT display.
Web Screen Scraping Demonstrates how to scrape the contents of the VT display on a web page.
Rexec Client Demonstrates execution of a command using Rexec.
Rlogin Client Demonstrates a user-interactive Rlogin client.
Rsh Client Demonstrates execution of a command using Rsh.
Automated Windows Client Demonstrates execution of an automated application using Telnet.
Telnet Automated Console Demonstrates use of Telnet in a console application.
Telnet Automated Web Demonstrates use of Telnet on a web page.

 

 

Additional Sample Projects

These samples demonstrate Emulation for .NET alongside additional PowerTCP products.

Sample Name Sample Description
VT with SSH Client Demonstrates a fully interactive SSH client that utilizes the SSH and SFTP for .NET product.

 

 

Product Release History for PowerTCP Emulation for .NET

The following is a list of public releases for all components shipped with PowerTCP Emulation for .NET (Latest Release 2017-09-25)

 

PowerTCP Emulation for .NET

Current Version: 4.7.2.0

 

4.7.2.0   Released: 2017-09-25


 

Product fixes in this release:

  • A issue where the *, -, and + numpad keys would not generate PF3, PF4, and -, as documented, has been resolved. (1018)

 

 

4.7.1.0   Released: 2017-03-08


 

  • Visual Studio 2017 compatibility.

 

 

4.7.0.1   Released: 2016-06-21


 

Developer Note:

  • An interface change was required in order to provide improved rendering and performance. Vt.BufferRows is now read only and Vt.BufferRows must be changed to Vt.MaxBufferRows whenever it is being set to indicate the maximum number of buffer rows for the scrollback buffer. Vt.BufferRows now represents the number of buffer rows currently populated and should still be used when setting properties like Vt.AutoScrollRowPosition.
  • Columns are no longer limited to 80 or 132

 

Product fixes in this release:

  • Using ALT+NUMPAD to generate characters while Vt.Keypad is numeric will result in the correct character output. (695)
  • Various rendering fixes related to scrolling regions. (704, 744, 748)
  • When sending, the Log event logs what is actually sent over the connection, instead of what keys are pressed. Ex: Pressing the up arrow results in the byte array 27,91,65 being logged instead of the single byte 38. (895)
  • Characters partially rendered or not rendered in some fonts (Courier New & Lucidia Console) when the font size is set too small. (905)

 

 

4.6.0.6   Released: 2014-12-04


 

  • Improved CPU usage in most scenarios.
  • Significantly improved rendering speed resulting a more responsive UI experience.
  • Improved support for National Character Set and Multinational mode operation.
  • A ConnectTimeout property has been added to the Telnet component.
  • A log event was added to the VT in order to log Client/Server data more easily when using SetStream.
  • A TextRenderingHint property has been added so that developers can specify which type of text rendering to use.
  • A ConnectTimeout property was added to TcpSession class.

 

Product fixes in this release:

  • National Character Sets will no longer be set to ASCII erroneously. (239)
  • An issue where 8-bit escape sequences were sometimes erroneously being processed in 7-bit mode has been addressed. (291)
  • An issue where the control could hang due to an incompatibility with some printer drivers (Ex. CutePDF) when the PrintType property was set to auto or controller has been resolved. (365)
  • The component will no longer incorrectly adhere to margins applied with DECSTBM. (513)
  • Line insertion now works correctly within the VI text editor. (598)

 

 

4.5.3.11   Released: 2012-10-26


 

  • Updated for Visual Studio 2012 integration and Windows 8 compatibility.
  • Trial licensing operation updated.
  • Changed serialization to use simple partial name serialization to improve cross-version compatibility.

 

Product fixes in this release:

  • Addressed an issue where the control might hang if the remote server closes the connection during a read with the Telnet control. (5446)
  • Addressed an issue where calling the Close method on the Telnet control in the StateChanged event may cause the Telnet control to hang. (5631)
  • Addressed a rendering issue that could occur when switching from reverse video to normal in conjunction with resizing cells. This fix also resulted in a modest performance increase. (TFS24)
  • Addressed a globalization issue that prevented correct operation for systems using the following language cultures: Azeri (az), Azeri-Latin (az-Latn), Azeri-Latin-Azerbaijan (az-Latn-AZ), Turkish (tr), Turkish-Turkey (tr-TR). (TFS31)
  • Improved handling of incorrect and unexpected escape sequences. (TFS43)
  • Addressed an issue sending data to the printer when passthrough printing is enabled. (TFS55)
  • Modified printing behavior when in 132 column mode to automatically print in landscape mode and not portrait mode. (TFS56)

 

 

4.5.2.0   Released: 2012-07-12


 

Product fixes in this release:

  • Fixed a licensing issue with web service applications.
  • Updated the title bar of licensing messages to not indicate a product is in trial when it is licensed.
  • Addressed a memory leak that would occur when a VT control was disposed. (5644)

 

 

4.5.1.0   Released: 2012-06-27


 

  • Updated trial operation behavior and removed obstacle to using product in .NET Framework 4.5.

 

 

4.5.0.4   Released: 2012-05-17


 

Product fixes in this release:

  • The cursor, reverse negative text, selected text are now visible when the display's BackColor is transparent. (5532)
  • It is now possible to make the cursor visible after the display is instructed to set the cursor invisible multiple times consecutively. (5548)
  • Edit Module keys now work when KeyPad.Numeric is set. (5557)
  • Fixed issue where the Edit Module keys would cease functioning after receiving a specific sequence in VT220 mode. (5562)
  • Fixed issue where data would be added to the scroll back buffer multiple times when EnhancedScrollBack is true. (5571)
  • The cursor position will now immediately update after set from a menu item. (5579)
  • The display now handles consecutive escape sequences correctly. (5590)
  • The cursor will now be invisible if set to Transparent. (5603)
  • Addressed a handles leak associated with the cursor. (5604)
  • The StatusBar no longer appears to jump when the VT control scrolls. (TFS21)
  • The SizeChanged event is no longer raised when ClientSize is changed (ClientSizeChanged is raised). (TFS23)

 

 

4.4.1.8   Released: 2011-10-03


 

  • Enhanced ANSI color support for the display. Users can now select from set color schemes, or customize each normal and bold (bright) color individually.
  • Added a CursorColor property, and a new "Bar" CursorStyle.
  • Added a BoldNegativeColor property.

 

Product fixes in this release:

  • Fixed issues with BCE (Background Color Erase) clears.
  • Telnet now recognizes and correctly handles a server reset (abort). (5426)
  • Fixed Numeric mode so that number strokes are sent when Numlock is off. (5438)
  • Addressed several PrintPassthru issues. (5441)
  • The status bar no longer flickers when the screen is updated frequently. (5473)
  • The negative background color now matches exactly the normal foreground color. (5474)
  • Fixed an issue where the EnhancedScrollbackBuffer was missing data after a partial clear screen. (5479)
  • An issue with setting cursor position when typing in the scrolling region was addressed. (5490)
  • Fixed padding so that it is consistent with other scrollable controls. (5507)
  • The Vt.Paint event now fires. (5517)
  • The mouse cursor style can now be changed. (5518)
  • Fixed ScrapeHtml so that cells with no ansi color are transparent. (5525)

 

 

4.4.0.7   Released: 2011-04-05


 

  • Some custom Start delegates have been replaced with the .NET Framework standard WaitCallback delegate. This generally means that callback functions no longer include the calling component as a parameter (this is true even for custom delegates that were not replaced).
  • The Connect method was updated to take the new TcpSession object as a parameter. TcpSession is a serializable object that facilitates the saving of session settings.
  • The AuthenticateAsClient and AuthenticateAsServer methods were updated to take the new ClientSecurity and ServerSecurity objects as parameters, respectively. These two objects are serializable, facilitating the saving of security sessions.
  • The ReadToX functions (ReadtoDelimiter, ReadToCount, ReadToEnd) were updated to throw the new DataException when an error condition occurs. DataException includes a DataRead field which provides the data read prior to the exception.
  • Several samples were updated with "model" classes, to fall more in line with the Model-View-Controller (MVC) design philosophy. For more on MVC, see the "MVC Design in Applications" page of the help file.
  • If an empty string is specified as a Credentials.CommandPrompt, the login call will now return immediately after receiving a password response.
  • Added a KeyPad.Pc option which indicates the control should send the sequence associated with the PC keyboard key.
  • Reduced the selection sensitivity to behave more like other applications.

 

Product fixes in this release:

  • Pressing the KeyPad Enter key now generates the correct sequence.
  • Fixed a problem with MS Global Input Method Editor (IME) usage. (5201)
  • Fixed area selection when the VT control scrolls. (5347)
  • Fixed issue where CursorStyle would always change to Block after being set to Invisible, regardless of the previous style. (5351)
  • Fixed an issue where the components would not use a specified local port under certain circumstances. (5359)
  • The Vt control now processes 'DA' sequences with no parameter properly. (5383)
  • The Vt control now switches to 8-bit operation when receiving a DECSCL command. (5387)
  • Pressing the NumLock key no longer changes the behavior of the numpad keys when used in Application or Numeric mode. (5388)
  • Fixed issue where the VT control would grab focus whenever data was written to it. (5394)
  • Setting the TerminalType no longer resets other properties to default values. (5399)
  • Fixed an issue with updating the last two rows in the display when paging within a vi editor. (5413)
  • Fixed a deselection issue that would occur when an area of the display was selected prior to having any data written to it. (5421)
  • Fixed a flicker that would occur when forms containing the VT control would overlap in an MDI container. (5422)

 

 

4.2.1.7   Released: 2010-05-24


 

  • PowerTCP Emulation has been updated with a new install and VS 2010 integration.

 

Product fixes in this release:

  • Data Direction in the Log event handler has been fixed to no longer always be DataDirection.In. (5169)
  • Pressing Return now sends the correct sequence. (5175)
  • Control characters that are not processed are no longer shown in the display. (5179)
  • Fixed a scrolling region issue where outside areas would appear within the region when the scrolling region did not reach the bottom of the display. (5196)
  • Blinking has been tweaked so that the forecolor matches the backcolor when intensity is 0. (5227)
  • The cursor position is now set correctly when Refresh is called in the Resize event handler. (5234)
  • Saved cursor attributes are no longer reset to default values when loaded. (5237)
  • The cursor position is now set correctly after DECOM is set. (5243)

 

 

4.2.0.3   Released: 2010-01-05


 

  • Emulation for .NET now uses native Framework classes for SSL functionality.
  • Emulation for .NET has a new licensing model. External runtime license files are no longer utilized. Instead, a license resource is generated and embedded within the executing assembly.
  • Special Graphic Character fonts have been replaced with Unicode equivalents.
  • Line drawing precision has been improved and is now more proportional to the selected font.
  • Drawing techniques have been optimized.
  • Support for the true DEC Supplemental Set has been improved.
  • Auto and Controller PrintTypes now print black-on-white instead of using the ForeColor and BackColor.

 

Product fixes in this release:

  • Multiple pages are now correctly printed when PrintType is set to Controller. (5154)
  • Colors are now accurately printed when PrintType is set to Controller. (5154)
  • The display no longer produces strange artifacts and problems with the scrollbars when the font size is changed within the VT Resize event. (5161)
  • Scraped line characters are now more accurately represented when copied to the clipboard. (5163)
  • Fixed an issue with writing to the status bar. (5164)

 

 

4.1.0.9   Released: 2009-11-12


 

  • Added Visual C++ samples for VS.NET 2008.

 

Product fixes in this release:

  • Fixed an index out of bounds error that could occur when BufferRows = 0 and an area of the display was selected and extended outside the bounds of the control. (5137)
  • The default encoding is now set to ASCII to prevent unintentional encoding. (5142)
  • Fixed various issues discovered using emulation test software. (5145)
  • Fixed scrolling problem when a CRLF was displayed outside the scrolling region. (5152)
  • All data is now printed when PrintType.Controller is used. (5154)
  • Fixed various issues with the status line functionality, including making it read/write for all emulation types. (5155)

 

 

4.0.1.0   Released: 2009-10-06


 

Product fixes in this release:

  • Fixed an index out of range issue when Encoding was set to Unicode. ()

 

 

4.0.0.8   Released: 2009-10-02


 

  • This latest version of the venerable PowerTCP product line gets a new .NET 2.0 re-design that leverages the power of the latest .NET environments to provide the most advanced Internet Communications controls and components available. Some of the features include:
  • VT52, VT100, VT220, VT320 terminal support
  • Key mapping simplified with a specialized KeyDown event
  • Screen scraping functions for extracting text from the display and scroll buffer
  • Display customization with numerous options
  • International character set support
  • Graphic characters fully supported for all fonts
  • Comprehensive style information for every cell in the display
  • Automatic HTML conversion of scraped text
  • Powerful printing capabilities, including auto-print
  • SetStream option sends and receives automatically
  • The Emulation for .NET product also includes Telnet, Rexec, Rsh and Rlogin communication components. Features include:
  • Auto-option negotiation with easy configuration options
  • Secure SSL Telnet support
  • Blocking reads that wait for defined delimiters, specifically designed for scripting applications
  • Start method for easily implemented multi-threaded applications, including cross-threading marshaling support
  • Logging event for easy debugging and session logging
  • Proxy support
  • Double-wide Unicode character support
  • TrueType Font support
  • Support for ClearType and standard font smoothing
  • 64 bit OS support

 

 

1.1.4.0   Released: 2008-07-25


 

Product fixes in this release:

A cell width problem introduced in version 1.1.3.7 was corrected.

 

 

1.1.3.7   Released: 2008-07-24


 

  • Vt.CharacterSize is now a read-write property.
  • The new Vt.CharacterOffset property permits the user to set characters' offset within a cell.

Product fixes in this release:

  • The StatusLine can now be set properly with multibyte characters, both programmatically and with VT sequences. (4339)
  • Display is now correctly refreshed when the column number is changed. (4595)
  • Fixed alignment of cursor when display uses certain character sets. (4752)
  • LocalEcho now works for typed Unicode characters (for example, with East Asian keyboards). (4753)
  • KeyPress DataEventArgs.ToString() will now properly return Unicode characters. (4754)
  • Fixed condition under which Dispose method would hang. (4792)

 

 

1.1.1.6   Released: 2007-10-25


 

Product fixes in this release:

  • Screen scraping "windows-1251" encoded text using the SelectedText property now works as expected. (4283)
  • Resolved various problems associated with the Encoding property. (4284)
  • Corrected Cell.Styles initialization problem. (4361)
  • Setting the screen size via the VT Interface no longer clears the display. (4535)
  • Reduced memory used when performing a WaitFor operation (only affected Telnet DLL, not VT). (4540)

 

 

1.1.0.0   Released: 2006-12-15


 

  • NOTE: This version was also released as version 1.0.4, but after a week it was decided to increment the minor version.
  • A new Encoding property for full support of Unicode characters was added
  • A new Extended argument has been added to the KeyDown event, for distinguishing between standard and "extended" keystrokes added
  • Printed pages now match the display font as closely as possible

 

Product fixes in this release:

  • A problem with displaying NRC Set characters was corrected (4171)
  • Character 127 no longer displays as a space (4208)

 

 

1.0.3.0   Released: 2006-08-11


 

  • Emulation for .NET now supports 64 bit environments.

 

Product fixes in this release:

  • Telnet no longer stops when it receives an unknown option (3575)
  • 12 pt Courier New can now be underlined (3691)
  • Drag and Drop has been refined in the display (3769)
  • Issues where the screen failed to clear were addressed (3773, 3776)
  • The mouse cursor now changes to an arrow over the scroll bars (4053)

 

 

1.0.2.0   Released: 2005-11-01


 

Product fixes in this release:

  • Fixed problems when switching to Double Wide and Double high characters
  • Arrow keys now repeat when held down
  • Fixed resource leak when creating VT on new thread
  • Screen no longer flickers when a VT is dynamically created

 

 

1.0.1.0   Released: 2005-09-16


 

  • This release of Emulation for .NET introduces a new feature that simplifies distribution. With previous releases, inclusion of the separate POWERVT.FON file was required when distributing applications to target machines. If this file was not included, the default vt220_ascii font was not available. The POWERVT.FON file is now included as a resource that, if not found, is automatically extracted into the deployment target's System32 directory! For cases in which the targer user lacks sufficient privileges to write to the System32 directory, the POWERVT.FON file is still available for manual distribution

 

Product fixes in this release:

  • Corrected situation when wrong sequences sent for PGUP key
  • Also includes updates to version 1.0.2.0 of the Telnet DLL
  • No longer throwing an unhandled exception when the server closes the internal telnet connection
  • No longer incorrectly hiding scrollbars
  • No longer rendering a blank display when form is closed
  • Internal Telnet Client no longer crashes when connection is immediately closed
  • No longer get 'Divide by zero error' with Vt.Write in certain conditions
  • Fixed GDI leak when VT instance is created on a form
  • Now able to write to windowed VT instances when windowless instances exists
  • Corrected situation when certain characters would be misinterpreted and thus displayed incorrectly
  • EnsureVisible method now correctly includes scrollback buffer
  • Added Powervt.fon as a resource. If an application is started on a system that does not have Powervt.fon installed, the font will be created from a resource and installed into the System32 directory
  • Obsolete properties no longer throw exception when Form.Localizable = True

 

 

1.0.0.0   Released: 2003-12-22


 

  • Thank you for your interest in PowerTCP Emulation for .NET. Our goal is to bring you the best component user-experience possible. Please go to the documentation to learn about our product within the Visual Studio environment. We have included dozens of tutorials to help you understand how to use PowerTCP. For comments, suggestions, or complaints about the documentation, please use the e-mail link at the bottom of every page to contact Dart’s Documentation Team. Every response will be read and where possible, your suggestions and ideas will be included in future releases. If you have suggestions, advice, or complaints about the functionality of our product, either with respect to the protocol or integration with Visual Studio .NET, please write us at suggestions@dart.com or contact your sales representative. We want your feedback!
PowerTCP Emulation for .NET features

 

VT .NET Control (Terminal Emulation)

Use the Vt control to integrate terminal emulation capabilities into your Windows application or enable your ASP.NET Web application to communicate with backend UNIX servers for screen scraping. Features include:

  • Support for VT320, VT220, VT100, VT52
  • Advanced screen scraping capability
  • Support for graphic characters
  • TrueType Font support
  • ClearType and Standard font smoothing support
  • Supports multinational byte encoding to display international character sets
  • Double-wide Unicode character support
  • Configurable scroll-back buffer
  • Superior printing capabilities
  • Built-in support for Key mapping
  • Unifying Telnet capability makes connectivity as easy as a few lines of code
  • Full support for encoded Unicode characters
  • C#, VB.NET and VC++ sample projects included
  • 64 bit OS support

 

 

Return to Overview

PowerTCP Emulation for .NET features

 

Telnet Component

The Telnet component fills the Telnet gap in the .NET Framework by providing easy communication with remote Telnet servers. Features include:

 

  • Login function that automatically sends username and password
  • Automatic and manual option negotiation options for maximum flexibility
  • Explicit and implicit SSL security options
  • Blocking reads that wait for defined delimiters, specifically designed for scripting applications
  • Start method for easily implemented mult-threaded applications, including cross-threading marshaling support
  • PTY property binds a TextBox to the Telnet component as a ready-made interface for interactive online communications
  • Logging event for easy debugging and session logging
  • Proxy support
  • Integrates with versions 2005, 2008 and 2010 of Visual Studio
  • Supports C#, VB.NET, C++/CLI, ASP.NET and other .NET compliant development environments

 

Return to Overview

PowerTCP Telnet for .NET Features

 

PowerTCP Telnet for .NET Rlogin Component

 

Use the Rlogin .NET component to easily login to a remote host using rlogin. Features include:

Login function that automatically sends username and password

  • SSL security options
  • Blocking reads that wait for defined delimiters, specifically designed for scripting applications
  • Start method for easily implemented mult-threaded applications, including cross-threading marshaling support
  • PTY property binds a TextBox to the Telnet component as a ready-made interface for interactive online communications
  • Logging event for easy debugging and session logging
  • Proxy support
  • Integrates with versions 2005, 2008, 2010 and 2012 of Visual Studio
  • Supports C#, VB.NET, C++/CLI, ASP.NET and other .NET compliant development environments

 

 Return to Overview

 

Looking for an SSH Component?

PowerTCP SSH and SFTP for .NET

PowerTCP Emulation for .NET features

 

Rexec .NET Component

 

Use the Rexec component to execute a command on a remote host. Features include:

  • Execute function that executes specified commands on the remote host
  • SSL security options
  • Start method for easily implemented multi-threaded applications, including cross-threading marshaling support
  • Logging event for easy debugging and session logging
  • Proxy support
  • Integrates with versions 2005, 2008 and 2010 of Visual Studio
  • Supports C#, VB.NET, C++/CLI, ASP.NET and other .NET compliant development environments

 

Return to Overview

PowerTCP Emulation for .NET features

 

Rsh .NET Component

 

Use the Rsh component to easily execute shell commands on a remote host. Features include:

  • Execute function that executes specified commands on the remote host
  • SSL security options
  • Start method for easily implemented multi-threaded applications, including cross-threading marshaling support
  • Logging event for easy debugging and session logging
  • Proxy support
  • Integrates with versions 2005, 2008 and 2010 of Visual Studio
  • Supports C#, VB.NET, C++/CLI, ASP.NET and other .NET compliant development environments

 

 

Return to Overview

See all PowerTCP Emulation for .NET Code Examples

Windows Forms Automated Telnet Session Example

The following example demonstrates an automated Telnet session in a Windows Forms environment. The session is executed asynchronously, without blocking the UI. The session is written to the VT display.

 

private void button1_Click(object sender, EventArgs e)
{
    //This application has a User-Interface, which we do not want to block.
    //Start launches the specified method on a worker thread.
    //Event handlers execute on the UI thread.
    telnet1.Start(automateSession, null);
}

private void automateSession(object notUsed)
{
    //This function performs an automated telnet session using blocking calls.
    //Use the Start method to execute this function on a worker thread.
    try
    {
        //Connect to the server
        telnet1.Connect("myServer");

        //Login and marshal data to the UI thread
        telnet1.Marshal(telnet1.Login(new Credentials("myUser""myPass""~$")), ""null);

        //Send a list command
        telnet1.Write("ls -la\r");

        //Wait for prompt, marshal data to the UI thread
        telnet1.Marshal(telnet1.ReadToDelimiter("~$"), ""null);

        //Send an exit command; server will close the connection
        telnet1.Write("exit\r");

        //Read any remaining data before the shutdown
        telnet1.Marshal(telnet1.ReadToEnd(), ""null);
    }
    catch (Exception ex)
    {
        //Report errors to the UI thread
        telnet1.Marshal(ex);
    }
}

void telnet1_Data(object sender, DataEventArgs e)
{
    //Add data received to the VT display
    if (e.Data != null) vt1.Write(e.Data.ToString());
}

void telnet1_Error(object sender, ErrorEventArgs e)
{
    //Add error messages to the VT display
    vt1.Write(e.GetException().Message);
}

void telnet1_StateChanged(object sender, EventArgs e)
{
    //Indicate in app title when connected
    this.Text = (telnet1.State == Dart.Emulation.ConnectionState.Closed)
        ? "Automated Session Demo"
        : "Automated Session Demo <Connected to " + telnet1.RemoteEndPoint.ToString() + ">";
}

 

To download a trial please visit the PowerTCP Emulation for .NET product page.

See all PowerTCP Emulation for .NET Code Examples

 

Key Mapping Example

The following example demonstrates mapping a sequence to a pressed key. With a few lines in the VT control's KeyDown event handler, any key can be made to send an alternative sequence.

 

private void vt1_KeyDown(object sender, VtKeyEventArgs e)
{
    //If there is a telnet connection
    if (telnet1.State != Dart.Emulation.ConnectionState.Closed)
    {
        //Send substitute string when Control-H pressed
        if (e.Control && e.KeyCode == Keys.H)
        {
            e.Handled = true//prevent other key events
            telnet1.Write("Hello World!");
        }
    }
}

 

To download a trial please visit the PowerTCP Emulation for .NET product page.

See all PowerTCP Emulation for .NET Code Examples

 

Receive and Display Data Example

The following example demonstrates receiving data in a Windows Forms environment. Data is read asynchronously, as it is available, without blocking the UI. The data is marshaled to the UI thread and written to the display.

 

private void button1_Click(object sender, EventArgs e)
{
    //Receive data on a worker thread
    telnet1.Start(receiveData, null);
}

private void receiveData(object notUsed)
{
    //Receive data when it is sent by the remote host
    //Marshal it to the UI for display
    byte[] buffer = new byte[1024];
    while (telnet1.State != ConnectionState.Closed)
        telnet1.Marshal(telnet1.Read(buffer, 0, 1024), ""null);
}

private void telnet1_Data(object sender, DataEventArgs e)
{
    //Whenever data is received, display it
    if (e.Data != null) vt1.Write(e.Data.Buffer, 0, e.Data.Count);
}

 

To download a trial please visit the PowerTCP Emulation for .NET product page.

Telnet Client Sample

See all PowerTCP Emulation for .NET Samples and Code Examples

 

The PowerTCP Emulation for .NET Telnet Client sample demonstrates many routine VT Emulation functions:

 

  • Gracefully emulate VT sessions
  • Provide an intuitive keymapping interface
  • Include print screen options
  • Log sessions to disk
  • Include color and font settings
  • Copy and paste text from the display
  • Offer national character sets and encodings

PowerTCP Emulation for .NET Telnet Client Sample Screenshot

 

The PowerTCP Emulation .NET Telnet Client sample is included with a trial installation of PowerTCP Emulation for .NET. To download a trial please visit the PowerTCP Emulation for .NET product page.

 

Telnet Client (Independent Data Source) Sample

See all PowerTCP Emulation for .NET Samples and Code Examples

 

The PowerTCP Emulation for .NET Telnet Client (Independent Data Source) sample demonstrates many routine VT Emulation functions:

 

  • Interface with another class that provides the VT data
  • Gracefully emulate VT sessions
  • Provide an intuitive keymapping interface
  • Include print screen options
  • Log sessions to disk
  • Include color and font settings
  • Copy and paste text from the display
  • Offer national character sets and encodings

PowerTCP Emulation for .NET Telnet Client (Independent Data Source) Sample Screenshot

 

The PowerTCP Emulation .NET Telnet Client (Independent Data Source) sample is included with a trial installation of PowerTCP Emulation for .NET. To download a trial please visit the PowerTCP Emulation for .NET product page.

 

Screenscrape Sample

See all PowerTCP Emulation for .NET Samples and Code Examples

 

The PowerTCP Emulation for .NET Screenscrape sample demonstrates many routine VT Emulation functions:

 

  • Write a VT data source to the display
  • Scrape the entire text from the display
  • Scrape specific areas of the display
  • Paste the scraped text to a standard textbox

PowerTCP Emulation for .NET Screenscrape Sample Screenshot

 

The PowerTCP Emulation .NET Screenscrape sample is included with a trial installation of PowerTCP Emulation for .NET. To download a trial please visit the PowerTCP Emulation for .NET product page.

 

SSH with VT Client Sample 

The PowerTCP SSH and SFTP for .NET SSH VT Client sample demonstrates many routine SSH/VT functions:

 

  • A secure user-interactive SSH-2 client
  • Provide username/password and PEM authentication options
  • Provide information about the established connection
  • Gracefully emulate VT sessions
  • Include options such as color and font settings

PowerTCP SSH and SFTP for .NET SFTP Client Sample Screenshot

 

The SSH with VT Client sample is included with a trial installation of PowerTCP SSH and SFTP for .NET or PowerTCP Emulation for .NET. To download a trial please visit the PowerTCP SSH and SFTP for .NET or PowerTCP Emulation for .NET product page.

 

Purchase Options

Customize your product and support options match your needs. Discounts are applied when products are purchased in multiples or within available product suites.

$0.00 discount
 
$949.00

Have any questions about purchasing? See our Sales FAQ