ctaSetDefaultServer

Specifies the location of the default Natural Access Server (ctdaemon) with which the client application communicates.

Prototype

DWORD ctaSetDefaultServer ( char *address)

Argument

Description

address

Pointer to the server address or object descriptor string.


Return values

Return value

Description

SUCCESS

 

CTA_BAD_ARGUMENT

Invalid server address.

CTAERR_NOT_IMPLEMENTED

Function is not available in the execution mode associated with the specified context.

CTAERR_NOT_INITIALIZED

Natural Access is not initialized. Call ctaInitialize first.


Details

ctaSetDefaultServer specifies the location of the default Natural Access Server (ctdaemon) with which the client application communicates. This function overrides the default server assigned in the cta.cfg file.

Example

int DemoSetDefaultServer()
{
      int ret;
          ret = ctaSetDefaultServer("cta://nms-server.company.com/");
          return ret;
}