Theater SDK Banner 

Art
[Previous][Next]

INSSEventNotification::Initialize

Called when the server starts up.

Syntax

HRESULT Initialize (
INSSServerContext  *pServer,
DWORD  *pdwHeartbeatPeriod
);

Parameters

[in] pServer

Specifies a pointer to the server context. The server context is used to store information about the server. For more information about the server context and its properties, see Event Authorization and Notification Contexts.

[out] pdwHeartbeatPeriod

Specifies the heartbeat period, in milliseconds. The server sends an NSSE_HEARTBEAT event at the interval specified by this parameter.

A value of 0 (zero) specifies no heartbeat events are to be sent.

Return Values

This method must return S_OK upon successful completion, or an HRESULT error value.

Remarks

Every authorization and event notification component must support the INSSEventNotification interface and the Initialize method. This method is used to initialize the entire component and not just the event handler interface.

The following code illustrates a skeletal implementation of the INSSEventNotification::Initialize method:

HRESULT 
CEventNotification::Initialize(
      INSSServerContext __RPC_FAR *pServer,
      DWORD __RPC_FAR *pdwHeartbeatPeriod ) 
{
  *pdwHeartbeatPeriod = 0; // No heartbeats are required
  return( S_OK );
}

See Also

INSSEventNotification::Shutdown, INSSEventNotification::OnHeartBeat

[Previous][Next]



© 1996-1998 Microsoft Corporation. All rights reserved