共用方式為


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
int GetTextMarkerType(
    ref Guid pguidMarker,
    out IVsPackageDefinedTextMarkerType ppMarkerType
)
int GetTextMarkerType(
    [InAttribute] Guid% pguidMarker, 
    [OutAttribute] IVsPackageDefinedTextMarkerType^% ppMarkerType
)
abstract GetTextMarkerType : 
        pguidMarker:Guid byref * 
        ppMarkerType:IVsPackageDefinedTextMarkerType byref -> int 
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.

.NET Framework Security

See Also

Reference

IVsTextMarkerTypeProvider Interface

Microsoft.VisualStudio.TextManager.Interop Namespace