ISimilarity::CopyAndSwap method (msrdc.h)

Creates copies of an existing similarity traits table and an existing similarity file ID table, swaps the internal pointers, and deletes the existing tables.

After the CopyAndSwap method returns, the application continues to use the same ISimilarity object that it used before calling this method. However, the ISimilarity object is now associated with a different similarity file on disk.

Syntax

HRESULT CopyAndSwap(
  [in, optional] ISimilarity               *newSimilarityTables,
  [in, optional] ISimilarityReportProgress *reportProgress
);

Parameters

[in, optional] newSimilarityTables

An optional pointer to a temporary ISimilarity object that is used to create temporary copies of the tables. Before calling the CopyAndSwap method, the caller must call the CreateTable method to create the temporary tables. On return, the caller must call the CloseTable method to close the temporary tables.

[in, optional] reportProgress

An optional pointer to an ISimilarityReportProgress object that will receive information on the progress of the copy-and-swap operation and allow the application to stop the copy operation. The caller must release this interface when it is no longer needed.

Return value

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

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header msrdc.h
DLL MsRdc.dll

See also

ISimilarity

ISimilarityReportProgress::ReportProgress