PowerTCP Emulation for .NET CF
Execute Method
See Also  Send comments on this topic.
Dart.Emulation Namespace > Rexec Class : Execute Method




username
The login name of the user account.
password
The password of the user account.
command
The command to execute.
Executes a command on the remote host.

Syntax

Visual Basic (Declaration) 
Public Sub Execute( _
   ByVal username As String, _
   ByVal password As String, _
   ByVal command As String _
) 
Visual Basic (Usage)Copy Code
Dim instance As Rexec
Dim username As String
Dim password As String
Dim command As String
 
instance.Execute(username, password, command)
C# 
public void Execute( 
   string username,
   string password,
   string command
)
Managed Extensions for C++ 
public: void Execute( 
   string* username,
   string* password,
   string* command
) 
C++/CLI 
public:
void Execute( 
   String^ username,
   String^ password,
   String^ command
) 

Parameters

username
The login name of the user account.
password
The password of the user account.
command
The command to execute.

Remarks

Use the Connect method to first connect to the remote host on the well-known port of 512. Then use Execute to authenticate using username and password and execute the command specified by command.

Use one of the Read methods to get the server's output.

When the server responds to a REXEC command, the first byte received indicates success/failure (0 for success, 1 for failure). When using the Rexec component, if the first byte is a 1 (meaning failure) an IOException is thrown. The Exception.Message will contain the response from the server without the first byte.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 4.2
© 2010 Dart Communications. All Rights Reserved.