IPWorks IPC 2020 ActiveX Edition

Questions / Feedback?

PipeExec Control

Properties   Methods   Events   Configuration Settings   Errors  

PipeExec provides an easy way to start and interact with a process over Stdin, Stdout, and Stderr.

Syntax

PipeExec

Remarks

The PipeExec component provides a way to launch a process and then send/receive data to/from the process. To begin set ProcessFileName to the path of the process on disk. Optionally set ProcessArgs and ProcessWorkingDir.

Call StartProcess to start the process. Next set Stdin or call Send to send data to the process. Received data will be provided through the Stdout and Stderr events.

To terminate the process call StopProcess.

Example Code

Pipeexec exec = new Pipeexec();
exec.OnStdout += exec_OnStdout;
exec.ProcessFileName = @"C:\Windows\system32\cmd.exe";
exec.ProcessArgs = "/Q";
exec.StartProcess();

exec.Stdin = "dir" + System.Environment.NewLine;

while (true) //Wait for output
  exec.DoEvents();

static void exec_OnStdout(object sender, PipeexecStdoutEventArgs e)
{
  Console.WriteLine(e.Text);
}

Property List


The following is the full list of the properties of the control with short descriptions. Click on the links for further details.

AcceptDataEnables or disables data reception (the Stdout and Stderr events).
BytesSentThe number of bytes actually sent after an assignment to Stdin.
EOLUsed to break the incoming data stream into chunks separated by EOL.
ProcessArgsThe arguments to pass to the process.
ProcessFileNameThe path to the file on disk to execute.
ProcessRunningWhether the process is running.
ProcessWorkingDirThe working directory of the process.
SingleLineModeSpecial mode for line-oriented protocols.
StdinA string of data to be sent over the connected pipe.
TimeoutA timeout for the control.

Method List


The following is the full list of the methods of the control with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting.
DoEventsProcesses events from the internal message queue.
GetLineGets a line of text from the server.
InterruptInterrupts the current action.
SendSends data over the connected pipe.
SendFileSends the file over the connected pipe.
SendLineSends a string followed by a newline.
StartProcessStarts the process.
StopProcessStops the process.

Event List


The following is the full list of the events fired by the control with short descriptions. Click on the links for further details.

ErrorInformation about errors during data delivery.
ReadyToSendFired when the control is ready to send data.
StderrFired when data come in through stderr.
StdoutFired when data come in through stdout.

Configuration Settings


The following is a list of configuration settings for the control with short descriptions. Click on the links for further details.

LogonTypeSpecifies the logon type when starting a process as another user.
PasswordSpecifies the password when starting a process as another user.
ProcessIdReturns the Id of the process which was started.
ProcessStartupFlagsSpecifies the flags used when starting the process in Windows.
ProcessWindowStyleSpecifies the window style when STARTF_USESHOWWINDOW is specified.
UserSpecifies the user when starting a process as another user.
CodePageThe system code page used for Unicode to Multibyte translations.
UseInternalSecurityAPITells the control whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IPC 2020 ActiveX Edition - Version 20.0 [Build 8155]