IUPnPDescriptionDocument::DeviceByUDN method (upnp.h)

The DeviceByUDN method returns the device with the specified unique device name (UDN) contained within the loaded description document.

Syntax

HRESULT DeviceByUDN(
  [in]  BSTR        bstrUDN,
  [out] IUPnPDevice **ppudDevice
);

Parameters

[in] bstrUDN

Specifies the UDN of the device.

[out] ppudDevice

Receives a reference to an IUPnPDevice object that describes the device. This reference must be released when it is no longer used.

Return value

If the method succeeds, the return value is S_OK. Otherwise, the method returns one of the COM error codes defined in WinError.h.

Remarks

Use DeviceByUDN after loading the device description using IUPnPDescriptionDocument::Load or IUPnPDescriptionDocument::LoadAsync. The IUPnPDescriptionDocument::ReadyState property returns READYSTATE_COMPLETED.

Do not use DeviceByUDN unless a device description is first loaded using either IUPnPDescriptionDocument::Load or IUPnPDescriptionDocument::LoadAsync. The search operation only searches in the currently loaded device description.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header upnp.h
DLL Upnp.dll

See also

IUPnPDescriptionDocument

IUPnPDevice