2-122
SOMobjects Base Toolkit: Programmer’s Reference Manual
somdDisableServer Method
Purpose
Disables a server process from starting until it is explicitly enabled again.
IDL Syntax
ORBStatus somdDisableServer (in string server_alias);
Description
The somdDisableServer method disables the server process associated with the server
alias. Once a server process has been disabled, it cannot be restarted until it is explicitly
enabled again. Initially, all server processes are enabled by default. Note: If the server
process to be disabled is currently running, then it is first stopped before disabling. If the
method is unsuccessful in stopping the server, the disable method fails.
Parameters
receiver A pointer to an object of class SOMDServerMgr.
ev A pointer to the Environment structure for the calling method.
server_alias The implementation alias of the server to be disabled.
Return Value
Returns 0 for success or a DSOM error code for failure.
Example
#include <somd.h>
#include <servmgr.h>
SOMDServerMgr servmgr;
string server_alias = ”MyServer”;
ORBStatus rc;
Environment e;
SOM_InitEnvironment(&e);
SOMD_Init(&e);
servmgr = SOMDServerMgrNew();
rc = _somdDisableServer(servmgr, &e, server_alias);
Original Class
SOMDServerMgr
Related Information
Methods: somdEnableServer
Kommentare zu diesen Handbüchern