FolderComparison Object

On this page:

Description

This object represents a Merge folder comparison window. The window isn’t necessarily visible on screen and can be used either to perform folder comparison services for a client or to present folder comparisons on the screen to the user.

Use the methods and properties exposed by this object to perform folder comparisons, extract results, and alter the appearance of the folder comparison window.

Once the comparison represented by this object is closed, the handler for the Close event provides the final opportunity to access methods and properties. Accessing them after this time will result in an error.

Properties

Active read/write, ICommonUI

The active state of the comparison window.

IDL [propget] HRESULT Active([out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Active([in] VARIANT_BOOL newValue)
.NET Boolean Active[get, set]

Busy read/write, IFolderComparison

Whether the comparison window is busy performing a folder comparison or retest operation.

IDL [propget] HRESULT Busy([out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Busy([in] VARIANT_BOOL newValue)
.NET Boolean Busy[get, set]

FileName read-only, IFolderComparison

The name of the file at the specified index and column in the comparison results.

IDL [propget] HRESULT FileName(
    [in] long nIndex,
    [in] short nFolder,
    [out, retval] BSTR* pValue)
.NET String get_FileName(
    Int32 nIndex,
    Int16 nFolder)

FilePath read-only, IFolderComparison

The path and name of the file at the specified index and column in the comparison results.

IDL [propget] HRESULT FilePath(
    [in] long nIndex,
    [in] short nFolder,
    [out, retval] BSTR* pValue)
.NET String get_FilePath(
    Int32 nIndex,
    Int16 nFolder)

FileType read-only, IFolderComparison

The type of the file at the specified index in the comparison results.

IDL [propget] HRESULT FileType(
    [in] long nIndex,
    [out, retval] FolderFileType* pValue)
.NET FolderFileType get_FileType(
    Int32 nIndex)

Folder read/write, IFolderComparison

The fully qualified path to the specified folder to be compared.

IDL [propget] HRESULT Folder(
    [in] short nFolder,
    [out, retval] BSTR* pValue)
[propput] HRESULT Folder(
    [in] short nFolder,
    [in] BSTR newValue)
.NET String get_Folder(
    Int16 nFolder)
void set_Folder(
    Int16 nFolder, String newValue)

FullFilePath read-only, IFolderComparison

The fully qualified path and name of the file at the specified index and column in the comparison results.

IDL [propget] HRESULT FullFilePath(
    [in] long nIndex,
    [in] short nFolder,
    [out, retval] BSTR* pValue)
.NET String get_FullFilePath(
    Int32 nIndex,
    Int16 nFolder)

Height read/write, ICommonUI

The height of the comparison window in pixels.

IDL [propget] HRESULT Height([out, retval] long* pValue)
[propput] HRESULT Height([in] long newValue)
.NET Int32 Height[get, set]

Left read/write, ICommonUI

The location of the left edge pixel coordinate of the comparison window.

IDL [propget] HRESULT Left([out, retval] long* pValue)
[propput] HRESULT Left([in] long newValue)
.NET Int32 Left[get, set]

Maximized read/write, ICommonUI

The maximized state of the comparison window.

IDL [propget] HRESULT Maximized([out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Maximized([in] VARIANT_BOOL newValue)
.NET Boolean Maximized[get, set]

Minimized read/write, ICommonUI

The minimized state of the comparison window.

IDL [propget] HRESULT Minimized([out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Minimized([in] VARIANT_BOOL newValue)
.NET Boolean Minimized[get, set]

NumberOfEntries read-only, IFolderComparison

The number of items in the comparison results. The comparison results contain the items in the same order as displayed to the user in the folder comparison window.

IDL [propget] HRESULT NumberOfEntries([out, retval] long* pValue)
.NET Int32 NumberOfEntries[get]

NumberOfSelectedItems read-only, IFolderComparison

The number of selected items in the comparison results.

IDL [propget] HRESULT NumberOfSelectedItems([out, retval] long* pValue)
.NET Int32 NumberOfSelectedItems[get]

Selected read/write, IFolderComparison

Indicates whether the file at the specified index in the comparison results is selected.

IDL [propget] HRESULT Selected(
    [in] long nIndex,
    [out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Selected(
    [in] long nIndex,
    [in] VARIANT_BOOL newValue)
.NET Boolean get_Selected(
    Int32 nIndex)
void set_Selected(
    Int32 nIndex, Boolean newValue)

Top read/write, ICommonUI

The location of the top edge pixel coordinate of the comparison window.

IDL [propget] HRESULT Top([out, retval] long* pValue)
[propput] HRESULT Top([in] long newValue)
.NET Int32 Top[get, set]

ViewType read/write, IComparison

The comparison type (two way or three way layout).

IDL [propget] HRESULT ViewType([out, retval] FileViewType* pValue)
[propput] HRESULT ViewType([in] FileViewType newValue)
.NET FileViewType ViewType[get, set]

Visible read/write, ICommonUI

The visible state of the comparison window.

IDL [propget] HRESULT Visible([out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Visible([in] VARIANT_BOOL newValue)
.NET Boolean Visible[get, set]

Width read/write, ICommonUI

The width of the comparison window in pixels.

IDL [propget] HRESULT Width([out, retval] long* pValue)
[propput] HRESULT Width([in] long newValue)
.NET Int32 Width[get, set]

Methods

Close ICommonUI

Closes the comparison window.

IDL HRESULT Close()
.NET void Close()

Compare IComparison

Compares two or three folders. This method is synchronous. An event ComparisonComplete is fired when the comparison is finished to report errors and results.

IDL HRESULT Compare(
    [in] VARIANT strFirst,
    [in] VARIANT strSecond,
    [in, optional] VARIANT strThird)
.NET void Compare(
    Object strFirst,
    Object strSecond,
    Object strThird)

CompareSelected IFolderComparison

Opens file comparison windows for the selected files in the comparison list.

IDL HRESULT CompareSelected()
.NET void CompareSelected()

DeselectAll IFolderComparison

Deselects all the files in the comparison list.

IDL HRESULT DeselectAll()
.NET void DeselectAll()

GiveUserControl ICommonUI

Gives control over the lifetime of the comparison window to the user. Merge will not automatically close the window when outstanding automation references are released.

IDL HRESULT GiveUserControl()
.NET void GiveUserControl()

HideEmptyFolders IFolderComparison

Hides folders that contain no changed, inserted, or removed files.

IDL HRESULT HideEmptyFolders()
.NET void HideEmptyFolders()

Print IComparison

Prints the folder comparison.

IDL HRESULT Print(
    [in] VARIANT_BOOL bShowPrinterDialog,
    [in] PageOrientation nOrientation)
.NET void Print(
    Boolean bShowPrinterDialog,
    PageOrientation nOrientation)

Refresh IComparison

Recompares the folders displayed in the window.

IDL HRESULT Refresh()
.NET void Refresh()

Report IComparison

Generates a report for the folder comparison.

IDL HRESULT Report(
    [in] BSTR bstrReporter,
    [in] LineEndingStyle nLineEndingStyle,
    [in] BSTR strOutputFile)
.NET void Report(
    String bstrReporter,
    LineEndingStyle nLineEndingStyle,
    String strOutputFile)

Report2 IComparison

Generates a report for the folder comparison.

IDL HRESULT Report2(
    [in] BSTR bstrReporter,
    [in] LineEndingStyle nLineEndingStyle,
    [in] VARIANT vtEncoding,
    [in] BSTR strOutputFile)
.NET void Report2(
    String bstrReporter,
    LineEndingStyle nLineEndingStyle,
    Object vtEncoding,
    String strOutputFile)

Restore ICommonUI

Restores the comparison window from minimized or maximised state to its normal resizable state.

IDL HRESULT Restore()
.NET void Restore()

Restore IFolderComparison

Restores the folder comparison window (undoes the effect of a minimize or maximize).

IDL HRESULT Restore()
.NET void Restore()

RetestSelected IFolderComparison

Retests the selected files in the comparison list.

IDL HRESULT RetestSelected()
.NET void RetestSelected()

SaveComparison IComparison

Saves the comparison to a file. We recommend that you use the .cmp7 extension in the filename.

IDL HRESULT SaveComparison(
    [in] BSTR filename)
.NET void SaveComparison(
    String filename)

SelectAll IFolderComparison

Selects all the files in the comparison results.

IDL HRESULT SelectAll()
.NET void SelectAll()

SelectChanged IFolderComparison

Selects all the changed files in the comparison results.

IDL HRESULT SelectChanged()
.NET void SelectChanged()

SetPanelTitles IComparison

Sets the titles shown above the folder columns.

IDL HRESULT SetPanelTitles(
    [in] VARIANT strFirst,
    [in] VARIANT strSecond,
    [in, optional] VARIANT strThird)
.NET void SetPanelTitles(
    Object strFirst,
    Object strSecond,
    Object strThird)

Stop IFolderComparison

Stops any ongoing comparisons, retests or refreshes.

IDL HRESULT Stop()
.NET void Stop()

ThreeWayMerge IFolderComparison

Merges the two outer folders in a three-way comparison into the central common ancestor folder. The number of merging conflicts encountered during the merge is returned.

IDL HRESULT ThreeWayMerge([out, retval] long* pValue)
.NET Int32 ThreeWayMerge()

Events

Close IFolderComparisonEvents

Occurs when the folder comparison window is closed by the user.

IDL HRESULT Close()
.NET void Close()

FolderComparisonComplete IFolderComparisonEvents

Occurs when the folder comparison finishes. The result code can be used to determine the success of the comparison.

IDL HRESULT FolderComparisonComplete(
    [in] FolderComparisonResult nResult)
.NET void FolderComparisonComplete(
    FolderComparisonResult nResult)

FolderRetestComplete IFolderComparisonEvents

Occurs when a folder comparison retest operation finishes.

IDL HRESULT FolderRetestComplete()
.NET void FolderRetestComplete()