Accessing an ISiteRestrictions Object

You access an ISiteRestrictions object by calling the IBuildCatalog.Sites property, as in the following example, where objSites is the name you give to the ISiteRestrictions object:

Option Explicit 
On Error Resume Next 

Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objSites 

Set objSearchAdmin = CreateObject("Search.SearchAdmin.1") 
Set objBuildServer = objSearchAdmin.BuildServer 
Set objCatalogs = objBuildServer.BuildCatalogs 
Set objCatalog  = objCatalogs("KMSampleCatalog2")
Set objSites    = objCatalog.objSites 

...

'Release objects 
Set objSites    = Nothing 
Set objCatalog  = Nothing 
Set objCatalogs = Nothing 
Set objBuildServer = Nothing 
Set objSearchAdmin = Nothing 
 

© 1997-1998 Microsoft Corporation. All rights reserved.