Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
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 UPNPDEVICEINFOstructure.
- pszTemplateUDN
-
[in] Pointer to the UDN element in the device description template specified in the UPNPDEVICEINFOstructure. 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 UPNPDEVICEINFOwhen 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 |
Windows Mobile | Windows Mobile Version 5.0 and later |