SiteConfig.AddRefToGroupComponent Method (PIA)

Use this method to add a reference to a global resource so that a site can access that resource. If you use this method to create a global resource, in order to read the correct property values, use the SiteConfigReadOnly object methods. To set the correct property values, use the GlobalConfig object on the global resource that is referenced by this site-level resource.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Configuration
…
Public Sub AddRefToGroupComponent(bstrSiteResourceName As String,
  bstrGroupResourceName As String)

[C#]

using Microsoft.CommerceServer.Interop.Configuration;
…
public void AddRefToGroupComponent(stringbstrSiteResourceName,
  stringbstrGroupResourceName);

Parameters

[Visual Basic .NET]

  • bstrSiteResourceName
    A String that contains the name of the resource configuration object to be added to the site.
  • bstrGroupResourceName
    A String that contains the name of the global resource configuration object to which a reference is being added.

[C#]

  • bstrSiteResourceName
    A string that contains the name of the resource configuration object to be added to the site.
  • bstrGroupResourceName
    A string that contains the name of the global resource configuration object to which a reference is being added.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

Remarks

The Initialize method must be called before this method can be used.

If you use this method to create a global resource, use the SiteConfigReadOnly object methods to read the correct property values. Use the GlobalConfig object on the global resource that is referenced by this site-level resource to set the correct property values.

[Visual Basic .NET]

Example

' sSiteResName and sGlob are strings
' oSiteConfig is a Commerce SiteConfig object
oSiteConfig.AddRefToGroupComponent(sSiteResName,sGlob)

Requirements

Namespace: Microsoft.CommerceServer.Interop.Configuration

Platforms: Windows 2000, Windows Server 2003

Assembly: cs_mscscfg (in cs_mscscfg.dll)

See Also

SiteConfig Class

Copyright © 2005 Microsoft Corporation.
All rights reserved.