UpnpGetUDN
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(
PCWSTR pszDeviceName,
PCWSTR pszTemplateUDN,
PWSTR pszUDNBuf,
PDWORD pchBuf
);
Parameters
- pszDeviceName
[in] Local device name specified in the UPNPDEVICEINFO structure. - pszTemplateUDN
[in] 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
Last updated on Tuesday, May 18, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.