IUPnPRegistrar::GetUniqueDeviceName method (upnphost.h)

The GetUniqueDeviceName method retrieves the UDN for the specified device. The UDN has been generated by the device host for each embedded device. The template UDN in the device description is replaced by this generated UDN for each embedded device when the device is registered. This method is re-entrant.

Syntax

HRESULT GetUniqueDeviceName(
  [in]  BSTR bstrDeviceIdentifier,
  [in]  BSTR bstrTemplateUDN,
  [out] BSTR *pbstrUDN
);

Parameters

[in] bstrDeviceIdentifier

Specifies the identifier returned by RegisterDevice or RegisterRunningDevice.

[in] bstrTemplateUDN

Specifies the UDN from the device description template.

[out] pbstrUDN

Receives the device's UDN that was generated by the device host.

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

Each UDN specified for a device in the device description template is replaced during registration. The device host replaces each UDN with a globally unique one.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header upnphost.h
DLL Upnphost.dll

See also

IUPnPRegistrar