Windows Media Services SDK banner art
PreviousNext

INSSEventNotification::Initialize

Called when the server starts up.

Syntax

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

Parameters

[in] pServer

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

[out] pdwMsHeartbeatPeriod

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) indicates no heartbeat events are to be sent.

Return Values

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

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, 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

PreviousNext


© 1996-1999 Microsoft Corporation. All rights reserved.