Share via


IBasicDevice::add_ConnectionStatusChanged method (windows.media.streaming.h)

Registers an event handler for the ConnectionStatusChanged event.

Syntax

HRESULT add_ConnectionStatusChanged(
  [in]          ABI::Windows::Media::Streaming::IConnectionStatusHandler *handler,
  [out, retval] EventRegistrationToken                                   *token
);

Parameters

[in] handler

A ConnectionStatusHandler event handler function.

[out, retval] token

Reference to a token that can be used to unregister the event handler.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.

Remarks

To unregister the event handler that was registered by this method, pass the token value to the remove_ConnectionStatusChanged method.

Requirements

Requirement Value
Target Platform Windows
Header windows.media.streaming.h

See also

IBasicDevice