Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Introduction to External Program Interfaces : Using MEMPTR to reference external data : Initializing and uninitializing MEMPTR variables
 
Initializing and uninitializing MEMPTR variables
After declaring a MEMPTR variable, you must initialize it before you can use it. In general, to initialize a MEMPTR variable, you use the SET-SIZE statement to allocate a region of memory and associate it with the variable.
Note: You can also allocate the memory region for a MEMPTR variable using a shared library routine. In this case, you must still use the SET-SIZE statement to initialize the size of the returned memory region in ABL.
* Initializing MEMPTR variables using the SET-SIZE statement
* Checking a MEMPTR variable for initialization
* Freeing memory associated with a MEMPTR variable