Share via


IWSDDeviceHost::SignalEvent (Compact 2013)

3/26/2014

This method notifies all subscribed clients that an event has occurred.

Syntax

HRESULT SignalEvent(
  LPCWSTR pszServiceId,
  const void* pBody,
  const WSD_OPERATION* pOperation
);

Parameters

  • pszServiceId
    [in] The ID of the service that generates the event.
  • pBody
    [in] The body of the event.
  • pOperation
    [in] Reference to a WSD_OPERATION structure that specifies the operation.

Return Value

The following table shows the possible error code return values.

Error code

Description

S_OK

This method completed successfully.

E_FAIL

The host is not started. Call IWSDDeviceHost::Start to start the device host.

E_INVALIDARG

pszServiceId is NULL, pOperation is NULL, the length in characters of pszServiceId exceeds WSD_MAX_TEXT_LENGTH (8192), there is no ResponseType structure associated with pOperation, or the service specified by pszServiceId is not subscribed to the event specified by the ResponseType member of pOperation.

Remarks

SignalEvent blocks until the event is sent to all clients. Since clients are contacted sequentially, it is possible that SignalEvent will block for a long time if any client responds slowly or is unreachable.

Requirements

Header

wsdapi.h

Library

wsdapi.lib

See Also

Reference

IWSDDeviceHost
Web Services on Devices Interfaces