IVsDifferenceService.OpenComparisonWindow Method

Opens and displays a file comparison window in Visual Studio with default labels and no additional roles.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)

Syntax

'Declaration
Function OpenComparisonWindow ( _
    leftFileMoniker As String, _
    rightFileMoniker As String _
) As IVsWindowFrame
IVsWindowFrame OpenComparisonWindow(
    string leftFileMoniker,
    string rightFileMoniker
)
IVsWindowFrame^ OpenComparisonWindow(
    [InAttribute] String^ leftFileMoniker, 
    [InAttribute] String^ rightFileMoniker
)
abstract OpenComparisonWindow : 
        leftFileMoniker:string * 
        rightFileMoniker:string -> IVsWindowFrame
function OpenComparisonWindow(
    leftFileMoniker : String, 
    rightFileMoniker : String
) : IVsWindowFrame

Parameters

  • leftFileMoniker
    Type: String

    [in] Path to the file that will be displayed in the left side of the comparison.

  • rightFileMoniker
    Type: String

    [in] Path to the file that will be displayed in the right side of the comparison.

Return Value

Type: Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame
The window frame used for the comparison.

Remarks

If either the left or right file is a binary file (which cannot be opened in the text editor), then this call causes Visual Studio to display a modal dialog box and return S_OK (even though pDiffWindow is null).

The left and right files will, if possible, be retrieved from the running documents table. If either file is already in the running documents table but cannot be opened in the text editor (because, for example, they are project files in the current solution), the file(s) are copied to a temporary directory and opened instead of the specified file(s).

The label for the left view is the name of the left file. The label for the right view is the name of the right file. No label is displayed for the inline view.

.NET Framework Security

See Also

Reference

IVsDifferenceService Interface

Microsoft.VisualStudio.Shell.Interop Namespace