_ILESYMX()--Find an Exported ILE Symbol for i5/OS PASE


  Syntax
 #include <as400_protos.h>


 int _ILESYMX(ILEpointer          *export,
              unsigned long long  actmark,
              const char          *symbol);  


 int _ILESYM(ILEpointer  *export,
             int         actmark,
             const char  *symbol);  

  Default Public Authority: *USE

  Library: Standard C Library (libc.a)

  Threadsafe: Yes

Note: These functions can only be used in an i5/OS PASE program. See i5/OS PASE for more information about creating i5/OS PASE programs.

The _ILESYMX() and _ILESYM() functions find an exported symbol in the activation of an ILE bound program and return a 16-byte tagged pointer to the data or procedure for the symbol.


Parameters

export
(Output) Pointer to a 16-byte aligned buffer for the tagged pointer return value. The export buffer used to store a tagged pointer to the data or procedure for the exported symbol.

actmark
(Input) Specifies an activation mark that identifies the activation (in the current i5/OS job) to search for the symbol. A value of zero causes the system to search all activations in the activation group that started i5/OS PASE (either the activation group that called the Qp2RunPase API, or the default activation group for a job running program QP2FORK). The _ILELOADX and _ILELOAD functions return an activation mark when they load a bound program. 64-bit activation mark values can only be handled by _ILESYMX and _ILELOADX.

symbol
(Input) Pointer to the symbol name to find. symbol is the address of a null-terminated character string in the i5/OS PASE CCSID that specifies the name of a symbol exported by the actmark activation.

Authorities

_ILESYMX and _ILESYM call the ILE QleGetExpLong API to find the exported symbol. See QleGetExpLong()--Get Export Long for information about authorities required to use _ILESYMX and _ILESYM.


Return Value

A function result of -1 indicates an error that is further qualified by an errno value. If the symbol was successfully found, the export pointer is set to the address of the function or data for the symbol, and the function result is set to one of these values:

ILESYM_PROCEDURE (1) The export return value is a tagged pointer to an ILE procedure. An ILE procedure pointer can be used with the _ILECALLX function to call the ILE procedure.
ILESYM_DATA(2) The export return value is a tagged space pointer to a data item in the ILE activation.


Error Conditions

Memory errors and errors during ILE symbol resolution processing may be reported with an i5/OS exception message that the system converts to an i5/OS PASE signal (not return code and errno values). See i5/OS PASE Signal Handling for information about handling i5/OS exceptions.

At least these errno values can be returned, with other values also possible (such as i5/OS-unique ILE errno EAPAR):

[EACCES] Not authorized to the actmark activation.
[ENOENT] The symbol was not found in the actmark activation.


Related Information


API introduced: V4R5
Top | i5/OS PASE APIs | APIs by category