Executor.ExecWaitWithCapture Method

Definition

Executes the specified command.

Overloads

ExecWaitWithCapture(String, TempFileCollection, String, String)

Executes the specified command using the specified temporary files and waits for the call to return, storing output and error information from the compiler in the specified strings.

ExecWaitWithCapture(IntPtr, String, TempFileCollection, String, String)

Executes the specified command using the specified user token and temporary files, and waits for the call to return, storing output and error information from the compiler in the specified strings.

ExecWaitWithCapture(String, String, TempFileCollection, String, String)

Executes the specified command using the specified current directory and temporary files, and waits for the call to return, storing output and error information from the compiler in the specified strings.

ExecWaitWithCapture(IntPtr, String, String, TempFileCollection, String, String)

Executes the specified command using the specified user token, current directory, and temporary files; then waits for the call to return, storing output and error information from the compiler in the specified strings.

ExecWaitWithCapture(String, TempFileCollection, String, String)

Source:
Executor.cs
Source:
Executor.cs
Source:
Executor.cs
Source:
Executor.cs
Source:
Executor.cs

Executes the specified command using the specified temporary files and waits for the call to return, storing output and error information from the compiler in the specified strings.

C#
public static int ExecWaitWithCapture(string cmd, System.CodeDom.Compiler.TempFileCollection tempFiles, ref string outputName, ref string errorName);

Parameters

cmd
String

The command to execute.

tempFiles
TempFileCollection

A TempFileCollection with which to manage and store references to intermediate files generated during compilation.

outputName
String

A reference to a string that will store the compiler's message output.

errorName
String

A reference to a string that will store the name of the error or errors encountered.

Returns

The return value from the compiler.

Applies to

.NET 10 (package-provided) och andra versioner
Produkt Versioner
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

ExecWaitWithCapture(IntPtr, String, TempFileCollection, String, String)

Source:
Executor.cs
Source:
Executor.cs
Source:
Executor.cs
Source:
Executor.cs
Source:
Executor.cs

Executes the specified command using the specified user token and temporary files, and waits for the call to return, storing output and error information from the compiler in the specified strings.

C#
public static int ExecWaitWithCapture(IntPtr userToken, string cmd, System.CodeDom.Compiler.TempFileCollection tempFiles, ref string outputName, ref string errorName);

Parameters

userToken
IntPtr

The token to start the compiler process with.

cmd
String

The command to execute.

tempFiles
TempFileCollection

A TempFileCollection with which to manage and store references to intermediate files generated during compilation.

outputName
String

A reference to a string that will store the compiler's message output.

errorName
String

A reference to a string that will store the name of the error or errors encountered.

Returns

The return value from the compiler.

Remarks

The userToken parameter accepts a Win32 security access token that indicates the security context for the process to be started in. For more information, see CreateProcessAsUser method documentation.

See also

Applies to

.NET 10 (package-provided) och andra versioner
Produkt Versioner
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

ExecWaitWithCapture(String, String, TempFileCollection, String, String)

Source:
Executor.cs
Source:
Executor.cs
Source:
Executor.cs
Source:
Executor.cs
Source:
Executor.cs

Executes the specified command using the specified current directory and temporary files, and waits for the call to return, storing output and error information from the compiler in the specified strings.

C#
public static int ExecWaitWithCapture(string cmd, string currentDir, System.CodeDom.Compiler.TempFileCollection tempFiles, ref string outputName, ref string errorName);

Parameters

cmd
String

The command to execute.

currentDir
String

The current directory.

tempFiles
TempFileCollection

A TempFileCollection with which to manage and store references to intermediate files generated during compilation.

outputName
String

A reference to a string that will store the compiler's message output.

errorName
String

A reference to a string that will store the name of the error or errors encountered.

Returns

The return value from the compiler.

See also

Applies to

.NET 10 (package-provided) och andra versioner
Produkt Versioner
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

ExecWaitWithCapture(IntPtr, String, String, TempFileCollection, String, String)

Source:
Executor.cs
Source:
Executor.cs
Source:
Executor.cs
Source:
Executor.cs
Source:
Executor.cs

Executes the specified command using the specified user token, current directory, and temporary files; then waits for the call to return, storing output and error information from the compiler in the specified strings.

C#
public static int ExecWaitWithCapture(IntPtr userToken, string cmd, string currentDir, System.CodeDom.Compiler.TempFileCollection tempFiles, ref string outputName, ref string errorName);

Parameters

userToken
IntPtr

The token to start the compiler process with.

cmd
String

The command to execute.

currentDir
String

The directory to start the process in.

tempFiles
TempFileCollection

A TempFileCollection with which to manage and store references to intermediate files generated during compilation.

outputName
String

A reference to a string that will store the compiler's message output.

errorName
String

A reference to a string that will store the name of the error or errors encountered.

Returns

The return value from the compiler.

See also

Applies to

.NET 10 (package-provided) och andra versioner
Produkt Versioner
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10