Partager via


IVsTextLines.GetPositionOfLine(Int32, Int32) Method

Definition

Returns the position number of a line.

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

Parameters

iLine
Int32

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

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::GetPositionOfLine(  
   [in] long iLine,  
   [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