Freigeben über


IAdminIndexServer::RemoveCatalog method

[Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.]

Removes an existing catalog from the collection of catalog objects managed by an AdminIndexServer object. It can also delete the catalog directory from the system.

Syntax

HRESULT RemoveCatalog(
  [in] BSTR         bstrCatName,
  [in] VARIANT_BOOL fDelDirectory
);

Parameters

bstrCatName [in]

The name of an existing catalog to be removed.

fDelDirectory [in]

To delete the directory and remove the catalog from the collection, set this to VARIANT_TRUE. To remove the catalog from the collection but leave the directory intact, set this to VARIANT_FALSE. Defaults to VARIANT_FALSE.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Indexing Service must be stopped before a catalog can be removed.

Examples

' Remove the directory "src" from catalogs to be indexed, but don't delete it.
objAdminIS.Stop   'Stop the indexing service
objAdminIS.RemoveCatalog("src")
objAdminIS.Start  'Start the indexing service up again

Requirements

Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
End of client support
Windows 7
End of server support
Windows Server 2008 R2
DLL
Ciodm.dll

See also

IAdminIndexServer