Accessing an IProtocols Object

You access an IProtocols object by calling the IBuildCatalog.Protocols property, as in the following example, where objProtocols is the name you give to the IProtocols object:

Option Explicit 
On Error Resume Next

Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objProtocols, objProtocol 

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

For Each objCatalog in objCatalogs
  Set objProtocols = objCatalog.objProtocols
  Wscript.Echo objCatalog.Name & " searches the following protocols:"

  For Each objProtocol in objProtocols
     If objProtocol.Included Then Wscript.Echo objProtocol.Urlname
  Next

Next

'Release objects 
Set objProtocols = Nothing 
Set objCatalogs  = Nothing 
Set objBuildServer  = Nothing 
Set objSearchAdmin  = Nothing 
 

© 1997-1998 Microsoft Corporation. All rights reserved.