CSGetZoneTag Function

Description

Gets the supplemtary information of the ZONE_BEGIN Consoul vt100 escape sequence for a zone ID in a specific console line.

Syntax

VB/A 32bits

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

VB/A 64bits

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

Return Value

The return value is the number of characters (Consoul is unicode, each character occupies 2 bytes) that were written at the memory location pointed by lpStringBuffer.

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 wZoneID should be.

wZoneID

The zone number for which we want get the tag information. Consoul will reach for the tag of the first zone it finds on the line with this zone ID; other instances of the zone on the same line cannot be reached by this function.

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 extracted tag string, up to wBufferCharLen characters.

Remarks

The tag information for a zone is a parameter of the ZONE_BEGIN Consoul vt100 escape sequence.

There's currently no API function to write a zone tag, although there are other API functions like CSReplaceLine that can help.

Last updated: May 13 2022.