IVsEditorFactory::MapLogicalView Method (Guid, String^)

 

Maps a logical view to a physical view.

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

int MapLogicalView(
	[InAttribute] Guid% rguidLogicalView,
	[OutAttribute] String^% pbstrPhysicalView
)

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.

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.

Return to top
Show: