IWSDDeviceProxy::GetServiceProxyByType (Compact 2013)
3/26/2014
This method retrieves a generic IWSDServiceProxy proxy for a service exposed by the device by port type name.
Syntax
HRESULT GetServiceProxyByType(
const WSDXML_NAME* pType,
IWSDServiceProxy** ppServiceProxy
);
Parameters
- pType
[in] Reference to a WSDXML_NAME structure that specifies the port type name.
- ppServiceProxy
[out] Pointer to the IWSDServiceProxy object associated with the specified service.
Return Value
The following table shows the possible error code return values.
Error code |
Description |
---|---|
S_OK |
This method completed successfully. |
E_POINTER |
pType or ppServiceProxy is NULL. |
E_INVALIDARG |
There is no metadata associated with the service specified by pType. |
E_OUTOFMEMORY |
Insufficient memory to complete the operation. |
E_FAIL |
There is no endpoint associated with the service proxy. |
Remarks
If the device hosts more than one service of the specified type, a proxy for any one of the services may be returned. In such a case, callers should not depend on any particular service proxy being returned.
Requirements
Header |
wsdapi.h |
Library |
wsdapi.lib |