srv_getuserdata

Returns a pointer to private data space in an SRV_PROC structure.


Important This Open Data Services function or macro is only supported in Microsoft® SQL Server™ version 7.0 for backward compatibility.


For more information about Open Data Services functions or macros supported for backward compatibility, see Open Data Services (Level 3).

Syntax

void * srv_getuserdata ( SRV_PROC * srvproc );

Arguments
srvproc
Is a pointer to the SRV_PROC structure that is the handle for a particular client connection. The structure contains all necessary control information the Open Data Services server application uses to manage communications and data between the Open Data Services server application and the client.
Returns

A generic pointer to the private data space in the SRV_PROC structure. If an error occurs or if nothing is set with srv_setuserdata, returns NULL.

Remarks

Events associated with a client connection’s SRV_PROC are activated either by a client request or by an Open Data Services request. A pointer to the activating event can be set by the srv_setuserdata function. This pointer to private data can be retrieved with srv_getuserdata.

Open Data Services server applications should be reentrant and avoid using global or static variables. Using private data eliminates the need for global or static variables.

See Also
srv_setuserdata  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.