IVsTextMarkerTypeProvider.GetTextMarkerType Method

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)

Syntax

'宣言
Function GetTextMarkerType ( _
    ByRef pguidMarker As Guid, _
    <OutAttribute> ByRef ppMarkerType As IVsPackageDefinedTextMarkerType _
) As Integer
'使用
Dim instance As IVsTextMarkerTypeProvider
Dim pguidMarker As Guid
Dim ppMarkerType As IVsPackageDefinedTextMarkerType
Dim returnValue As Integer

returnValue = instance.GetTextMarkerType(pguidMarker, _
    ppMarkerType)
int GetTextMarkerType(
    ref Guid pguidMarker,
    out IVsPackageDefinedTextMarkerType ppMarkerType
)
int GetTextMarkerType(
    [InAttribute] Guid% pguidMarker, 
    [OutAttribute] IVsPackageDefinedTextMarkerType^% ppMarkerType
)
function GetTextMarkerType(
    pguidMarker : Guid, 
    ppMarkerType : IVsPackageDefinedTextMarkerType
) : int

Parameters

  • pguidMarker
    Type: System.Guid%

    [in] Pointer to a GUID identifying 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.

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.

注意

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.

Permissions

See Also

Reference

IVsTextMarkerTypeProvider Interface

IVsTextMarkerTypeProvider Members

Microsoft.VisualStudio.TextManager.Interop Namespace