Compartilhar via


IVsDifferenceService.OpenComparisonWindow(String, String) Method

Definition

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

public:
 Microsoft::VisualStudio::Shell::Interop::IVsWindowFrame ^ OpenComparisonWindow(System::String ^ leftFileMoniker, System::String ^ rightFileMoniker);
public:
 Microsoft::VisualStudio::Shell::Interop::IVsWindowFrame ^ OpenComparisonWindow(Platform::String ^ leftFileMoniker, Platform::String ^ rightFileMoniker);
Microsoft::VisualStudio::Shell::Interop::IVsWindowFrame OpenComparisonWindow(std::wstring const & leftFileMoniker, std::wstring const & rightFileMoniker);
public Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame OpenComparisonWindow (string leftFileMoniker, string rightFileMoniker);
abstract member OpenComparisonWindow : string * string -> Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame
Public Function OpenComparisonWindow (leftFileMoniker As String, rightFileMoniker As String) As IVsWindowFrame

Parameters

leftFileMoniker
String

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

rightFileMoniker
String

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

Returns

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.

Applies to