INSSEventHandler::GetHandledEvents

The INSSEventHandler::GetHandledEvents method is used to specify which events will trigger a call from the NetShow server.

Syntax

HRESULT GetHandledEvents (
DWORD  cMaxHandledEvents,
DWORD  *pcHandledEvents,
NSS_EVENT_TYPE  *rgHandledEvents
);

Parameters

[in] cMaxHandledEvents

Specifies the maximum number of different handled events.

[out] pcHandledEvent

Specifies the number of events in the rgHandledEvent parameter.

[out] rgHandledEvent

Specifies the list of events that will trigger a call from the server to the INSSEventHandler::HandleEvent method. Supported values for this parameter are:

Event Type Description
NSSE_CONNECT Client connected
NSSE_DISCONNECT Client disconnected
NSSE_OPEN Title opened
NSSE_CLOSE Title closed
NSSE_PLAY Title started streaming
NSSE_STOP Title stopped streaming

Return Values

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

Remarks

Memory for the events specified by the rgAuthorizedEvents is allocated and freed by the server.

The following code illustrates a skeleton implementation of the INSSEventHandler::GetHandledEvents method:

HRESULT 
CEventHandler::GetHandledEvents(
        DWORD cMaxHandledEvents,
        DWORD __RPC_FAR *pcHandledEvents,
        NSS_EVENT_TYPE __RPC_FAR *rgHandledEvents ) 
{
  if ( ( NULL == pcHandledEvents )
    || ( NULL == pcHandledEvents )
    || ( cMaxHandledEvents < 9 ) ) {
    return( E_INVALIDARG );
  }
  *pcHandledEvents = 6;
  rgHandledEvents[0] = NSSE_CONNECT;
  rgHandledEvents[1] = NSSE_DISCONNECT;
  rgHandledEvents[2] = NSSE_OPEN;
  rgHandledEvents[3] = NSSE_CLOSE;
  rgHandledEvents[4] = NSSE_PLAY;
  rgHandledEvents[5] = NSSE_STOP;
  return( S_OK );
}

See Also

INSSEventHandler::HandleEvent

© 1996-1998 Microsoft Corporation. All rights reserved.