UpnpGetUDN (Windows Embedded CE 6.0)
1/6/2010
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.
Syntax
BOOL WINAPI UpnpGetUDN(
PCWSTR pszDeviceName,
PCWSTR pszTemplateUDN,
PWSTR pszUDNBuf,
PDWORD pchBuf
);
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 Value
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
Header | upnpdevapi.h |
Library | Upnpcapi.lib |
Windows Embedded CE | Windows CE .NET 4.0 and later |