isc_service_query()

From InterBase

Go Up to API Function Reference


Requests and retrieves information about the InterBase server to which the client is attached.

Syntax

 ISC_STATUS isc_service_query(
 ISC_STATUS *status_vector,
 isc_svc_handle *svc_handle,
 isc_resv_handle *reserved,
 unsigned short send_spb_length,
 char *send_spb,
 unsigned short request_spb_length,
 char *request_spb,
 unsigned short buffer_length,
 char *buffer);
Parameter Type Description

<status_vector>

ISC_STATUS *

Pointer to the error status vector

<svc_handle>

isc_svc_handle *

Pointer to a long value containing the handle of the service structure.

<reserved>

isc_resv_handle *

Reserved for future use; should be NULL.

<send_spb_length>

unsigned short

Length in bytes of the service parameter buffer

<send_spb>

char *

Pointer to a service parameter buffer containing flags for the Services Manager.

<request_spb_length>

unsigned short

Length in bytes of the request buffer

<request_spb>

char *

Pointer to a buffer containing item specifiers for requested information.

<buffer_length>

unsigned short

Length in bytes of the return buffer

<buffer>

char *

Pointer to a buffer containing information received from the Services Manager.

Description

Use isc_service_query() to request information from the Services Manager. You must have an active connection to a running Services Manager, made using isc_service_attach().

There are components in the InterBase Express™ package for Delphi and C++Builder that provide a visual interface to the Services Manager. See the Developer's Guide.

Example

There are several examples of using isc_service_query() with C/C++ in Querying the Services Manager.

Return value

isc_service_query() returns the second element of the status vector. Zero indicates success. A nonzero value indicates an error. For InterBase errors, the first element of the status vector is set to 1, and the second element is set to an InterBase error code.

To check for an InterBase error, examine the first two elements of the status vector directly. For more information about examining the status vector, see Handling Error Conditions.

See Also

Advance To: