Share via


IVsEditorFactory.MapLogicalView(Guid, String) Method

Definition

Maps a logical view to a physical view.

public:
 int MapLogicalView(Guid % rguidLogicalView, [Runtime::InteropServices::Out] System::String ^ % pbstrPhysicalView);
public int MapLogicalView (ref Guid rguidLogicalView, out string pbstrPhysicalView);
abstract member MapLogicalView : Guid * string -> int
Public Function MapLogicalView (ByRef rguidLogicalView As Guid, ByRef pbstrPhysicalView As String) As Integer

Parameters

rguidLogicalView
Guid

[in] Unique identifier of the logical view.

pbstrPhysicalView
String

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

Returns

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.

Applies to