IVsTextMarkerTypeProvider::GetTextMarkerType Method (Guid, IVsPackageDefinedTextMarkerType^)

 

Allows you to return a pointer to your IVsPackageDefinedTextMarkerType implementation for a custom marker type.

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

int GetTextMarkerType(
	[InAttribute] Guid% pguidMarker,
	[OutAttribute] IVsPackageDefinedTextMarkerType^% ppMarkerType
)

Parameters

pguidMarker
Type: System::Guid

[in] Pointer to a GUID identifying the external marker type.

ppMarkerType
Type: Microsoft.VisualStudio.TextManager.Interop::IVsPackageDefinedTextMarkerType^

[out] Pointer to the IVsPackageDefinedTextMarkerType implementation for the external marker type.

Return Value

Type: System::Int32

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

From textmgr.idl:

HRESULT IVsTextMarkerTypeProvider::GetTextMarkerType(
   [in] GUID *pguidMarker,
   [out] IVsPackageDefinedTextMarkerType **ppMarkerType
);

When a package registers an external marker type, this interface is implemented once by the specified service. This method passes you a GUID that matches the GUID of a marker that you have registered under "External Markers." You then need to pass back a pointer to your IVsPackageDefinedTextMarkerType implementation for this marker type.

System_CAPS_noteNote

You do not need to pass back a separate IVsPackageDefinedTextMarkerType instance every time this is called for the same GUID. For a given marker GUID, it can be the same instance each time. The reason for this interface is that you can register any number of marker types.

Return to top
Show: