Ver Mensaje Individual
  #3  
Antiguo 28-12-2009
Avatar de kurono
[kurono] kurono is offline
Miembro Premium
 
Registrado: jul 2007
Ubicación: Republica Dominicana
Posts: 1.126
Reputación: 18
kurono Va por buen camino
amigo neftali e buscado en la ayuda de delphi las dos opciones que me diste y la GetMem/FreeMem es la que mas se acerca a lo que quiero hacer pero segun la ayuda es para una variable yo lo que quiero es asignar esa memoria a un pograma ya ejecutandose,esto es lo que dice en la ayuda

Código Delphi [-]
Creates a dynamic variable and a pointer to the address of the block.

Unit

System

Category

dynamic allocation routines

Delphi syntax:

procedure GetMem(var P: Pointer; Size: Integer);

Description

P is a variable of any pointer type. Size is an expression specifying the size in bytes of the dynamic variable to allocate. Access the newly allocated memory by dereferencing the pointer; that is, use P^. 

If there isn't enough memory available to allocate the dynamic variable, an EOutOfMemory exception is raised.

Note:    It is considered preferable to use the New and Dispose procedures rather than GetMem and FreeMem.
Responder Con Cita