2-130
SOMobjects Base Toolkit: Programmer’s Reference Manual
activate_impl_failed Method
Purpose
Sends a message to the DSOM daemon indicating that a server did not activate.
IDL Syntax
void activate_impl_failed (
in ImplementationDef implDef,
in long rc);
Description
The activate_impl_failed method sends a message to the DSOM daemon (somdd)
indicating that the server did not activate.
Parameters
receiver A pointer to the SOMOA object that attempted to activate the
implementation.
env A pointer to the Environment structure for the method caller.
implDef A pointer to the ImplementationDef object representing the
implementation that failed to activate.
rc A return code designating the reason for failure.
Example
#include <somd.h> /* needed by all servers */
main(int argc, char **argv)
{
Environment ev;
SOM_InitEnvironment(&ev);
/* Initialize the DSOM run–time environment */
SOMD_Init(&ev);
/* Retrieve its ImplementationDef from the Implementation
Repository by passing its implementation ID as a key */
SOMD_ImplDefObject =
_find_impldef(SOMD_ImplRepObject, &ev, argv[1]);
/* create the SOMOA */
SOMD_SOMOAObject = SOMOANew();
...
/* suppose something went wrong with server initialization */
...
/* tell the daemon (via SOMOA) that activation failed */
_activate_impl_failed(SOMD_SOMOAObject,
&ev, SOMD_ImplDefObject, rc);
Original Class
SOMOA
Commenti su questo manuale