IAdminWebServer::GetWebSiteProperties Method [C++]

Use this method to retrieve, given a server instance, the properties of a site as name/value pairs in a Dictionary object.

Definition

[C++]

HRESULT IAdminWebServer::GetWebSiteProperties(BSTRbstrInstance,
  IDictionary**ppIDictSiteProperties);

[Visual Basic]

Function GetWebSiteProperties(bstrInstance As String) As Object

Parameters

  • bstrInstance[C++]
    [in] A numeric value, expressed as a BSTR, representing a server instance for a site.
  • bstrInstance[Visual Basic]
    A numeric value, expressed as a String, representing a server instance for a site.
  • ppIDictSiteProperties[C++]
    [out] The address of a pointer used to return the IDictionary interface of the Dictionary object containing the properties of the specified site.

Return Values

[C++] This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

[Visual Basic] This method returns a reference to a Dictionary object containing the properties of the specified site.

Error Values

[C++] This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

[Visual Basic] This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

[C++] The ppIDictSiteProperties parameter contains valid data only if the method returns successfully.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

Example

[Visual Basic]

<%
' Create AdminWebServer object
Set objWebServer = CreateObject("Commerce.AdminWebServer")
    
' Get Web sites
WebSites = objWebServer.GetWebSites
For WebInstance = LBound(WebSites, 1) To UBound(WebSites, 1)
    ' Return its properties in a dictionary
    Set objDict = objWebServer.GetWebSiteProperties(WebSites(WebInstance))

    ' Enumerate and display the dictionary
   For Each property in objDict
      Response.Write  property & " = " & objDict.value(property) & "<br>" 
    next
Next

' Destroy objects
Set objDict = Nothing
Set objWebServer = Nothing
%>

See Also

[C++]AdminWebServer Object

[Visual Basic]AdminWebServer Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.