Udostępnij za pośrednictwem


IVsTextBufferCoordinator.GetMappingOfPrimaryPosition Method

Definition

Maps the specified position in the primary buffer to the span in the secondary buffer.

public:
 int GetMappingOfPrimaryPosition(int lPosition, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsPrimary, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsSecondary);
public:
 int GetMappingOfPrimaryPosition(int lPosition, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsPrimary, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsSecondary);
int GetMappingOfPrimaryPosition(int lPosition, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & ptsPrimary, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & ptsSecondary);
public int GetMappingOfPrimaryPosition (int lPosition, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] ptsPrimary, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] ptsSecondary);
abstract member GetMappingOfPrimaryPosition : int * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] -> int
Public Function GetMappingOfPrimaryPosition (lPosition As Integer, ptsPrimary As TextSpan(), ptsSecondary As TextSpan()) As Integer

Parameters

lPosition
Int32

[in] A character offset into the primary buffer from the beginning of the buffer.

ptsPrimary
TextSpan[]

[in, out] A TextSpan object that is filled in with the line, offset pair in the primary buffer for the specified position.

ptsSecondary
TextSpan[]

[in, out] A TextSpan object that is filled in with the line, offset pair in the secondary buffer for the corresponding primary position.

Returns

If successful, returns S_OK; otherwise, returns an error code.

Remarks

COM Signature

From singlefileeditor.idl:

HRESULT GetMappingOfPrimaryPosition(  
   [in]  long      lPosition,  
   [out] TextSpan *ptsPrimary,  
   [out] TextSpan *ptsSecondary  
);  

Applies to