Saves a pointer to private data space in an SRV_PROC structure.
int srv_setuserdata (
SRV_PROC * srvproc,
void * ptr );
where
SUCCEED or FAIL.
The ODS Library passes the current SRV_PROC structure to most event handlers. A pointer to user data can be saved in the SRV_PROC structure by using srv_setuserdata. This pointer to user data allows Open Data Services server applications to access private data without using global or static variables to hold private data. Open Data Services programs can then be reentrant.
The ptr pointer is not manipulated in any way by the ODS Library. It is provided only for the convenience of Open Data Services developers. The data that ptr points to can be allocated at connect time and accessed later with srv_getuserdata.
This entry | For information about |
---|---|
srv_getuserdata | Getting a pointer to private data space in a server process |