Exportar (0) Imprimir
Expandir todo

ProcessModule.BaseAddress (Propiedad)

Devuelve la dirección de memoria en la que se cargó el módulo.

Espacio de nombres: System.Diagnostics
Ensamblado: System (en system.dll)

public IntPtr BaseAddress { get; }
/** @property */
public IntPtr get_BaseAddress ()

public function get BaseAddress () : IntPtr

Valor de propiedad

Dirección de carga del módulo.

Process myProcess = new Process();
// Get the process start information of notepad.
ProcessStartInfo  myProcessStartInfo = new ProcessStartInfo("notepad.exe");
// Assign 'StartInfo' of notepad to 'StartInfo' of 'myProcess' object.
myProcess.StartInfo = myProcessStartInfo;
// Create a notepad.
myProcess.Start();      
System.Threading.Thread.Sleep(1000);
ProcessModule myProcessModule;
// Get all the modules associated with 'myProcess'.
ProcessModuleCollection myProcessModuleCollection = myProcess.Modules;
Console.WriteLine("Base addresses of the modules associated "
   +"with 'notepad' are:");
// Display the 'BaseAddress' of each of the modules.
for( int i = 0; i < myProcessModuleCollection.Count; i++)
{
   myProcessModule = myProcessModuleCollection[i];
   Console.WriteLine(myProcessModule.ModuleName+" : "
      +myProcessModule.BaseAddress);
}
// Get the main module associated with 'myProcess'.
myProcessModule = myProcess.MainModule;
// Display the 'BaseAddress' of the main module.
Console.WriteLine("The process's main module's base address is: "
   +myProcessModule.BaseAddress);
 myProcess.CloseMainWindow();

Windows 98, Windows 2000 SP4, Windows Millennium, Windows Server 2003, Windows XP Media Center, Windows XP Professional x64, Windows XP SP2, Windows XP Starter Edition

.NET Framework no admite todas las versiones de cada plataforma. Para obtener una lista de las versiones admitidas, vea Requisitos del sistema.

.NET Framework

Compatible con: 2.0, 1.1, 1.0

Adiciones de comunidad

AGREGAR
Mostrar:
© 2014 Microsoft