Qp2dlerror()--Retrieve IBM PASE for i Dynamic Load Error Information
Syntax
#include <qp2user.h> char* Qp2dlerror(void);
Service Program Name: QP2USER
Default Public Authority: *USE
Threadsafe: No
Qp2dlerror() returns a pointer to a string that provides error information for the most recent dynamic load function (API Qp2dlopen, Qp2dlsym, or Qp2dlclose).
Parameters
None.
Authorities
None.
Return Value
The function result is a pointer to a null-terminated character string (in the job default CCSID). A null pointer is returned if no error occurred during the most recent dynamic load operation. Once Qp2dlerror is called, subsequent calls without an intervening dynamic load error also return a null pointer.
The ILE errno is set and a null pointer is returned for any internal processing error (such as an error converting the string from the IBM® i PASE CCSID to the job default CCSID).
Usage Notes
- Qp2dlerror is not threadsafe because it may call an IBM PASE for i function that is not threadsafe (dlerror) and uses a buffer in static storage for the error string that is also updated by other dynamic load functions (APIs Qp2dlopen, Qp2dlsym, and Qp2dlclose). Applications may need to serialize use of dynamic load functions and copy the error information string to preserve its contents.
Related Information
- IBM PASE for i
dlerror()--See AIX® documentation
- Qp2errnop()--Retrieve IBM PASE for i errno
Pointer
- Qp2RunPase()--Run an IBM PASE for i Program
API introduced: V5R2