Return a pointer to user-allocated data from a DBPROCESS structure.
BYTE *dbgetuserdata(dbproc) DBPROCESS *dbproc;
A pointer to the DBPROCESS structure that provides the connection for a particular front-end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and server.
A generic BYTE pointer to the user’s private data space. This pointer must have been previously saved with the dbsetuserdata routine.
This routine returns, from a DBPROCESS structure, a pointer to user-allocated data. The application must have previously saved this pointer with the dbsetuserdata routine.
dbgetuserdata and dbsetuserdata allow the application to associate user data with a particular DBPROCESS. This avoids the necessity of using global variables for this purpose. One use for these routines is to handle deadlock, as shown in the example on the dbsetuserdata reference page. That example reruns the transaction when the application’s message handler detects deadlock.
This routine is particularly useful when the application has multiple DBPROCESSes.