Sambar Server Documentation

sa_ctx_props


Purpose

Gets the value of a context property.

Syntax

sa_ctx_props (context, action, property, buffer, buflen, outlen);

SA_CTX *context;
SA_INT action;
SA_INT property;
SA_BYTE *buffer;
SA_INT buflen;
SA_INT *outlen;

Parameters

context Server context.
action Specify SA_GET to retrieve the value of a property.
property The property whose value is being retrieved. Specify one of the following constants:

SA_CTXPROP_HOMEDIR - the directory in which the Sambar Server was installed.

SA_CTXPROP_LOGDIR - the directory in which all the log files reside.

SA_CTXPROP_SERVERNAME - the host name of the Sambar Server.

SA_CTXPROP_SERVERPORT - the port number on which the server is running.

SA_CTXPROP_SERVERSW - the Sambar Server software name and version number.

SA_CTXPROP_SYSADMIN - the name of the System Administrator.

buffer The buffer into which to receive the parameter value.

For SA_CTXPROP_SERVERPORT, pass a pointer to an integer. For all other properties, specify a buffer of sufficient size to receive a string less than 256 bytes in length.

buflen The length of buffer. Specify a length sufficient to hold the value returned in buffer. If the buffer is too small, sa_ctx_props will fail.
outlen The actual length of the value returned in buffer.

Returns

SA_SUCCEED if the function is successful; SA_FAIL otherwise.

Comments

None

See Also

sa_conn_props

© 1998 Sambar Technologies. All rights reserved. Terms of Use.