IWSDiscoveryPublisher::MatchProbeEx method (wsddisco.h)
Determines whether a Probe message matches the specified host and sends a WS-Discovery ProbeMatches message with extended information if the match is made.
Syntax
HRESULT MatchProbeEx(
[in] const WSD_SOAP_MESSAGE *pProbeMessage,
[in] IWSDMessageParameters *pMessageParameters,
[in] LPCWSTR pszId,
[in] ULONGLONG ullMetadataVersion,
[in] ULONGLONG ullInstanceId,
[in] ULONGLONG ullMessageNumber,
[in, optional] LPCWSTR pszSessionId,
[in, optional] const WSD_NAME_LIST *pTypesList,
[in, optional] const WSD_URI_LIST *pScopesList,
[in, optional] const WSD_URI_LIST *pXAddrsList,
[in, optional] const WSDXML_ELEMENT *pHeaderAny,
[in, optional] const WSDXML_ELEMENT *pReferenceParameterAny,
[in, optional] const WSDXML_ELEMENT *pPolicyAny,
[in, optional] const WSDXML_ELEMENT *pEndpointReferenceAny,
[in, optional] const WSDXML_ELEMENT *pAny
);
Parameters
[in] pProbeMessage
Pointer to a WSD_SOAP_MESSAGE structure that represents the Probe message passed to the notification sink's ProbeHandler.
[in] pMessageParameters
Pointer to an IWSDMessageParameters object that represents the transmission parameters passed in to the notification sink's ProbeHandler.
[in] pszId
The logical or physical address of the device, which is used as the device endpoint address. A logical address is of the form urn:uuid:{guid}
. A physical address can be a URI prefixed by http or https, or simply a URI prefixed by uri
. Whenever possible, use a logical address.
[in] ullMetadataVersion
Current metadata version.
[in] ullInstanceId
Identifier for the current instance of the device being published. This identifier must be incremented whenever the service is restarted. For more information about instance identifiers, see Appendix I of the WS-Discovery specification.
[in] ullMessageNumber
Counter within the scope of the instance identifier for the current message. The message number must be incremented for each message.
[in, optional] pszSessionId
Unique identifier within the scope of the instance identifier for the current session. This parameter corresponds to the sequence identifier in the AppSequence block in the Probe message. For more information about sequence identifiers, see Appendix I of the WS-Discovery specification.
This parameter may be NULL.
[in, optional] pTypesList
Pointer to a WSD_NAME_LIST structure that represents the list of types supported by the publishing host. May be NULL.
If pTypesList is specified, MatchProbe will use WS-Discovery matching logic to verify that the types in the list match the types specified in pProbeMessage.
[in, optional] pScopesList
Pointer to a WSD_URI_LIST structure that represents the list of matching scopes supported by the publishing host. The list contains hash values in string form. May be NULL.
If pScopesList is specified, MatchProbe will use WS-Discovery matching logic to verify that the scopes in the list match the scopes specified in pProbeMessage.
[in, optional] pXAddrsList
Pointer to a WSD_URI_LIST structure that represents the list of transport addresses supported by the publishing host. Each transport address string contains an address and port number which can be used for connection by a remote host. May be NULL.
[in, optional] pHeaderAny
Pointer to a WSDXML_ELEMENT structure that contains an XML element to be inserted in the "ANY" section of the header.
[in, optional] pReferenceParameterAny
Pointer to a WSDXML_ELEMENT structure that contains an XML element to be inserted in the "ANY" section of the reference parameter properties.
[in, optional] pPolicyAny
Not used.
[in, optional] pEndpointReferenceAny
Pointer to a WSDXML_ELEMENT structure that contains an XML element to be inserted in the "ANY" section of the endpoint.
[in, optional] pAny
Pointer to a WSDXML_ELEMENT structure that contains an XML element to be inserted in the "ANY" section of the message body.
Return value
Possible return values include, but are not limited to, the following:
Return code | Description |
---|---|
|
The method completed successfully. |
|
One or more of the following conditions is true:
|
|
The publisher has not been started. Attaching a notification sink starts the publisher. To attach a sink, call RegisterNotificationSink. |
|
Insufficient memory to complete the operation. |
Remarks
MatchProbeEx should be called only when the discovery publisher has issued a ProbeHandler callback. pProbeMessage and pMessageParameters are passed directly from the callback into MatchProbeEx. The ProbeHandler also passes information required by the publisher to determine if the supplied Probe message matches and, if so, to issue a ProbeMatches response if appropriate.
MatchProbeEx sends ProbeMatches messages on all bound adapters and automatically issues message retransmissions when required by WS-Discovery.
The parameters referring to WSDXML_ELEMENT structures can be used to extend the contents of the ProbeMatches message being sent with custom information.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | wsddisco.h (include Wsdapi.h) |
DLL | Wsdapi.dll |