Progress
External Program
Interfaces
Using MEMPTR To Reference External Data
The Progress MEMPTR data type provides a means to access (unmarshal and marshal) data that you plan to pass to and from other application and system environments using the following EPIs:
A MEMPTR variable references a region of memory set to a size that you specify. Once you declare and initialize the MEMPTR variable to the specified size, you can read and modify the memory region it references as follows:
- Read and write data values to specified locations within the MEMPTR region. These values can contain different numbers of bytes, depending on a data type that you specify for the value read or written.
- Read and write individual bits within a Progress INTEGER variable, whose value you can also read and write to a MEMPTR region.
- Assign values between two MEMPTR variables and between a MEMPTR variable and a RAW variable (or field).
- Indicate the byte order of data you have written so that a target system can interpret the MEMPTR data appropriately. This is primarily useful for exchanging MEMPTR data between different system environments using sockets.
Together, these features allow you to store and access data aggregates (structures), including complete Progress database records.
The following sections describe the general capabilities of MEMPTR data, including:
For more information on using MEMPTR for a specific EPI, see:
- Shared libraries — The "UNIX Shared Library and Windows DLL Support" section in this chapter, then "Shared Library and DLL Support"
- XML — The "XML" section in this chapter, then "XML Support"
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |