UpnpRegisterRootDevice2 is similar to UpnpRegisterRootDevice, except that it also allows the description document to be specified as a file or a memory buffer.
UpnpRegisterRootDevice2 is similar to UpnpRegisterRootDevice, except that it also allows the description document to be specified as a file or a memory buffer. The description can also be configured to have the correct IP and port address.NOTE: For the configuration to be functional, the internal web server MUST be present. In addition, the web server MUST be activated (using UpnpSetWebServerRootDir) before calling this function. The only condition where the web server can be absent is if the description document is specified as a URL and no configuration is required (i.e. config_baseURL = 0.)
UpnpRegisterRootDevice2 is synchronous and does not generate any callbacks. Callbacks can occur as soon as this function returns.
Examples of using different types of description documents:
1) Description specified as a URL: descriptionType == UPNPREG_URL_DESC description is the URL bufferLen = 0 (ignored) 2) Description specified as a file: descriptionType == UPNPREG_FILENAME_DESC description is a filename bufferLen = 0 (ignored) 3) Description specified as a memory buffer: descriptionType == UPNPREG_BUF_DESC description is pointer to a memory buffer bufferLen == length of memory buffer