IGPM::GetSitesContainer method (gpmgmt.h)
Creates and returns a GPMSitesContainer object from which sites can be opened and queried.
Syntax
HRESULT GetSitesContainer(
[in] BSTR bstrForest,
[in] BSTR bstrDomain,
[in] BSTR bstrDomainController,
[in] long lDCFlags,
[out] IGPMSitesContainer **ppIGPMSitesContainer
);
Parameters
[in] bstrForest
Required. Full DNS name of the forest in which to access sites; this is the name of the forest root domain. Use null-terminated string.
[in] bstrDomain
Name of the domain in which to access sites. If specified, this must be a full Domain Name Server (DNS) name, such as example.microsoft.com. If a domain is specified in the bstrDomain parameter, the Group Policy Management Console (GPMC) accesses sites through that domain. If no domain is specified, the GPMC accesses the sites through the forest that is specified in the bstrForest parameter. Use a null-terminated string.
[in] bstrDomainController
If specified, the name of the domain controller to use with the domain specified in the bstrDomain parameter. The name can be a DNS name or a NetBIOS name. Otherwise, the method uses the primary domain controller (PDC). Use a null-terminated string.
[in] lDCFlags
Flags to use to locate the domain controller for the domain. Currently, the only supported value is GPM_USE_ANYDC. If this parameter is set to zero, and bstrDomainController is specified, the method uses the specified domain controller. Otherwise, the method uses the PDC.
[out] ppIGPMSitesContainer
Address of a pointer to the IGPMSitesContainer interface.
Return value
C++
Returns S_OK if successful. Returns a failure code if an error occurs.JScript
Returns a reference to a GPMSitesContainer object.VB
Returns a reference to a GPMSitesContainer object.Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | gpmgmt.h |
DLL | Gpmgmt.dll |