INSSEventHandler::Initialize

The INSSEventHandler::Initialize method is called when the NetShow server starts up.

Syntax

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

Parameters

[in] pServer

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

[out] pdwMsHeartbeatPeriod

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

A value of zero specifies no heartbeat events will be sent.

Return Values

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

Remarks

Every authorization and event notification component must support the INSSEventHandler 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 skeleton implementation of the INSSEventHandler::Initialize method.

HRESULT 
CEventHandler::Initialize(
      INSSServerContext __RPC_FAR *pServer,
      DWORD __RPC_FAR *pdwHeartbeatPeriod ) 
{
  *pdwHeartbeatPeriod = 0; // No heartbeat events are required.
  return( S_OK );
}

See Also

INSSEventHandler::Shutdown, INSSEventHandler::OnHeartbeat

© 1996-1998 Microsoft Corporation. All rights reserved.