Sdílet prostřednictvím


IVsTextLines.GetPositionOfLineIndex(Int32, Int32, Int32) Method

Definition

Returns the position number in the text buffer, given a line and column number.

public:
 int GetPositionOfLineIndex(int iLine, int iIndex, [Runtime::InteropServices::Out] int % piPosition);
int GetPositionOfLineIndex(int iLine, int iIndex, [Runtime::InteropServices::Out] int & piPosition);
public int GetPositionOfLineIndex (int iLine, int iIndex, out int piPosition);
abstract member GetPositionOfLineIndex : int * int * int -> int
Public Function GetPositionOfLineIndex (iLine As Integer, iIndex As Integer, ByRef piPosition As Integer) As Integer

Parameters

iLine
Int32

[in] Number of the line whose position is requested.

iIndex
Int32

[in] Location of the character on iLine.

piPosition
Int32

[out] Pointer to the equivalent position number.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextLines::GetPositionOfLineIndex(  
   [in] long iLine,  
   [in] CharIndex iIndex,  
   [out] long *piPosition  
);  

This method could require considerable resources, depending upon the underlying implementation of the buffer. That is, it could be very difficult to calculate the size of the buffer if it is a virtual-line-oriented implementation as in Visual Basic.

Applies to