Delen via


IVsEditorFactory.MapLogicalView Method

Maps a logical view to a physical view.

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

Syntax

'Declaration
Function MapLogicalView ( _
    ByRef rguidLogicalView As Guid, _
    <OutAttribute> ByRef pbstrPhysicalView As String _
) As Integer
int MapLogicalView(
    ref Guid rguidLogicalView,
    out string pbstrPhysicalView
)
int MapLogicalView(
    [InAttribute] Guid% rguidLogicalView, 
    [OutAttribute] String^% pbstrPhysicalView
)
abstract MapLogicalView : 
        rguidLogicalView:Guid byref * 
        pbstrPhysicalView:string byref -> int
function MapLogicalView(
    rguidLogicalView : Guid, 
    pbstrPhysicalView : String
) : int

Parameters

  • rguidLogicalView
    Type: Guid%

    [in] Unique identifier of the logical view.

  • pbstrPhysicalView
    Type: String%

    [out, retval] Pointer to the physical view to which the logical view is to be mapped.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsEditorFactory::MapLogicalView(
   [in] REFGUID rguidLogicalView,
   [out, retval] BSTR *pbstrPhysicalView
);

The environment calls this method when it needs to determine what physical view string your editor factory associates with a given logical view GUID. The environment is handed the logical view GUID by the caller of OpenStandardEditor. Before it can call InitializeEditorInstance, it first needs to associate that logical view GUID with the appropriate physical view string for the editor factory.

Physical views correspond to the actual types of windows that an editor factory can create. For example, the Visual Basic editor factory can create a code window or a forms designer. Logical view GUIDs (LOGVIEWIDS) allow the caller to request the specific view that matches the reason the caller is requesting the view. For example, the third party can ask for the view appropriate for debugging (LOGVIEWID_Debugging) or for navigating the cursor in the editor (LOGVIEWID_TextView). For more information, see Single and Multi-tab Views.

.NET Framework Security

See Also

Reference

IVsEditorFactory Interface

Microsoft.VisualStudio.Shell.Interop Namespace