次の方法で共有


ICcServiceCB::OnStatusChangeNotify (Compact 2013)

3/26/2014

Deprecated.

This method notifies clients when there is a change in service status, and if the status change has associated data.

Syntax

HRESULT OnStatusChangeNotify(
  DWORD dwPreviousState,
  DWORD dwCurrentState,
  LPCOLESTR pwszStringData,
  IUnknown* pUnk
);

Parameters

  • dwPreviousState
    [in] Service state prior to the event of interest.
  • dwCurrentState
    [in] The current service state.
  • pwszStringData
    [in] Optional data associated with a status change.

    Use this value to pass back a small amount of data to the caller on state changes.

    For example, if the state change indicates a successful stream connection, pwszStringData could be the stream name.

  • pUnk
    [in] This is a custom interface that is specific to the corresponding state change.

    For example, on a state change of STREAM_CREATED, this could point to the ICcTransportStream interface pointer.

    If there is no custom data associated with a state change, this should be set to NULL.

Return Value

The following table shows return values for this method.

Value

Description

S_OK

Indicates success.

E_FAIL

Indicates failure.

If clients return E_FAIL, the service does not call back into the client with status again.

Requirements

Header

ccservicecb.h

See Also

Reference

ICcServiceCB
Core Connectivity Interfaces