UPNPDEVICEINFO

This structure identifies a UPNP device. It is used by the UpnpAddDevice function.

typedef struct {
  DWORD cbStruct;
  PWSTR pszDeviceDescription;
  PWSTR pszDeviceName;
  PWSTR pszUDN;
  DWORD cachecontrol;
  PUPNPCALLBACK pfCallback;
  PVOID pvUserDevContext; 
} UPNPDEVICEINFO;

Members

  • cbStruct
    Sizeof (UPNPDEVICEINFO).
  • pszDeviceDescription
    XML device description template.
  • pszDeviceName
    The local identifier for the device. This may be any string, using only characters that are valid for file names. Most of the functions in the UPnP device API refer to a device instance by this name. If a device by this name is already hosted on this system, an error is returned.
  • pszUDN
    Optional UDN. If specified, this becomes the Universal Device Name (UDN) for this device. Must begin with uuid:. If this parameter is Null, the UPnP service will generate a suitable uuid. The UPnP architecture recommends that the UDN be unchanged across device reboots. Because the UPnP device API does not persist the UDN, this field allows the application to ensure that it gets the same UDN after the device is removed and re-added.
  • cachecontrol
    Device lifetime in seconds. The device announcements are sent at this interval. If initialized to 0, the default lifetime is assumed.
  • pfCallback
    Pointer to the device callback function. See definition of PUPNPCALLBACK. The device implementation should be prepared to receive callback messages at any time until the UpnpRemoveDevice function is called.
  • pvUserDevContext
    Caller-supplied instance data. Treated as an opaque field by the UPnP service and passed in as the second parameter to the device callback function.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Upnpdevapi.h.

See Also

UpnpAddDevice | UpnpRemoveDevice

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.