Enabling Changes to Certificates

From InterBase
Jump to: navigation, search

Changes to the number of simultaneous users take effect immediately.

In order for other changes to the certificates to take effect, you must stop and restart the InterBase service. There is no Services API method in the current implementation to restart the InterBase service.

You can stop and start a service on Windows hosts programmatically using the Win32 API. You must be Administrator or a member of the Power Users NT group to start or stop a service.

For example:

Restarting a Windows service with the Win32 API

SC_HANDLE service;
if (!(service = OpenService(manager, "InterBaseGuardian",
SERVICE_STARTSERVICE_STOP)))
return 1;
if (!ControlService(service, SERVICE_CONTROL_STOP, NULL)) {
CloseServiceHandle(service);
return 1;
}
if (!StartService(service, 0, NULL)) {
CloseServiceHandle(service);
return 1;
}
CloseServiceHandle(service);
return 0;

The example code above works only on Windows server platforms, and only on the host where the InterBase server runs. On non-server Windows platforms, InterBase runs as an application, and you must manually stop and restart it to cause it to read the ib_license.dat file.

On Superserver implementations of InterBase on UNIX, you must use ibmgr to shut down and restart ibserver.