Executor.ExecWaitWithCapture 方法

定義

執行指定命令。Executes the specified command.

多載

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)

使用指定的暫存檔來執行指定的命令,並等待呼叫傳回,將編譯器的輸出和錯誤資訊儲存在指定的字串。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.

public:
 static int ExecWaitWithCapture(System::String ^ cmd, System::CodeDom::Compiler::TempFileCollection ^ tempFiles, System::String ^ % outputName, System::String ^ % errorName);
public static int ExecWaitWithCapture (string cmd, System.CodeDom.Compiler.TempFileCollection tempFiles, ref string outputName, ref string errorName);
static member ExecWaitWithCapture : string * System.CodeDom.Compiler.TempFileCollection * string * string -> int
Public Shared Function ExecWaitWithCapture (cmd As String, tempFiles As TempFileCollection, ByRef outputName As String, ByRef errorName As String) As Integer

參數

cmd
String

要執行的命令。The command to execute.

tempFiles
TempFileCollection

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.

傳回

編譯器的傳回值。The return value from the compiler.

安全性

LinkDemand
針對立即呼叫者的完全信任的。for full trust for the immediate caller. 此成員無法由部分信任程式碼使用。This class cannot be used by partially trusted code.

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.

public:
 static int ExecWaitWithCapture(IntPtr userToken, System::String ^ cmd, System::CodeDom::Compiler::TempFileCollection ^ tempFiles, System::String ^ % outputName, System::String ^ % errorName);
public static int ExecWaitWithCapture (IntPtr userToken, string cmd, System.CodeDom.Compiler.TempFileCollection tempFiles, ref string outputName, ref string errorName);
static member ExecWaitWithCapture : nativeint * string * System.CodeDom.Compiler.TempFileCollection * string * string -> int
Public Shared Function ExecWaitWithCapture (userToken As IntPtr, cmd As String, tempFiles As TempFileCollection, ByRef outputName As String, ByRef errorName As String) As Integer

參數

userToken
IntPtr

與編譯器處理序一起啟動的語彙基元。The token to start the compiler process with.

cmd
String

要執行的命令。The command to execute.

tempFiles
TempFileCollection

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.

傳回

編譯器的傳回值。The return value from the compiler.

備註

userToken 參數會接受 Win32 安全性存取權杖,指出要在其中啟動之進程的安全性內容。The userToken parameter accepts a Win32 security access token that indicates the security context for the process to be started in. 如需詳細資訊,請參閱 MSDN 中 Platform SDK 檔集的 Windows CreateProcessAsUser 方法檔。For more information, consult the Windows CreateProcessAsUser method documentation in the Platform SDK documentation in MSDN.

安全性

LinkDemand
針對立即呼叫者的完全信任的。for full trust for the immediate caller. 此成員無法由部分信任程式碼使用。This class cannot be used by partially trusted code.

另請參閱

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.

public:
 static int ExecWaitWithCapture(System::String ^ cmd, System::String ^ currentDir, System::CodeDom::Compiler::TempFileCollection ^ tempFiles, System::String ^ % outputName, System::String ^ % errorName);
public static int ExecWaitWithCapture (string cmd, string currentDir, System.CodeDom.Compiler.TempFileCollection tempFiles, ref string outputName, ref string errorName);
static member ExecWaitWithCapture : string * string * System.CodeDom.Compiler.TempFileCollection * string * string -> int
Public Shared Function ExecWaitWithCapture (cmd As String, currentDir As String, tempFiles As TempFileCollection, ByRef outputName As String, ByRef errorName As String) As Integer

參數

cmd
String

要執行的命令。The command to execute.

currentDir
String

目前的目錄。The current directory.

tempFiles
TempFileCollection

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.

傳回

編譯器的傳回值。The return value from the compiler.

安全性

LinkDemand
針對立即呼叫者的完全信任的。for full trust for the immediate caller. 此成員無法由部分信任程式碼使用。This class cannot be used by partially trusted code.

另請參閱

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.

public:
 static int ExecWaitWithCapture(IntPtr userToken, System::String ^ cmd, System::String ^ currentDir, System::CodeDom::Compiler::TempFileCollection ^ tempFiles, System::String ^ % outputName, System::String ^ % errorName);
public static int ExecWaitWithCapture (IntPtr userToken, string cmd, string currentDir, System.CodeDom.Compiler.TempFileCollection tempFiles, ref string outputName, ref string errorName);
static member ExecWaitWithCapture : nativeint * string * string * System.CodeDom.Compiler.TempFileCollection * string * string -> int
Public Shared Function ExecWaitWithCapture (userToken As IntPtr, cmd As String, currentDir As String, tempFiles As TempFileCollection, ByRef outputName As String, ByRef errorName As String) As Integer

參數

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

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.

傳回

編譯器的傳回值。The return value from the compiler.

安全性

LinkDemand
針對立即呼叫者的完全信任的。for full trust for the immediate caller. 此成員無法由部分信任程式碼使用。This class cannot be used by partially trusted code.

另請參閱

適用於