Share via


IVsTextMarkerTypeProvider.GetTextMarkerType Method

Definition

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

public:
 int GetTextMarkerType(Guid % pguidMarker, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsPackageDefinedTextMarkerType ^ % ppMarkerType);
public int GetTextMarkerType (ref Guid pguidMarker, out Microsoft.VisualStudio.TextManager.Interop.IVsPackageDefinedTextMarkerType ppMarkerType);
abstract member GetTextMarkerType : Guid * IVsPackageDefinedTextMarkerType -> int
Public Function GetTextMarkerType (ByRef pguidMarker As Guid, ByRef ppMarkerType As IVsPackageDefinedTextMarkerType) As Integer

Parameters

pguidMarker
Guid

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

ppMarkerType
IVsPackageDefinedTextMarkerType

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

Returns

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

Remarks

COM Signature

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.

Note

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.

Applies to