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.
A version of this page is also available for
4/8/2010

This method loads a document synchronously. It does not return control to the caller until the load operation is complete.

Syntax

HRESULT Load(
  BSTR 
bstrUrl
);

Parameters

bstrUrl

[in] Specifies the URL of the document to load.

Return Value

S_OK

This method was successful.

Otherwise, the method returns one of the COM error codes defined in WinError.h, or one of the following UPnP return values.

UPnP-specific Return value Description

UPNP_E_DEVICE_ELEMENT_EXPECTED

Extensible Markup Language (XML) document does not have a device element. It is missing either from the root element or the DeviceListelement.

UPnP_E_DEVICE_ELEMENT_EXPECTED

There is no Deviceelement in the specified description document.

UPNP_E_DEVICE_NODE_INCOMPLETE

XML document is missing one of the required elements from the Device element.

UPNP_E_ICON_ELEMENT_EXPECTED

XML document does not have an icon element. It is missing from the IconListelement, or the DeviceListelement does not contain an IconListelement.

UPnP_E_ICON_ELEMENT_EXPECTED

There is no Icon element in the specified description document.

UPNP_E_ICON_NODE_INCOMPLETE

XML document is missing one of the required elements from the Icon element.

UPnP_E_ICON_NODE_INCOMPLETE

There is no Icon Node in the specified description document.

UPNP_E_ROOT_ELEMENT_EXPECTED

XML document does not have a root element at the top level of the document.

UPnP_E_ROOT_ELEMENT_EXPECTED

There is no Root element in the specified description document.

UPNP_E_SERVICE_ELEMENT_EXPECTED

XML document does not have a service element. It is missing from the ServiceListelement, or the DeviceListelement does not contain a ServiceListelement.

UPNP_E_SERVICE_NODE_INCOMPLETE

XML document is missing one of the required elements from the Service element.

Remarks

This method should not be called from a user interface thread because it can take a long time for the method to return.

If the Loadmethod is called by a script within a Web page, bstrUrlmay be a relative URL. The address of the current web page is used as the base URL.

If this method is called from a Web page, the URL the caller specifies must refer to the same server from which the Web page was loaded.

Requirements

Header upnp.h
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also