UpnpGetUDN (Windows CE 5.0)

Send Feedback

This function retrieves the UPnP Unique Device Name (UDN) for a device. The UDN is used to uniquely identify the UPnP device on the network.

BOOL WINAPI UpnpGetUDN(PCWSTRpszDeviceName,PCWSTRpszTemplateUDN,PWSTRpszUDNBuf,PDWORDpchBuf); 

Parameters

  • pszDeviceName
    [in] Local device name specified in the UPNPDEVICEINFO structure.
  • pszTemplateUDN
    [in] Pointer to the UDN element in the device description template specified in the UPNPDEVICEINFO structure. May be NULL, in which case the UDN of the root device is returned.
  • pszUDNBuf
    [out] Output buffer. Contains the UDN on return.
  • pchBuf
    [in, out] Length of supplied buffer in WCHARS. Updated with the length of the UDN on return.

Return Values

Returns TRUE if the function call succeeds, FALSE if an error occurs.

Remarks

If the device implementation does not specify a UDN in UPNPDEVICEINFO when calling UpnpAddDevice, the service will generate a suitable random UDN. The UPnP architecture specifies that a device should use the same UDN across reboots. This function may be called to retrieve the assigned UDN and save it away for reuse when the device is re-created later.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Upnpdevapi.h.
Link Library: Upnpcapi.lib.

See Also

UPNPDEVICEINFO | UpnpAddDevice | UPnP C Device Host Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.