|
Este artículo se tradujo de forma manual. Mueva el puntero sobre las frases del artículo para ver el texto original.
|
Traducción
Original
|
Process (Clase)
Ensamblado: System (en System.dll)
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")] [HostProtectionAttribute(SecurityAction.LinkDemand, SharedState = true, Synchronization = true, ExternalProcessMgmt = true, SelfAffectingProcessMgmt = true)] [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")] public class Process : Component
El tipo Process expone los siguientes miembros.
| Nombre | Descripción | |
|---|---|---|
![]() | BasePriority | |
![]() | CanRaiseEvents | |
![]() | Container | |
![]() | DesignMode | |
![]() | EnableRaisingEvents | |
![]() | Events | |
![]() | ExitCode | |
![]() | ExitTime | |
![]() | Handle | |
![]() | HandleCount | |
![]() | HasExited | |
![]() | Id | |
![]() | MachineName | |
![]() | MainModule | |
![]() | MainWindowHandle | |
![]() | MainWindowTitle | |
![]() | MaxWorkingSet | |
![]() | MinWorkingSet | |
![]() | Modules | |
![]() | NonpagedSystemMemorySize | Obsoleto. |
![]() | NonpagedSystemMemorySize64 | |
![]() | PagedMemorySize | Obsoleto. |
![]() | PagedMemorySize64 | |
![]() | PagedSystemMemorySize | Obsoleto. |
![]() | PagedSystemMemorySize64 | |
![]() | PeakPagedMemorySize | Obsoleto. |
![]() | PeakPagedMemorySize64 | |
![]() | PeakVirtualMemorySize | Obsoleto. |
![]() | PeakVirtualMemorySize64 | |
![]() | PeakWorkingSet | Obsoleto. |
![]() | PeakWorkingSet64 | |
![]() | PriorityBoostEnabled | |
![]() | PriorityClass | |
![]() | PrivateMemorySize | Obsoleto. |
![]() | PrivateMemorySize64 | |
![]() | PrivilegedProcessorTime | |
![]() | ProcessName | |
![]() | ProcessorAffinity | |
![]() | Responding | |
![]() | SessionId | |
![]() | Site | |
![]() | StandardError | |
![]() | StandardInput | |
![]() | StandardOutput | |
![]() | StartInfo | |
![]() | StartTime | |
![]() | SynchronizingObject | |
![]() | Threads | |
![]() | TotalProcessorTime | |
![]() | UserProcessorTime | |
![]() | VirtualMemorySize | Obsoleto. |
![]() | VirtualMemorySize64 | |
![]() | WorkingSet | Obsoleto. |
![]() | WorkingSet64 |
| Nombre | Descripción | |
|---|---|---|
![]() | BeginErrorReadLine | |
![]() | BeginOutputReadLine | |
![]() | CancelErrorRead | |
![]() | CancelOutputRead | |
![]() | Close | |
![]() | CloseMainWindow | |
![]() | CreateObjRef | |
![]() | Dispose() | |
![]() | Dispose(Boolean) | Infraestructura. |
![]() ![]() | EnterDebugMode | |
![]() | Equals(Object) | |
![]() | Finalize | |
![]() ![]() | GetCurrentProcess | |
![]() | GetHashCode | |
![]() | GetLifetimeService | |
![]() ![]() | GetProcessById(Int32) | |
![]() ![]() | GetProcessById(Int32, String) | |
![]() ![]() | GetProcesses() | |
![]() ![]() | GetProcesses(String) | |
![]() ![]() | GetProcessesByName(String) | |
![]() ![]() | GetProcessesByName(String, String) | |
![]() | GetService | |
![]() | GetType | |
![]() | InitializeLifetimeService | |
![]() | Kill | |
![]() ![]() | LeaveDebugMode | |
![]() | MemberwiseClone() | |
![]() | MemberwiseClone(Boolean) | |
![]() | OnExited | |
![]() | Refresh | |
![]() | Start() | |
![]() ![]() | Start(ProcessStartInfo) | |
![]() ![]() | Start(String) | |
![]() ![]() | Start(String, String) | |
![]() ![]() | Start(String, String, SecureString, String) | |
![]() ![]() | Start(String, String, String, SecureString, String) | |
![]() | ToString | |
![]() | WaitForExit() | |
![]() | WaitForExit(Int32) | |
![]() | WaitForInputIdle() | |
![]() | WaitForInputIdle(Int32) |
| Nombre | Descripción | |
|---|---|---|
![]() | Disposed | |
![]() | ErrorDataReceived | |
![]() | Exited | |
![]() | OutputDataReceived |
Nota |
|---|
Nota |
|---|
Nota |
|---|
El atributo HostProtectionAttribute aplicado a este tipo o miembro tiene el siguiente valor de la propiedad Resources: SharedState | Synchronization | ExternalProcessMgmt | SelfAffectingProcessMgmt. El atributo HostProtectionAttribute no afecta a las aplicaciones de escritorio (que normalmente se inician haciendo doble clic en un icono, escribiendo un comando o introduciendo una dirección URL en el explorador). Para obtener más información, vea la clase HostProtectionAttribute o Programación en SQL Server y atributos de protección de host. |
using System; using System.Diagnostics; using System.ComponentModel; namespace MyProcessSample { class MyProcess { public static void Main() { Process myProcess = new Process(); try { myProcess.StartInfo.UseShellExecute = false; // You can start any process, HelloWorld is a do-nothing example. myProcess.StartInfo.FileName = "C:\\HelloWorld.exe"; myProcess.StartInfo.CreateNoWindow = true; myProcess.Start(); // This code assumes the process you are starting will terminate itself. // Given that is is started without a window so you cannot terminate it // on the desktop, it must terminate itself or you can do it programmatically // from this application using the Kill method. } catch (Exception e) { Console.WriteLine(e.Message); } } } }
using System; using System.Diagnostics; using System.ComponentModel; namespace MyProcessSample { class MyProcess { // Opens the Internet Explorer application. void OpenApplication(string myFavoritesPath) { // Start Internet Explorer. Defaults to the home page. Process.Start("IExplore.exe"); // Display the contents of the favorites folder in the browser. Process.Start(myFavoritesPath); } // Opens urls and .html documents using Internet Explorer. void OpenWithArguments() { // url's are not considered documents. They can only be opened // by passing them as arguments. Process.Start("IExplore.exe", "www.northwindtraders.com"); // Start a Web page using a browser associated with .html and .asp files. Process.Start("IExplore.exe", "C:\\myPath\\myFile.htm"); Process.Start("IExplore.exe", "C:\\myPath\\myFile.asp"); } // Uses the ProcessStartInfo class to start new processes, // both in a minimized mode. void OpenWithStartInfo() { ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe"); startInfo.WindowStyle = ProcessWindowStyle.Minimized; Process.Start(startInfo); startInfo.Arguments = "www.northwindtraders.com"; Process.Start(startInfo); } static void Main() { // Get the path that stores favorite links. string myFavoritesPath = Environment.GetFolderPath(Environment.SpecialFolder.Favorites); MyProcess myProcess = new MyProcess(); myProcess.OpenApplication(myFavoritesPath); myProcess.OpenWithArguments(); myProcess.OpenWithStartInfo(); } } }
- LinkDemand
para plena confianza del llamador inmediato. Esta clase no puede ser utilizada por código de confianza parcial. - InheritanceDemand
para que haya plena confianza para los herederos. Esta clase no la puede heredar el código de confianza parcial.
Windows 7, Windows Vista SP1 o posterior, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (no se admite Server Core), Windows Server 2008 R2 (se admite Server Core con SP1 o posterior), Windows Server 2003 SP2
.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
