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

  1. 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



API introduced: V5R2

[ Back to top | IBM PASE for i APIs | APIs by category ]