Share via


IWSDiscoveryPublisher::MatchProbe (Windows Embedded CE 6.0)

1/6/2010

This method determines if a Probe message matches the specified host and sends a ProbeMatch if the match is made.

Syntax

HRESULT MatchProbe(
  const WSD_SOAP_MESSAGE* pProbeMessage,
  IWSDMessageParameters* pMessageParameters,
  LPCWSTR pszId,
  ULONGLONG ullMetadataVersion,
  ULONGLONG ullInstanceId,
  ULONGLONG ullMessageNumber,
  LPCWSTR pszSessionId,
  const WSD_NAME_LIST* pTypesList,
  const WSD_URI_LIST* pScopesList,
  const WSD_URI_LIST* pXAddrsList
);

Parameters

  • pProbeMessage
    [in] Probe message passed in to the notification sink's ProbeHandler.
  • pMessageParameters
    [in] Transmission parameters passed in to the notification sink's ProbeHandler.
  • pszId
    [in] Device identifier to use in the device endpoint address.
  • ullMetadataVersion
    [in] Current metadata version.

    Note

    For compatibility with the WS-Discovery specification, this value must be less than or equal to UINT_MAX (4294967295).

  • ullInstanceId
    [in] Identifier for the current instance of the device being published.

    Note

    For compatibility with the WS-Discovery specification, this value must be less than or equal to UINT_MAX (4294967295).

  • ullMessageNumber
    [in] Counter within the scope of the instance identifier for the current message.

    Note

    For compatibility with the WS-Discovery specification, this value must be less than or equal to UINT_MAX (4294967295).

  • pszSessionId
    [in, optional] Unique identifier within the scope of the instance identifier for the current session.
  • pTypesList
    [in, optional] List of types supported by the publishing host. May be NULL.
  • pScopesList
    [in, optional] List of scopes supported by the publishing host. May be NULL.
  • pXAddrsList
    [in, optional] List of transport addresses supported by the publishing host. May be NULL.

Return Value

The following table shows the possible error code return values.

Error code Description

S_OK

This method completed successfully.

E_INVALIDARG

One or more of the following conditions is true:

  • pszId is NULL.
  • The length in characters of pszId exceeds WSD_MAX_TEXT_LENGTH (8192).
  • The length in characters of pszSessionId exceeds WSD_MAX_TEXT_LENGTH (8192).
  • pProbeMessage is NULL.

E_ABORT

The publisher has not been started. Attaching a notification sink starts the publisher. To attach a sink, call IWSDiscoveryPublisher::RegisterNotificationSink.

E_OUTOFMEMORY

Insufficient memory to complete the operation.

Remarks

MatchProbe should be only when the discovery publisher has issued a ProbeHandler callback. pProbeMessage and pMessageParameters are passed directly from the callback into MatchProbe, in addition to the required information for the publisher to determine if the probe matches and issue a ProbeMatch response if appropriate.

Requirements

Header wsdapi.h
Library wsdapi.lib
Windows Embedded CE Windows Embedded CE 6.0 R2

See Also

Reference

IWSDiscoveryPublisher
Web Services on Devices Interfaces