IVsTextBufferCoordinator.SetSpanMappings Method
Establishes the list of mappings between the primary and secondary buffers.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)
Syntax
'宣言
Function SetSpanMappings ( _
cSpans As Integer, _
rgSpans As NewSpanMapping() _
) As Integer
'使用
Dim instance As IVsTextBufferCoordinator
Dim cSpans As Integer
Dim rgSpans As NewSpanMapping()
Dim returnValue As Integer
returnValue = instance.SetSpanMappings(cSpans, _
rgSpans)
int SetSpanMappings(
int cSpans,
NewSpanMapping[] rgSpans
)
int SetSpanMappings(
[InAttribute] int cSpans,
[InAttribute] array<NewSpanMapping>^ rgSpans
)
function SetSpanMappings(
cSpans : int,
rgSpans : NewSpanMapping[]
) : int
Parameters
cSpans
Type: System.Int32[in] The number of mappings specified in the rgSpans array.
rgSpans
Type: [][in] An array of NewSpanMapping structures each of which specify a single mapping between the primary and secondary buffers.
Return Value
Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code.
Remarks
COM Signature
From singlefileeditor.idl:
HRESULT SetSpanMappings(
[in] long cSpans,
[in, size_is(cSpans)] NewSpanMapping *rgSpans
);
This method replaces any existing mappings.
This method returns an E_INVALIDARG error code if the buffer mapping mode (as set in a call to the SetBufferMappingModes method) for the primary buffer is set to BCMM_ENTIREBUFFER and the number of spans specified by the cSpans parameter is greater than 1.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
IVsTextBufferCoordinator Interface