IVsTextBufferCoordinator.SetSpanMappings(Int32, NewSpanMapping[]) Method

Definition

Establishes the list of mappings between the primary and secondary buffers.

public:
 int SetSpanMappings(int cSpans, cli::array <Microsoft::VisualStudio::TextManager::Interop::NewSpanMapping> ^ rgSpans);
int SetSpanMappings(int cSpans, std::Array <Microsoft::VisualStudio::TextManager::Interop::NewSpanMapping> const & rgSpans);
public int SetSpanMappings (int cSpans, Microsoft.VisualStudio.TextManager.Interop.NewSpanMapping[] rgSpans);
abstract member SetSpanMappings : int * Microsoft.VisualStudio.TextManager.Interop.NewSpanMapping[] -> int
Public Function SetSpanMappings (cSpans As Integer, rgSpans As NewSpanMapping()) As Integer

Parameters

cSpans
Int32

[in] The number of mappings specified in the rgSpans array.

rgSpans
NewSpanMapping[]

[in] An array of NewSpanMapping structures each of which specify a single mapping between the primary and secondary buffers.

Returns

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.

Applies to