CSGetLineText Function

Description

Gets the text of a specific console line.

Syntax

VB/A 32bits

Private Declare Function CSGetLineText Lib "consoul_010205_32.dll" ( _
  ByVal hWnd As Long, _
  ByVal wLine As Integer, _
  ByVal wBufferCharLen As Integer, _
  ByVal lpStringBuffer As Long, _
  ByVal wAsVt100 As Integer _
) As Integer

VB/A 64bits

Private Declare PtrSafe Function CSGetLineText Lib "consoul_010205_64.dll" ( _
  ByVal hWnd As LongPtr, _
  ByVal wLine As Integer, _
  ByVal wBufferCharLen As Integer, _
  ByVal lpStringBuffer As LongPtr, _
  ByVal wAsVt100 As Integer _
) As Integer

Return Value

The return value.

Parameters

hWnd

The window handle (HWND) of the Consoul window, as returned by CSCreateLogWindow.

wLine

The number of the line (as returned by CSPushLine) where the specified pwZoneID should be.

wBufferCharLen

The size in characters (*Consoul" is unicode, one char is 2 bytes) of the receiving memory buffer.

lpStringBuffer

The address of the memory buffer where Consoul will write the line text string, up to wBufferCharLen characters. No terminating zero is written in the buffer.

wAsVt100

If 0 (zero), only the text parts of the line contents are extracted, stripping out the Consoul vt100 escape sequences. If 1 (one) then the full contents, including escapes sequences are written in lpStringBuffer.

Remarks

Consoul does not memorize the exact strings that are pushed (CSPushLine) or set (CSSetLine) into the window queue. Consoul parses the content that is pushed into an intermediary script. When functions like CSGetZoneText or CSGetLineText are called, Consoul rebuilds the returned content from its internal scripts, thus there may be subtle differences between the original content that was pushed and the content that is returned by these functions.

Last updated: May 13 2022.