Partager 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

'Déclaration
Function MapLogicalView ( _
    ByRef rguidLogicalView As Guid, _
    <OutAttribute> ByRef pbstrPhysicalView As String _
) As Integer
'Utilisation
Dim instance As IVsEditorFactory
Dim rguidLogicalView As Guid
Dim pbstrPhysicalView As String
Dim returnValue As Integer

returnValue = instance.MapLogicalView(rguidLogicalView, _
    pbstrPhysicalView)
int MapLogicalView(
    ref Guid rguidLogicalView,
    out string pbstrPhysicalView
)
int MapLogicalView(
    [InAttribute] Guid% rguidLogicalView, 
    [OutAttribute] String^% pbstrPhysicalView
)
function MapLogicalView(
    rguidLogicalView : Guid, 
    pbstrPhysicalView : String
) : int

Parameters

  • rguidLogicalView
    Type: System.Guid%

    [in] Unique identifier of the logical view.

  • pbstrPhysicalView
    Type: System.String%

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

Return Value

Type: System.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 Interaction Between Logical Views and Physical Views.

Permissions

See Also

Reference

IVsEditorFactory Interface

IVsEditorFactory Members

Microsoft.VisualStudio.Shell.Interop Namespace