{**************************************************************************
   DLL Function declaration
***************************************************************************}

function CreateTerWindow(var arg: arg_list): THandle ; far; stdcall;external 'ter32.dll';
function CloseTer(hWnd: THandle; force: LongBool):  LongBool; far; stdcall;external 'ter32.dll';
function GetTerBuffer(hWnd: THandle; var BufSize: LongInt):  THandle; far; stdcall;external 'ter32.dll';
function SetTerBuffer(hWnd: THandle; hData: THandle; BufSize: LongInt; WinTitle: AnsiString; release: LongBool)
         : LongBool; far; stdcall;external 'ter32.dll';
function GetTerFields(hWnd: THandle; var TerField: StrTerField): LongBool; far; stdcall;external 'ter32.dll';
function GetTerFieldsAlt(hWnd: THandle; var TerField: StrTerField; LineNo: LongInt): LongBool; far; stdcall;external 'ter32.dll';
function HandleToStr(text: AnsiString; TextLen: Integer; hMem: LongInt): LongBool; far; stdcall;external 'ter32.dll';
function SetTerFields(hWnd: THandle; var TerField: StrTerField): LongBool; far; stdcall;external 'ter32.dll';

function InsertRtfBuf(hWnd : THandle; pBuf: AnsiString;StringLen: LongInt;LineNo: LongInt;ColNo: Integer;
                     Repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function SetTerFont(hWnd: THandle; FontTypeFace: AnsiString; repaint: LongBool): LongBool;
                     far; stdcall;external 'ter32.dll';
function SetTerDefaultFont(hWnd : THandle; FontTypeFace: AnsiString; PointSize: Integer; CharStyles: Integer;
                     TextColor: TColorRef; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function SetTerPointSize(hWnd : THandle; PointSize: Integer; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function SetTerCharStyle(hWnd : THandle; CharStyles: Integer; OnOff: LongBool; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function SetTerColor(hWnd : THandle; TextColor: TColorRef; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function SetTerBkColor(hWnd : THandle; TextBkColor: TColorRef; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function InsertTerText(hWnd : THandle; TextString : AnsiString; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function SelectTerText(hWnd : THandle; BegLine: LongInt; BegCol: Integer; EndLine: LongInt;
                     EndCol: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function SetTerCursorPos(hWnd : THandle; LineNo: LongInt; ColNo: Integer; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function GetTerCursorPos(hWnd : THandle;var LineNo: LongInt; var ColNo: Integer):
                     LongBool; far; stdcall;external 'ter32.dll';
function SetTerParaFmt(hWnd : THandle; ParaStyles: Integer; OnOff: LongBool; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function ParaIndentTwips(hWnd : THandle; DeltaLeft: Integer; DeltaRight: Integer; DeltaFirst: Integer;
                     repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function ParaLeftIndent(hWnd : THandle; IndentFlag: LongBool; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function ParaRightIndent(hWnd : THandle; IndentFlag: LongBool; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function ParaHangingIndent(hWnd : THandle; IndentFlag: LongBool; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function ParaNormal(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function DeselectTerText(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function SetTab(hWnd : THandle; TabType: Integer; TabPos: Integer; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function ClearTab(hWnd : THandle; TabPos: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function ClearAllTabs(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerAppendText(hWnd : THandle; text: AnsiString; FontId, ParaId: Integer; repaint: LongBool) :
                      LongBool; far; stdcall;external 'ter32.dll';
function TerInsertText(hWnd : THandle; text: AnsiString; FontId, ParaId: Integer; repaint: LongBool) :
                      LongBool; far; stdcall;external 'ter32.dll';
function TerCreateFont(hWnd : THandle; ReuseId: Integer; shared: LongBool; typeface: AnsiString;
                       PointSize, styles: Integer; TextColor, BkColor: LongInt; FieldId,AuxId: Integer)
                       : Integer; far; stdcall;external 'ter32.dll';
function TerCreateParaId(hWnd : THandle; ReuseId: Integer; shared: LongBool; LeftIndent, RightIndent,
                         FirstIndent, TabId, StyleId,AuxId,shading, pflags, SpaceBefore, SpaceAfter,
                         SpaceBetween, flags: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerDataVersion : Integer; far; stdcall;external 'ter32.dll';
function TerMergeFields(hWnd : THandle; FieldNames: AnsiString; FieldData: AnsiString; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerMergeFieldsU(hWnd : THandle; FieldNames: WideString; FieldData: WideString; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerMergePrint(var PrintArgs: StrPrint): LongBool; far; stdcall;external 'ter32.dll';
function TerMergePrintVB(var PrintArgs: StrPrint; PrintRect: TRect; MergeFields: AnsiString; MergeData: AnsiString):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerMergePrintRep(hDC: THandle; FileName: AnsiString; hBuf: THandle; BufLen: LongInt; PrintRect: TRect;
                     MergeFields: AnsiString; MergeData: AnsiString; StartPos: LongInt; var NextY: Integer):
                     LongInt; far; stdcall;external 'ter32.dll';
function TerPageBreak(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerPrint(hWnd : THandle; dialog: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerPrintPreviewMode(hWnd : THandle; ShowToolbar: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetPrintPreview(hWnd : THandle; PreviewBegins: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerColBreak(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerEnableRefresh(hWnd : THandle; EnableRefresh: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerLocateStyle(hWnd : THandle; styles: Integer; var StartLine :LongInt; var StartCol: Integer;
                     var StringLen: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerLocateStyleChar(hWnd : THandle; styles: Integer; present: LongBool; var StartLine :LongInt;
                     var StartCol: Integer; forward: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerPosHdrFtr(hWnd : THandle; sect: Integer; header :LongBool; pos: Integer; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerPosTable(hWnd : THandle; TableNo,RowNo,ColNo,pos: Integer; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerSectBreak(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetModify(hWnd : THandle; modify: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetOutputFormat(hWnd : THandle; OutputFormat: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSetParaShading(hWnd : THandle; shading: Integer; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerSetDefTabWidth(hWnd : THandle; NewWidth: Integer; repaint: LongBool):
                     Integer; far; stdcall;external 'ter32.dll';
function TerSetParaSpacing(hWnd : THandle; SpaceBefore, SpaceAfter, SpaceBetween: Integer; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerSetFontId(hWnd : THandle; FontId: Integer): LongBool; far; stdcall;external 'ter32.dll';
function LoadTerControl : LongBool; far; stdcall;external 'ter32.dll';
function GetTerLine(hWnd : THandle; LineNo: LongInt; LineText: AnsiString; LineFont: AnsiString):
                     Integer; far; stdcall;external 'ter32.dll';
function SetTerLine(hWnd : THandle; LineNo: LongInt; LineText: AnsiString; LineFont: AnsiString):
                     LongBool; far; stdcall;external 'ter32.dll';
function GetFontInfo(hWnd : THandle; FontId: Integer; FontTypeFace: AnsiString; var FontPointSize: Integer;
                     var FontStyles: Integer): LongBool; far; stdcall;external 'ter32.dll';
function SaveTerFile(hWnd : THandle; Outfile: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function ReadTerFile(hWnd : THandle; InFile: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function ReadTerFileU(hWnd : THandle; InFile: WideString): LongBool; far; stdcall;external 'ter32.dll';
function TerGetTextColor(hWnd : THandle; FontId: Integer; var TextColor: LongInt;
                     var TextBkColor: LongInt): LongBool; far; stdcall;external 'ter32.dll';
function TerMenuEnable(hWnd : THandle; EnableFlag: Integer): Word; far; stdcall;external 'ter32.dll';
function TerMenuSelect(hWnd : THandle; SelectFlag: Integer): Word; far; stdcall;external 'ter32.dll';
function TerRowColToAbs(hWnd : THandle; TextLine: LongInt; TextCol: Integer):
                     LongInt; far; stdcall;external 'ter32.dll';
function TerAbsToRowCol(hWnd : THandle; AbsPos: LongInt; var TextLine: LongInt; var TextCol: Integer):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerPrintPreview(hWnd : THandle; hPreviewDC: THandle; var PreviewRect: TRect; PageNo, scale: Integer):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerSetMargin(hWnd : THandle; LeftMarg: Integer; RightMarg: Integer; TopMarg: Integer;
                     BotMarg: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetReadOnly(hWnd : THandle; ReadOnly: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerEnableSpeedKey(hWnd : THandle; CommandId: Integer; EnableSpeedKey: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerRewrap(hWnd : THandle): LongBool; far; stdcall;external 'ter32.dll';
function TerScrLineHeight(hWnd : THandle; LineNo: LongInt): Integer; far; stdcall;external 'ter32.dll';
function TerSearchReplace(hWnd : THandle; SearchText: AnsiString; ReplaceText: AnsiString; flags: Integer;
                    StartPos: LongInt; var EndPos: LongInt; var BufSize: LongInt): LongBool; far; stdcall;external 'ter32.dll';
function TerSetPrinter(hWnd : THandle; PrinterName: AnsiString; DriverName: AnsiString;
                    PortName: AnsiString; hGlobal: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSetPaper(hWnd : THandle; PaperSize,PaperOrient: Integer; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerPastePicture(hWnd : THandle; PictFormat: Integer; hData: THandle; ParaFID: Integer;
                    align: Integer; insert: LongBool):Integer; far; stdcall;external 'ter32.dll';
function TerInsertObjectId(hWnd : THandle; PictId: Integer; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerGetHypertext(hWnd : THandle; HyperText: AnsiString; HyperCode: AnsiString):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerCreateTable(hWnd : THandle; TableRow: Integer; TableCol: Integer; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerInsertControl(hWnd : THandle; CtlClass: AnsiString; CtlStyles: LongInt; width,height,align,CtlId: Integer;
                    insert: LongBool): Integer; far; stdcall;external 'ter32.dll';
function TerInsertFootnote(hWnd : THandle; FootnoteMarker: AnsiString; FootnoteText: AnsiString;
                    FootnoteStyle: Integer; repaint: LongBool): Integer; far; stdcall;external 'ter32.dll';
function TerPictureFromFile(hWnd : THandle; FileName: AnsiString; align: Integer; insert: LongBool):
                    Integer; far; stdcall;external 'ter32.dll';
function TerPictureFromWmf(hWnd : THandle; FileName: AnsiString; align: Integer; insert: LongBool):
                    Integer; far; stdcall;external 'ter32.dll';
function TerInsertDrawObject(hWnd: THandle; ObjType,FrmX,FrmY,FrmWidth,FrmHeight: Integer):
                    Integer; far; stdcall;external 'ter32.dll';
function TerInsertParaFrame(hWnd: THandle; FrmX: Integer; FrmY: Integer; FrmWidth: Integer;
                    FrmHeight: Integer; boxed: LongBool): Integer; far; stdcall;external 'ter32.dll';
function TerMoveParaFrame(hWnd: THandle; ParaFID: Integer; FrmX: Integer; FrmY: Integer;
                    FrmWidth: Integer; FrmHeight: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSetAppMemory(hWnd: THandle; BlockSize: LongInt): LongBool; far; stdcall;external 'ter32.dll';
function TerGetAppMemory(hWnd: THandle): Pointer; far; stdcall;external 'ter32.dll';
function TerGetPictInfo(hWnd: THandle; pict: Integer; var style: Integer; var rect: TRect;
                    var align: Integer; var AuxId: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSetPictInfo(hWnd: THandle; pict: Integer; style: Integer;
                    align: Integer; AuxId: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSetPictSize(hWnd: THandle; pict: Integer; PictWidth, PictHeight: Integer):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerSetPreview(hWnd: THandle; NumPages, ZoomPct: Integer; ShowToolbar: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerSetSect(hWnd: THandle; NumCols, ColSpace: Integer; StartPage: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerRepaint(hWnd: THandle; ClearBackground: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerRegisterMsgCallback(hWnd: THandle; MsgCallback: Pointer): LongBool; far; stdcall;external 'ter32.dll';
function TerGetCurFont(hWnd: THandle; LineNo: LongInt; ColNo: Integer):
                    Integer; far; stdcall;external 'ter32.dll';
function TerGetEffectiveFont(hWnd: THandle): Integer; far; stdcall;external 'ter32.dll';
function TerSetBullet(hWnd: THandle; SetBullet,repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerEditStyle(hWnd: THandle; StartStyle: LongBool; StyleName: AnsiString; NewStyle: LongBool;
                    StyleType: Integer; repaint: LongBool): Integer; far; stdcall;external 'ter32.dll';
function TerSelectCharStyle(hWnd: THandle; StyleId: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSelectParaStyle(hWnd: THandle; StyleId: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetFontStyleId(hWnd: THandle; FontId: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerSetZoom(hWnd: THandle; ZoomPercent: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerGetPageFirstLine(hWnd: THandle; PageNum: Integer): LongInt; far; stdcall;external 'ter32.dll';
function TerSetTab(hWnd: THandle; TabType,TabPos,TabLeader: Integer; repaint: LongBool):Integer; far; stdcall;external 'ter32.dll';
function TerGetPageSect(hWnd: THandle; PageNo: Integer):Integer; far; stdcall;external 'ter32.dll';
function TerSetSectOrient(hWnd: THandle; PageOrient: Integer; repaint: LongBool):LongBool; far; stdcall;external 'ter32.dll';
function TerGetPageOrient(hWnd: THandle; PageNo: Integer):Integer; far; stdcall;external 'ter32.dll';
function TerRowPosition(hWnd: THandle; JustFlag: Integer; AllRows,repaint: LongBool):Integer; far; stdcall;external 'ter32.dll';
function TerRowHeight(hWnd: THandle; MinHeight: Integer; AllRows,repaint: LongBool):Integer; far; stdcall;external 'ter32.dll';
function TerSetFrameYBase(hWnd: THandle; FrameId,FrameBase: Integer):LongBool; far; stdcall;external 'ter32.dll';
function TerSetObjectAttrib(hWnd: THandle; ObjectId,LineType,LineThickness: Integer; LineColor: TColorRef;
                    FillSolid: LongBool; FillColor: TColorRef):LongBool; far; stdcall;external 'ter32.dll';
function TerSetBkPictId(hWnd: THandle; PictId,PictFlag: Integer; repaint: LongBool):LongBool; far; stdcall;external 'ter32.dll';
function TerInsertPictureFile(hWnd : THandle; FileName: AnsiString; embed: LongBool; align: Integer; insert: LongBool):
                    Integer; far; stdcall;external 'ter32.dll';
function TerSetTableColWidth(hWnd: THandle; ColWidth: Integer; repaint: LongBool):LongBool; far; stdcall;external 'ter32.dll';
function TerInsertTableCol(hWnd: THandle; InsertColumn,AllRows,repaint: LongBool):LongBool; far; stdcall;external 'ter32.dll';
function TerInsertTableRow(hWnd: THandle; InsertRow: LongBool; repaint: LongBool):LongBool; far; stdcall;external 'ter32.dll';
function TerCellBorder(hWnd: THandle; select,TopWidth,BotWidth,LeftWidth,RightWidth: Integer; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerCellShading(hWnd: THandle; select,ShadingPct: Integer; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerPosLineAtTop(hWnd: THandle; LineNo: LongInt; WinTop: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetFlags(hWnd: THandle; SetFlags: LongBool; FlagValues: LongInt): LongInt; far; stdcall;external 'ter32.dll';
function TerGetFrameSize(hWnd: THandle; FrameId: Integer; var FrameX: Integer; var FrameY: Integer;
                    var FrameWidth: Integer; var FrameHeight: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerGetTabStop(hWnd: THandle; LineNo: LongInt; TabNo: Integer; var TabPos: Integer;
                    var TabType: Integer; var TabFlags: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerAppendTextEx(hWnd : THandle; text: AnsiString; FontId, ParaId, CellId, ParaFID: Integer;
                    repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetRtfSel(hWnd: THandle; var BufSize: LongInt):  THandle; far; stdcall;external 'ter32.dll';
function TerGetParaInfo(hWnd : THandle; LineNo: LongInt; var LeftIndent, RightIndent,
                         FirstIndent, TabId, StyleId, AuxId, shading, pflags,
                         SpaceBefore, SpaceAfter, SpaceBetween, flags: Integer):
                         LongBool; far; stdcall;external 'ter32.dll';
function TerGetLineInfo(hWnd : THandle; LineNo: LongInt; var ParaId, CellId,
                         ParaFID, LineX, LineY, LineHeight: Integer; var lflags: LongInt; var InfoFlags: Integer):
                         LongBool; far; stdcall;external 'ter32.dll';
function TerGetLastMessage(TerMessage: AnsiString; DebugMsg: AnsiString): Integer; far; stdcall;external 'ter32.dll';
function TerResetLastMessage: LongBool; far; stdcall;external 'ter32.dll';
function TerPictLinkName(hWnd : THandle; PictId: Integer; GetName: LongBool; FileName: AnsiString):
                         LongBool; far; stdcall;external 'ter32.dll';
function TerGetCellInfo(hWnd : THandle; CellId: Integer; var TableRow, PrevCell,NextCell,
                         CellWidth, CellBorder, CellShading, RowSpan, ColSpan, CellFlags: Integer):
                         LongBool; far; stdcall;external 'ter32.dll';
function TerGetControlId(hWnd: THandle; PictId: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerRepaginate(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetReadOnly(hWnd : THandle): LongBool; far; stdcall;external 'ter32.dll';
function TerSetParaAuxId(hWnd : THandle; FirstLine, LastLine: LongInt; AuxId: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSavePict(hWnd : THandle; PictId: Integer; FileName: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerSetParaId(hWnd : THandle; FirstLine, LastLine: LongInt; ParaId: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerCreateCellId(hWnd: THandle; NewRow: LongBool; PrevCell,RowAlign,RowPos,RowMinHeight,
                         CellWidth,shading,LeftWidth,RightWidth,TopWidth,BotWidth,RowSpan,ColSpan,CellFlags
                         :Integer): Integer; far; stdcall;external 'ter32.dll';
function TerSetCharAuxId(hWnd : THandle; AuxId: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerInsertLine(hWnd : THandle; text: AnsiString; FontId, ParaId, CellId, ParaFID: Integer;
                    repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerDeleteCells(hWnd : THandle; SelectType: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerShrinkFontTable: LongBool; far; stdcall;external 'ter32.dll';
function TerSetPaperEx(hWnd : THandle; PaperSize,PaperWidth,PaperLength,PaperOrient: Integer; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerDeleteBlock(hWnd : THandle; repaint: LongBool):LongBool; far; stdcall;external 'ter32.dll';
function TerGetLine(hWnd : THandle; LineNo: LongInt; LineText: AnsiString; pLineFont: Pointer):
                     Integer; far; stdcall;external 'ter32.dll';
function TerSetLine(hWnd : THandle; LineNo: LongInt; LineText: AnsiString; var LineFont: Word):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerGetTextSel(hWnd: THandle; var BufSize: LongInt):  THandle; far; stdcall;external 'ter32.dll';
function TerTextPosToPix(hWnd: THandle; RelativeTo: Integer; LineNo: LongInt; ColNo: Integer;
                     var pX: Integer; var pY: Integer):  LongBool; far; stdcall;external 'ter32.dll';
function TerFileToMem(FileName: AnsiString; var FileSize: LongInt):  THandle; far; stdcall;external 'ter32.dll';
function TerSelectPrint(hWnd: THandle):  LongBool; far; stdcall;external 'ter32.dll';
function TerPosFrame(hWnd: THandle; FrameNo,pos: Integer; repaint: LongBool):  LongBool; far; stdcall;external 'ter32.dll';
function TerPosBodyText(hWnd: THandle; SectNo,pos: Integer; repaint: LongBool):  LongBool; far; stdcall;external 'ter32.dll';
function TerPixToTextPos(hWnd: THandle; RelativeTo: Integer; pX,pY: Integer;
                     var LineNo: LongInt; var ColNo: Integer):  LongBool; far; stdcall;external 'ter32.dll';
function TerSetNextFontAux1Id(hWnd: THandle; Aux1Id: Integer):  LongBool; far; stdcall;external 'ter32.dll';
function TerGetFontAux1Id(hWnd: THandle; FontId: Integer):  Integer; far; stdcall;external 'ter32.dll';
function TerSetPflags(hWnd : THandle; pflags: Integer; OnOff: LongBool; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerSetCharSet(hWnd : THandle; NewCharSet: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerCommand(hWnd : THandle; CmdId: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSetDefPrinter(PrtName,PrtDriver,PrtPort: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerInsertRtfFile(hWnd : THandle; FileName: AnsiString;LineNo: LongInt;ColNo: Integer;
                     Repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerNormalizeBlock(hWnd : THandle): LongBool; far; stdcall;external 'ter32.dll';
function TerSetSearchString(hWnd : THandle; SearchFor: AnsiString; CaseSensitive: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerPosPage(hWnd : THandle; NewPage: Integer):LongBool; far; stdcall;external 'ter32.dll';
function TerGetPagePos(hWnd : THandle; var PageNo: Integer; var PagePos: Integer):LongBool; far; stdcall;external 'ter32.dll';
function TerSetPagePos(hWnd : THandle; PageNo: Integer; PagePos: Integer):LongBool; far; stdcall;external 'ter32.dll';
function TerSetSectEx(hWnd: THandle; NumCols, ColSpace: Integer; StartPage: LongBool; FirstPageNo: Integer):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerGetHypertextEx(hWnd : THandle; HyperText: AnsiString; HyperCode: AnsiString; SelectText: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerGetPageOrientEx(hWnd: THandle; PageNo: Integer; var PageWidth: Integer; var PageHeight: Integer):
                    Integer; far; stdcall;external 'ter32.dll';
function TerHtmlCellWidthFlag(hWnd: THandle; selection,WidthFlag: Integer; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerSetNewFrameDim(hWnd: THandle; FrmX,FrmY,FrmWidth,FrmHeight: Integer; PageTop: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerSetBorderColor(hWnd: THandle; BorderColor: TColorRef): LongBool; far; stdcall;external 'ter32.dll';
function TerCellColor(hWnd: THandle; select: Integer; CellColor: TColorRef; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerInsertPictureFileXY(hWnd : THandle; FileName: AnsiString; embed: LongBool; align: Integer; insert: LongBool;
         PosX, PosY: Integer):Integer; far; stdcall;external 'ter32.dll';
function TerSetBulletEx(hWnd : THandle; SetReset,Bullet: LongBool; StartNbr,level,BltNbrType: Integer;
         repaint: LongBool):Integer; far; stdcall;external 'ter32.dll';
function TerGetBulletInfo(hWnd : THandle; IsType: Integer; ParamId: LongInt; var IsBullet: Integer;
         var NbrStart: Integer; var BltLevel: Integer; var BltSym: Integer; var flags: Integer)
         :Integer; far; stdcall;external 'ter32.dll';
function TerCreateBulletId(hWnd : THandle; IsBullet: LongBool; StartNbr,level,BltNbrType: Integer)
         :Integer; far; stdcall;external 'ter32.dll';
function TerSetBulletId(hWnd : THandle; BltId,ParaId: Integer) :Integer; far; stdcall;external 'ter32.dll';
function TerPictureFromJpg(hWnd : THandle; FileName: AnsiString; align: Integer; insert: LongBool):
                    Integer; far; stdcall;external 'ter32.dll';
function TerSetDefTextColor(hWnd : THandle; ForeColor: TColorRef; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetWrapWidth(hWnd : THandle; WidthChars,WidthTwips: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerOverrideStyles(TerStyles: LongInt): LongInt; far; stdcall;external 'ter32.dll';
function TerCreateWindowAlt(x,y,width,height: Integer; IsChild: LongBool; hParentWnd: THandle; TerStyles: LongInt):
                    THandle; far; stdcall;external 'ter32.dll';
function TerInsertLineObject(hWnd: THandle; x1,y1,x2,y2: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerCreateParaIdEx(hWnd : THandle; ReuseId: Integer; shared: LongBool; LeftIndent, RightIndent,
                         FirstIndent, TabId, StyleId,AuxId,shading, pflags, SpaceBefore, SpaceAfter,
                         SpaceBetween, flags, BltId: Integer; BkColor: TColorRef): Integer; far; stdcall;external 'ter32.dll';
function TerSetParaBkColor(hWnd: THandle; ShowDialog: LongBool; BkColor: TColorRef; repaint: LongBool):
                         LongBool; far; stdcall;external 'ter32.dll';
function TerIgnoreCommand(hWnd: THandle): LongBool; far; stdcall;external 'ter32.dll';
function TerFlushUndo(hWnd: THandle): LongBool; far; stdcall;external 'ter32.dll';
function TerSetWinBorder(hWnd: THandle; border: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerLineSelected(hWnd: THandle; LineNo: LongInt): LongBool; far; stdcall;external 'ter32.dll';
function TerCellVertAlign(hWnd: THandle; select,AlignType: Integer; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerSelectCol(hWnd: THandle; repaint: LongBool):LongBool; far; stdcall;external 'ter32.dll';
function TerDeleteHypertext(hWnd: THandle; LineNo: LongInt; ColNo: Integer; repaint: LongBool):LongBool; far; stdcall;external 'ter32.dll';
function TerGetCellBorderWidth(hWnd: THandle; CellId: Integer; var LeftWidth: Integer;
                    var RightWidth: Integer; var TopWidth: Integer; var BotWidth: Integer):LongBool; far; stdcall;external 'ter32.dll';
function TerSetAccelHandle(hWnd: THandle; hNewAcc: THandle):LongBool; far; stdcall;external 'ter32.dll';
function TerGetSectInfo(hWnd: THandle; var NumCols: Integer;var ColSpace: Integer; var StartPage: Integer;
                    var FirstPageNo: Integer):LongBool; far; stdcall;external 'ter32.dll';
function TerCreateTabId(hWnd: THandle; var TabInfo: StrTab): Integer; far; stdcall;external 'ter32.dll';
function TerSetFlags2(hWnd: THandle; SetFlags: LongBool; FlagValues: LongInt): LongInt; far; stdcall;external 'ter32.dll';
function TerCreateParaFrameId(hWnd: THandle; FrmX: Integer; FrmY: Integer; FrmWidth: Integer;
                    FrmHeight: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerSetTag(hWnd: THandle; LineNo: LongInt; ColNo: Integer; TagName,AuxText: AnsiString; AuxInt: LongInt; flags: Integer):
                    Integer; far; stdcall;external 'ter32.dll';
function TerPosTag(hWnd: THandle; TagId: Integer; TagName: AnsiString; SearchScope: Integer; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerPrintEx(hWnd : THandle; dialog: LongBool; FirstPage,LastPage: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerGetDrawObjectInfo(hWnd : THandle; FrameId: Integer; var width,height,LineWidth: Integer;
                    var LineColor,FillColor: TColorRef; var flags: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerGetDispPageNo(hWnd : THandle; PageNo: Integer) : Integer; far; stdcall;external 'ter32.dll';
function TerIsPrinting(hWnd : THandle) : LongBool; far; stdcall;external 'ter32.dll';
function TerInsertOleObject(hWnd : THandle; ProgName: AnsiString) : Integer; far; stdcall;external 'ter32.dll';
function TerAdjustHtmlTable(hWnd : THandle) : LongBool; far; stdcall;external 'ter32.dll';
function TerXlateControlId(hWnd: THandle; CtlId: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerGetBufferDC(hWnd: THandle): THandle; far; stdcall;external 'ter32.dll';
function TerGetCaretPos(hWnd: THandle): LongInt; far; stdcall;external 'ter32.dll';
function TerGetHypertext2(hWnd : THandle; LineNo: LongInt; ColNo: Integer; HyperText: AnsiString; HyperCode: AnsiString;
                    SelectText: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetMarginEx(hWnd : THandle; sect,LeftMarg,RightMarg,TopMarg,BotMarg,HeaderY,FooterY: Integer;
                    repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerRowPositionEx(hWnd: THandle; JustFlag,indent: Integer; AllRows,repaint: LongBool):Integer; far; stdcall;external 'ter32.dll';
function TerMovePictFrame(hWnd: THandle; PictId,FrmX,FrmY: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerGetMarginEx(hWnd : THandle; sect: Integer; var LeftMarg,RightMarg,TopMarg,BotMarg,HeaderY,FooterY: Integer):
                    Integer; far; stdcall;external 'ter32.dll';
function TerGetTag(hWnd: THandle; LineNo: LongInt; ColNo: Integer; TagName,AuxText: AnsiString; var AuxInt: LongInt;
                    var flags: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerGetNextTagId(hWnd: THandle; TagId: LongInt): Integer; far; stdcall;external 'ter32.dll';
function TerSetObjectAttribEx(hWnd: THandle; ObjectId,LineType,LineThickness: Integer; LineColor: TColorRef;
                    FillSolid: LongBool; FillColor: TColorRef; ZOrder: Integer):LongBool; far; stdcall;external 'ter32.dll';
function TerGetSeqSect(hWnd: THandle; SectId: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerSplitMbcs(text,tail,lead: AnsiString): LongInt; far; stdcall;external 'ter32.dll';
function TerMakeMbcs(text,tail,lead: AnsiString; count: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerGetLineEx(hWnd : THandle; LineNo: LongInt; LineText,LineLead: AnsiString; var LineFont: Word):
                     Integer; far; stdcall;external 'ter32.dll';
function TerSetLineEx(hWnd : THandle; LineNo: LongInt; LineText,LineLead: AnsiString; var LineFont: Word):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerRegisterPrintCallback(PrintCallback: Pointer): LongBool; far; stdcall;external 'ter32.dll';
function TerMbcsLen(text: AnsiString): LongInt; far; stdcall;external 'ter32.dll';
function TerMbcsChar(text: AnsiString; pos: LongInt): Word; far; stdcall;external 'ter32.dll';
function TerInsertBookmark(hWnd: THandle; line: LongInt; col: Integer; name: AnsiString): Integer; far; stdcall;external 'ter32.dll';
function TerDeleteBookmark(hWnd: THandle; name: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerPosBookmark(hWnd: THandle; name: AnsiString; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetBookmark(hWnd: THandle; BkmNo: Integer; name: AnsiString): Integer; far; stdcall;external 'ter32.dll';
function TerCreateFirstHdrFtr(hWnd: THandle; HdrFtr: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerDeleteFirstHdrFtr(hWnd: THandle; HdrFtr,msg: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerPosHdrFtrEx(hWnd : THandle; sect,HdrFtr,pos: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetRtfDocInfo(hWnd : THandle; InfoType: Integer; InfoString: AnsiString): Integer; far; stdcall;external 'ter32.dll';
function TerSetRtfDocInfo(hWnd : THandle; InfoType: Integer; InfoString: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerPictureFromEmf(hWnd : THandle; FileName: AnsiString; align: Integer; insert: LongBool):
                    Integer; far; stdcall;external 'ter32.dll';
function TerInsertField(hWnd : THandle; FldName, FldData: AnsiString; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerInsertFieldU(hWnd : THandle; FldName: AnsiString; FldData: WideString; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetField(hWnd : THandle; LineNo: LongInt; ColNo,FldType: Integer; FldText: AnsiString): LongInt; far; stdcall;external 'ter32.dll';
function TerLocateField(hWnd : THandle; loc: Integer; FldName: AnsiString; exact,repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerPrint2(hWnd : THandle; dialog: LongBool; FirstPage,LastPage,copies: Integer; colate: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerChangeField(hWnd : THandle; FldName,FldData: AnsiString; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerChangeFieldU(hWnd : THandle; FldName,FldData: WideString; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerDeleteField(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetTextCase(hWnd : THandle; CaseType,repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetCharSpace(hWnd : THandle; dialog: LongBool; adjust: Integer; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerSetFontSpace(hWnd : THandle; FontId,adjust: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetFontSpace(hWnd : THandle; FontId: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerScrToTwipsX(hWnd : THandle; ScrUnit: Integer; var TwipsUnit: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerScrToTwipsY(hWnd : THandle; ScrUnit: Integer; var TwipsUnit: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerOverridePageSize(PgWidth,PgHeight: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerGetWordCount(hWnd : THandle; flags: Integer): LongInt; far; stdcall;external 'ter32.dll';
function TerPageFromLine(hWnd : THandle; LineNo: LongInt): Integer; far; stdcall;external 'ter32.dll';
function TerSetFontStyleId(hWnd : THandle; FontNo, CharStyId, ParaStyId: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerClosePrinter : LongBool; far; stdcall;external 'ter32.dll';
function TerCreateFont2(hWnd : THandle; ReuseId: Integer; shared: LongBool; typeface: AnsiString;
                       PointSize, styles: Integer; TextColor, BkColor: LongInt;
                       FieldId,AuxId,CharStyId,ParaStyId,expand: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerSetHdrRow(hWnd : THandle; CurCell: Integer; SetReset,repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetInitTypeface(InitTypeface : AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerDocName(hWnd : THandle; GetSet: LongBool; DocName: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerSetRowKeep(hWnd : THandle; CurCell: Integer; SetReset,repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetFontFieldId(hWnd : THandle; FontId: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerSetSect2(hWnd: THandle; NumCols, ColSpace: Integer; StartPage: LongBool; FirstPageNo,FirstBin,NextBin: Integer):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerGetCharDim(hWnd : THandle; FontId,CharVal: Integer; var pWidth, pHeight: Integer; ForScreen: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerGetDeviceRes(hWnd : THandle; var pResX, pResY: Integer; ForScreen: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetTextAreaSize(hWnd : THandle; AreaWidth, AreaHeight: Integer): LongBool; far; stdcall;external 'ter32.dll';
function GetFontInfo2(hWnd : THandle; FontId: Integer; FontTypeFace: AnsiString; var FontTwipsSize: Integer;
                     var FontStyles: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSetFlags3(hWnd: THandle; SetFlags: LongBool; FlagValues: LongInt): LongInt; far; stdcall;external 'ter32.dll';
function TerGetTagEx(hWnd: THandle; LineNo: LongInt; ColNo, TagType: Integer; TagName,AuxText: AnsiString; var AuxInt: LongInt;
                    var flags: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerPosTagEx(hWnd: THandle; TagType,TagId: Integer; TagName: AnsiString; SearchScope: Integer; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerGetTablePos(hWnd: THandle; var TableNo,RowNo,ColNo:Integer):LongBool; far; stdcall;external 'ter32.dll';
function TerAnd(val1,val2: Integer):Integer; far; stdcall;external 'ter32.dll';
function TerOr(val1,val2: Integer):Integer; far; stdcall;external 'ter32.dll';
function TerCommand2(hWnd : THandle; CmdId: Integer; send: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerIsModified(hWnd : THandle): LongBool; far; stdcall;external 'ter32.dll';
function TerSpellCheck(hWnd : THandle; StopAfterFirst,msg: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSpellCheck2(hWnd : THandle; StopAfterFirst,msg: LongBool; var pCancelled: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetPageBorderDim(hWnd : THandle; var pWidth,pHeight: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerInsertTextInputField(hWnd : THandle; FldName,FldData: AnsiString; MaxLen: Integer; ShowBorder: LongBool;
                    typeface: AnsiString; TwipsSize,style: Integer; TextColor: TColorRef; insert,repaint: LongBool):
                    Integer; far; stdcall;external 'ter32.dll';
function TerInsertCheckBoxField(hWnd : THandle; FldName: AnsiString; TwipsSize: Integer; checked: LongBool;
                    insert,repaint: LongBool): Integer; far; stdcall;external 'ter32.dll';
function TerGetParaInfo2(hWnd : THandle; LineNo: LongInt; var LeftIndent, RightIndent,
                         FirstIndent, TabId, StyleId, AuxId, shading, pflags,
                         SpaceBefore, SpaceAfter, SpaceBetween, flags: Integer;
                         var Aux1Id: LongInt; var BkColor: TColorRef):
                         LongBool; far; stdcall;external 'ter32.dll';
function TerDeleteStyle(hWnd : THandle; StyleId: Integer; StyleName: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerSetDefDir(hWnd : THandle; DefDir: AnsiString; DefFileType: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSetCharLang(hWnd : THandle; LangId: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetFontLang(hWnd : THandle; FontId: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerSetFocus(hWnd : THandle): LongBool; far; stdcall;external 'ter32.dll';
function TerGetStyleId(hWnd : THandle; StyleName: AnsiString): Integer; far; stdcall;external 'ter32.dll';
function TerLocateFontId(hWnd : THandle; FontId: Integer; var LineNo: LongInt; var col: Integer)
                          : LongBool; far; stdcall;external 'ter32.dll';
function TerSetBullet2(hWnd : THandle; SetReset,Bullet: LongBool; StartNbr,level,BltNbrType: Integer;
                          TextBef, TextAft: AnsiString; repaint: LongBool):Integer; far; stdcall;external 'ter32.dll';
function TerCreateBullet2(hWnd : THandle; IsBullet: LongBool; StartNbr,level,BltNbrType: Integer; 
                          TextBef,TextAft: AnsiString) :Integer; far; stdcall;external 'ter32.dll';
function TerLocateInputField(hWnd : THandle; location: Integer; repaint: LongBool): Integer; far; stdcall;external 'ter32.dll';
function TerGetInputFieldInfo(hWnd : THandle; ObjId: Integer; FldName: AnsiString; var FldType, HasBorder: Integer): 
                          LongBool; far; stdcall;external 'ter32.dll';
function TerGetCheckboxInfo(hWnd : THandle; ObjId: Integer; var checked: Integer): 
                          LongBool; far; stdcall;external 'ter32.dll';
function TerGetTextFieldInfo(hWnd : THandle; ObjId: Integer; TextData: AnsiString; var MaxChars, BoxWidth: Integer;
                          typeface: AnsiString; var TwipsSize, style: Integer): 
                          LongBool; far; stdcall;external 'ter32.dll';
function TerSetCheckboxInfo(hWnd : THandle; ObjId: Integer; checked: Integer): 
                          LongBool; far; stdcall;external 'ter32.dll';
function TerSetInputFieldInfo(hWnd : THandle; ObjId: Integer; FldName: AnsiString; HasBorder: Integer): 
                          LongBool; far; stdcall;external 'ter32.dll';
function TerSetTextFieldInfo(hWnd : THandle; ObjId: Integer; TextData: AnsiString; MaxChars, BoxWidth: Integer;
                          typeface: AnsiString; TwipsSize, style: Integer): 
                          LongBool; far; stdcall;external 'ter32.dll';
function TerGetSelection(hWnd : THandle; var BegLine: LongInt; var BegCol: Integer; var EndLine: LongInt;
                     var EndCol: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerInsertDateTime(hWnd : THandle; DateFmt: AnsiString; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerInsertToc(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetStyleInfo(hWnd : THandle; StyleId: Integer; StyleName: AnsiString; var StyleType: Integer): 
                          Integer; far; stdcall;external 'ter32.dll';
function TerSelectRow(hWnd: THandle; repaint: LongBool):LongBool; far; stdcall;external 'ter32.dll';
function TerInsertOleFile(hWnd: THandle; FileName:AnsiString; embed,icon: LongBool; LineNo: LongInt; col: LongBool):
                          Integer; far; stdcall;external 'ter32.dll';
function TerGetVisibleCol(hWnd: THandle; LineNo: LongInt; col: LongBool):Integer; far; stdcall;external 'ter32.dll';
function TerSetFlags4(hWnd: THandle; SetFlags: LongBool; FlagValues: LongInt): LongInt; far; stdcall;external 'ter32.dll';
function TerGetPageOrient2(hWnd: THandle; PageNo: Integer; var PageWidth: Integer; var PageHeight: Integer;
                          var HiddenX: Integer; var HiddenY: Integer): Integer; far; stdcall;external 'ter32.dll';

function TerMergePrintRep2(hDC: THandle; FileName: AnsiString; hBuf: THandle; BufLen: LongInt; PrintRect: TRect;
                     MergeFields: AnsiString; MergeData: AnsiString; StartPos: LongInt; var NextY: Integer; 
                     hAttribDC: THandle): LongInt; far; stdcall;external 'ter32.dll';
function TerDeleteHdrFtr(hWnd: THandle; HdrFtr: Integer; msg: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetTableLevel(hWnd: THandle; LineNo: LongInt): Integer; far; stdcall;external 'ter32.dll';
function TerGetRowInfo(hWnd: THandle; RowId: Integer; var height, MinHeight, FixWidth, PrevRow, NextRow,
                     indent, flags, border, CurWidth: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerSetCaretPos(hWnd: THandle; CaretPos: LongInt): LongBool; far; stdcall;external 'ter32.dll';
function TerUpdateToolbar(hWnd: THandle): LongBool; far; stdcall;external 'ter32.dll';
function TerPosAfterTable(hWnd : THandle; OuterMost,repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetParaInfo3(hWnd : THandle; LineNo: LongInt; IsStyleItem: LongBool;
                         var LeftIndent, RightIndent,
                         FirstIndent, TabId, StyleId, AuxId, shading, pflags,
                         SpaceBefore, SpaceAfter, SpaceBetween, flags: Integer;
                         var Aux1Id: LongInt; var BkColor: TColorRef):
                         LongBool; far; stdcall;external 'ter32.dll';
function TerSetParaSpacing2(hWnd : THandle; SpaceBefore, SpaceAfter, SpaceBetween, LineSpacing: Integer; 
                     repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerQueryExit(hWnd : THandle): LongBool; far; stdcall;external 'ter32.dll';
function TerInsertFootnote2(hWnd : THandle; FootnoteMarker: AnsiString; FootnoteText: AnsiString;
                    FootnoteStyle: Integer; IsFootnote,repaint: LongBool): Integer; far; stdcall;external 'ter32.dll';

function TerEditList(hWnd : THandle; NewList: LongBool; ListId: Integer;
                    PropDialog: Integer; ListName: AnsiString; nested: LongBool; flags: LongInt): 
                    Integer; far; stdcall;external 'ter32.dll';
function TerEditListOr(hWnd : THandle; NewListOr: LongBool; ListOrId: Integer;
                    PropDialog: Integer; ListId: Integer; OverrideLevels: LongBool; flags: Integer): 
                    Integer; far; stdcall;external 'ter32.dll';
function TerEditListLevel(hWnd : THandle; IsList: LongBool; ListId,level,StartAt,NumType,CharAft: Integer;
                    ListText: AnsiString; FontId: Integer; flags: LongInt): LongBool; far; stdcall;external 'ter32.dll';

function TerSetParaList(hWnd : THandle; dialog: LongBool; ParaId,ListOr,level: Integer;
                    repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerCreateListBulletId(hWnd : THandle; ListOr,level: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerSetStatusColor(hWnd: THandle; StatusColor,StatusBkColor: TColorRef): LongBool; far; stdcall;external 'ter32.dll';
function TerMenuEnable2(hWnd : THandle; EnableFlag: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerMenuSelect2(hWnd : THandle; SelectFlag: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSetCellInfo2(hWnd : THandle; CellId: Integer; BackColor: TColorRef; margin,ParentCell: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerEditTooltip(hWnd : THandle; TlbId: Integer; tooltip: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerGetBulletInfo2(hWnd : THandle; IsType: Integer; ParamId: LongInt; var IsBullet: Integer;
         var NbrStart: Integer; var BltLevel: Integer; var BltSym: Integer; 
         var ListOr: Integer; var flags: Integer)
         :Integer; far; stdcall;external 'ter32.dll';
function TerSetParaIndent(hWnd : THandle; IndentLeft: Integer; IndentRight: Integer; IndentFirst: Integer;
                     repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';

function TerGetListInfo(hWnd : THandle; ListId: Integer;
                    ListName: AnsiString; var LevelCount: Integer; var flags: LongInt): 
                    LongBool; far; stdcall;external 'ter32.dll';
function TerGetListOrInfo(hWnd : THandle; ListOrId: Integer;
                    var ListId: Integer; var LevelCount: Integer; var flags: Integer): 
                    LongBool; far; stdcall;external 'ter32.dll';
function TerGetListLevelInfo(hWnd : THandle; IsList: LongBool; ListId,level: Integer; 
                    var StartAt,NumType,CharAft: Integer;
                    ListText: AnsiString; var FontId: Integer; var flags: Integer): LongBool; far; stdcall;external 'ter32.dll';

function TerDeleteObject(hWnd : THandle; PictId: Integer): LongBool; far; stdcall;external 'ter32.dll';

function TerGetListInfo2(hWnd : THandle; ListId: Integer;
                    ListName: AnsiString; var LevelCount: Integer; var flags, RtfId, TmplId: LongInt):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerSpellCheckerPopped(hWnd : THandle): LongBool; far; stdcall;external 'ter32.dll';
function TerEngageCaret(hWnd : THandle; AtCursorLoc: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerCellBorderColor(hWnd: THandle; select,TopColor,BotColor,LeftColor,RightColor: TColorRef; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerGetCellBorderColor(hWnd: THandle; CellId: Integer; var LeftColor: TColorRef;
                    var RightColor: TColorRef; var TopColor: TColorRef; var BotColor: TColorRef):LongBool; far; stdcall;external 'ter32.dll';
function TerGetParaInfo4(hWnd : THandle; LineNo: LongInt; IsStyleItem: LongBool;
                         var LeftIndent, RightIndent,
                         FirstIndent, TabId, StyleId, AuxId, shading, pflags,
                         SpaceBefore, SpaceAfter, SpaceBetween, flags: Integer;
                         var Aux1Id: LongInt; var BkColor: TColorRef; var LineSpacing: Integer):
                         LongBool; far; stdcall;external 'ter32.dll';
function TerRecreateToolbar(hWnd : THandle; show: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerHideToolbarIcon(id: Integer; hide: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetPictOffset(hWnd : THandle; PictId,offset: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetPictOffset(hWnd : THandle; PictId: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerUpdateHyperlinkText(hWnd : THandle; NewText: AnsiString; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerUpdateHyperlinkCode(hWnd : THandle; NewCode: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerInsertHyperlink(hWnd : THandle; LinkText,LinkCode: AnsiString; PictId: Integer; repaint: LongBool): Integer; far; stdcall;external 'ter32.dll';
function TerFindHlinkField(hWnd : THandle; CodeString1,CodeString2: AnsiString; var pLine: LongInt; var pCol: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerGetPageCount(hWnd : THandle; var TotalPages: Integer; var CurPage: Integer):LongBool; far; stdcall;external 'ter32.dll';
function TerLocateFieldChar(hWnd : THandle; FieldId: Integer; FieldCode: AnsiString; present: LongBool; var StartLine :LongInt;
                     var StartCol: Integer; forward: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerPosTable2(hWnd : THandle; TableNo,RowNo,ColNo,pos,ParentCell: Integer; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerGetTablePos2(hWnd: THandle; var TableNo,RowNo,ColNo:Integer; ParentCell: Integer):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerSetSectBorder(hWnd : THandle; SectId, BorderType, width, space: Integer; BorderColor: TColorRef; 
                     repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetSectPageSize(hWnd : THandle; SectId, PageSize, PageWidth, PageHeight: Integer;  
                     repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerCellWidth(hWnd: THandle; select,width,margin: Integer; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';

function TerPosTable3(hWnd : THandle; TableId,RowNo,ColNo,pos: Integer; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerGetTableId(hWnd : THandle; row: Integer): LongInt; far; stdcall;external 'ter32.dll';
function TerSetTableId(hWnd : THandle; row,id: Integer): LongBOOL; far; stdcall;external 'ter32.dll';
function TerCreateOcxObject2(hWnd : THandle; ProtId: AnsiString; width,height: Integer): LongBOOL; far; stdcall;external 'ter32.dll';
function TerSetOcxIntProp(hWnd : THandle; obj: Integer; PropName: AnsiString; value: Integer): LongBOOL; far; stdcall;external 'ter32.dll';
function TerSetOcxTextProp(hWnd : THandle; obj: Integer; PropName: AnsiString; text: AnsiString): LongBOOL; far; stdcall;external 'ter32.dll';

function TerRotateFrameText(hWnd : THandle; dialog: LongBool; LineNo: LongInt; direction: Integer; repaint: LongBool): 
                            LongBool; far; stdcall;external 'ter32.dll';
function TerSearchReplaceU(hWnd : THandle; var SearchText: Word; var ReplaceText: Word; flags: Integer;
                    StartPos: LongInt; var EndPos: LongInt; var BufSize: LongInt): LongBool; far; stdcall;external 'ter32.dll';
function TerSetPictFrame2(hWnd : THandle; pict,FrameType,x,y: Integer; repaint: LongBool): Integer; far; stdcall;external 'ter32.dll';
function TerGetParam(hWnd : THandle; ParamType: Integer): LongInt; far; stdcall;external 'ter32.dll';
function TerGetOlePtr(hWnd : THandle; obj,InfoType: Integer): LongInt; far; stdcall;external 'ter32.dll';
function TerSetFrameMarginDist(hWnd : THandle; distance: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSetUndoRef(hWnd : THandle; UndoRef: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerLparam2String (LongPtr: LongInt; TextPtr: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerString2Lparam (TextPtr: AnsiString; LongPtr: LongInt): LongBool; far; stdcall;external 'ter32.dll';
function TerGetTabStop2(hWnd: THandle; IdType, LineNo: LongInt; TabNo: Integer; var TabPos: Integer;
                    var TabType: Integer; var TabFlags: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerSearchReplace2(hWnd : THandle; SearchText: AnsiString; ReplaceText: AnsiString; flags: Integer;
                    StartPos: LongInt; EndPos: LongInt): LongInt; far; stdcall;external 'ter32.dll';
function TerSetParaTextFlow(hWnd : THandle; dialog: LongBool; TextFlow: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetSectTextFlow(hWnd : THandle; sect,TextFlow: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetRowTextFlow(hWnd : THandle; dialog,AllRows: LongBool; TextFlow: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetDocTextFlow(hWnd : THandle; dialog: LongBool; TextFlow: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetWaveUnderline(hWnd : THandle; LineNo: LongInt; StartCol, EndCol: Integer; SetReset: LongBool; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerApplyHyperlink(hWnd : THandle; LinkCode: AnsiString; repaint: LongBool): Integer; far; stdcall;external 'ter32.dll';
function TerPdfStart(OutFile: AnsiString; var PdfId: LongInt; LicName,LicKey: AnsiString;
                    LicNbr: LongInt; author,producer,title,subject,keywords,date,ModDate: AnsiString): 
                    LongInt; far; stdcall;external 'ter32.dll';
function TerPdfEnd(hInstance,PdfId: LongInt) : LongBool; far; stdcall;external 'ter32.dll';
function TerPdfPrintPage(hWnd : THandle; PdfId,PageNo: LongInt): Integer; far; stdcall;external 'ter32.dll';
function TerSetBullet3(hWnd : THandle; SetReset,Bullet: LongBool; StartNbr,level,BltNbrType: Integer;
                          TextBef, TextAft: AnsiString; flags: LongInt; repaint: LongBool):Integer; far; stdcall;external 'ter32.dll';
function TerCreateBulletId3(hWnd : THandle; IsBullet: LongBool; StartNbr,level,BltNbrType: Integer; 
                          TextBef,TextAft: AnsiString; flags: LongInt) :Integer; far; stdcall;external 'ter32.dll';
function TerPictAltInfo(hWnd : THandle; PictId: Integer; GetAlt: LongBool; AltInfo: AnsiString):
                         LongBool; far; stdcall;external 'ter32.dll';
function TerSetPictCropping(hWnd : THandle; PictId: Integer; CropLeft,CropTop,CropRight,CropBot: LongInt; repaint: LongBool):
                         LongBool; far; stdcall;external 'ter32.dll';
function TerGetPictCropping(hWnd : THandle; PictId: Integer; CropType: integer):
                         integer; far; stdcall;external 'ter32.dll';
function TerSetMaxUndo(hWnd : THandle; MaxUndo: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerSelectCellText(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerPdfSetDllName(DllName: AnsiString) : LongBool; far; stdcall;external 'ter32.dll';
function TerSetParamRect(hWnd : THandle; RectLeft,RectRight,CropTop,CropBot: LongInt):
                         LongBool; far; stdcall;external 'ter32.dll';
function TerSetFlags5(hWnd: THandle; SetFlags: LongBool; FlagValues: LongInt): LongInt; far; stdcall;external 'ter32.dll';
function TerGetCellInfo2(hWnd : THandle; CellId: Integer; var BackColor: TColorRef; var margin: Integer):
                         LongBool; far; stdcall;external 'ter32.dll';
function TerPickBknd(hWnd: THandle): LongBool; far; stdcall;external 'ter32.dll';
function TerIsTableSelected(hWnd: THandle): LongBool; far; stdcall;external 'ter32.dll';
function TerCreateFont3(hWnd : THandle; ReuseId: Integer; shared: LongBool; typeface: AnsiString;
                       PointSize, styles: Integer; TextColor, BkColor: LongInt;
                       FieldId,AuxId,CharStyId,ParaStyId,expand,CharSet: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerSetCtlColor(hWnd : THandle; BkColor: TColorRef; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerInsertTextU(hWnd : THandle; text: PWideChar; FontId, ParaId: Integer; repaint: LongBool) :
                      LongBool; far; stdcall;external 'ter32.dll';
function TerGetFontParam(hWnd: THandle; FontId,ParamType: Integer): LongInt; far; stdcall;external 'ter32.dll';
function TerPdfStart2(OutFile: AnsiString; var PdfId: LongInt; LicName,LicKey: AnsiString;
                    LicNbr: LongInt; author,producer,title,subject,keywords,date,ModDate: AnsiString; EnhOptions: LongInt): 
                    LongInt; far; stdcall;external 'ter32.dll';
function TerSelectTable(hWnd : THandle; level: LongInt; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetSect3(hWnd: THandle; NumCols, ColSpace: Integer; StartPage: LongBool; FirstPageNo,FirstBin,NextBin,SectId: Integer):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerGetOverrideBin(hWnd : THandle; var StartCopy, bin: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSetOverrideBin(hWnd : THandle; dialog: LongBool; StartCopy, bin: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSetDefLang(hWnd : THandle; lang: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerGetRowCellCount(hWnd: THandle; GetRowCount: LongBool):Integer; far; stdcall;external 'ter32.dll';
function TerGetTextSelU(hWnd: THandle; var BufSize: LongInt):  THandle; far; stdcall;external 'ter32.dll';
function HandleToIntArray(var WordArray: Word; BufLen: Integer; hMem: LongInt): Integer; far; stdcall;external 'ter32.dll';
function TerGetPrinter(hWnd : THandle; PrtName, PrtDriver, PrtPort: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerGetHdrFtrPos(hWnd : THandle; line: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerHdrFtrExists(hWnd : THandle; SectId: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerDeleteCellText(hWnd : THandle; select: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetPageNumFmt(hWnd : THandle; SectId,fmt: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerGetPageNumFmt(hWnd : THandle; SectId: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerSetUlineColor(hWnd : THandle; dialog: LongBool; UlineColor: TColorRef; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerAddToolbarIcon(hWnd : THandle; LineNo,id,CmdId: Integer; BmpFile,pBalloon: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerSetListBullet(hWnd : THandle; SetList: LongBool; NumType, level, start: Integer; TextBef,TextAft: AnsiString; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetListLevel(hWnd : THandle; level,increment: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetListBullet2(hWnd : THandle; SetList: LongBool; NumType, level, start: Integer; TextBef,TextAft,ListText: AnsiString; repaint: LongBool): 
                    LongBool; far; stdcall;external 'ter32.dll';
function TerGetBulletInfo3(hWnd : THandle; IsType: Integer; ParamId: LongInt; var IsBullet: Integer;
         var NbrStart: Integer; var BltLevel: Integer; var BltSym: Integer; 
         var ListOr: Integer; var flags: Integer; ListText: AnsiString)
         :Integer; far; stdcall;external 'ter32.dll';
function TerGetTextHeight(hWnd : THandle): LongInt; far; stdcall;external 'ter32.dll';
function TerGetSectBins(hWnd : THandle; sect: Integer; var FirstPageBin,NextPageBin: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerGetLineWidth(hWnd : THandle; LineNo: LongInt): Integer; far; stdcall;external 'ter32.dll';
function TerGetParaParam(hWnd : THandle; LineNo: LongInt; IsStyleItem: LongBool; InfoType: Integer):
                         Integer; far; stdcall;external 'ter32.dll';
function TerSetLinkPictDir(hWnd : THandle; PictDir: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerSetDefTabType(hWnd : THandle; DefTab: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerCellBorder2(hWnd: THandle; select,TopWidth,BotWidth,LeftWidth,RightWidth: Integer; outline,repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerSetFlags6(hWnd: THandle; SetFlags: LongBool; FlagValues: LongInt): LongInt; far; stdcall;external 'ter32.dll';
function TerSetStyleParam(hWnd: THandle; id,ParamType,IntParam: LongInt; TextParm: AnsiString; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerCancelEditStyle(hWnd: THandle): LongBool; far; stdcall;external 'ter32.dll';
function TerSetObjectWrapStyle(hWnd: THandle; FrameId,WrapStyle: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerGetStyleParam(hWnd: THandle; id,ParamType: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerGetFrameParam(hWnd: THandle; id,ParamType: Integer): Integer; far; stdcall;external 'ter32.dll';
function TerSetWatermarkPict(hWnd: THandle; PictId: Integer; wash,repaint: LongBool):LongBool; far; stdcall;external 'ter32.dll';
function TerInsertPageRef(hWnd: THandle; bookmark: AnsiString; IsHyperlink,IsAlphabetic,repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerCellRotateText(hWnd: THandle; select,direction: LongInt; repaint: LongBool):LongBool; far; stdcall;external 'ter32.dll';
function TerSetParaBorderColor(hWnd : THandle; BorderColor: TColorRef; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerSetCustomMessage(id: LongInt; MessageText: AnsiString):LongBool; far; stdcall;external 'ter32.dll';
function TerSetLinkDblClick(hWnd : THandle; DblClick: LongBool):LongBool; far; stdcall;external 'ter32.dll';
function TerGetCellParam(hWnd: THandle; ParamType,id: Integer; var ParamValue: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSetStCharSet(hWnd : THandle; NewCharSet: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerGetLineU(hWnd : THandle; LineNo: LongInt; var LineText: Word; var LineFont: Word):
                     Integer; far; stdcall;external 'ter32.dll';
function TerPdcStart(LicKey: AnsiString; OutFile: AnsiString; author,producer,title,subject,keywords,date,ModDate: AnsiString; flags: LongInt): 
                    LongInt; far; stdcall;external 'ter32.dll';
function TerPdcEnd(PdfId: LongInt) : LongBool; far; stdcall;external 'ter32.dll';
function TerPdcPrintPage(hWnd : THandle; PdfId,PageNo: LongInt): Integer; far; stdcall;external 'ter32.dll';
function TerSetLicenseKey(key: AnsiString): Integer; far; stdcall;external 'ter32.dll';
function TerPdcStart2(LicKey: AnsiString; OutFile: AnsiString; author,producer,title,subject,keywords,date,ModDate: AnsiString; flags,PermFlags: LongInt;
                     OwnerPass,UserPass: AnsiString): LongInt; far; stdcall;external 'ter32.dll';
function TerSetFrameTextDist(hWnd : THandle; ParaFID,distance: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSetSectLineNbr(hWnd : THandle; sect: Integer; SetReset,repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerAddAutoCompWord(hWnd : THandle; ACWord,ACPhrase: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerEnableTracking(hWnd : THandle; enable: LongBool; UserName: AnsiString; UseDefaultClrStyle: LongBool; InsStyle: LongInt; InsColor: TColor; DelStyle: LongInt; DelColor: TColor): LongBool; far; stdcall;external 'ter32.dll';
function TerFindNextChange(hWnd : THandle; next,repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerAcceptChanges(hWnd : THandle; all,DisplayMsg,repaint: LongBool): LongInt; far; stdcall;external 'ter32.dll';
function TerGetLineParam(hWnd: THandle; LineNo,ParamType: Integer): LongInt; far; stdcall;external 'ter32.dll';
function TerGetSectParam(hWnd: THandle; SectId,ParamType: Integer): LongInt; far; stdcall;external 'ter32.dll';
function TerSetSectLineNbr2(hWnd : THandle; sect: Integer; SetReset:LongBool; LineStep: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetMenuItemDesc(hWnd : THandle; cmd: Integer; desc: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerSetFlags7(hWnd: THandle; SetFlags: LongBool; FlagValues: LongInt): LongInt; far; stdcall;external 'ter32.dll';
function TerEnableDashes(hWnd: THandle; DllName: AnsiString; lang, level: LongInt; enable: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetToolbarComboWidth(hWnd : THandle; id,width: Integer; recreate:LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerRejectChanges(hWnd : THandle; all,DisplayMsg,repaint: LongBool): LongInt; far; stdcall;external 'ter32.dll';
function TerSetCharScaleX(hWnd : THandle; dialog: LongBool; ScalePct: Integer; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerGetReviewerInfo(hWnd : THandle; RevId: Integer; RevName:AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerInsertHyperlinkU(hWnd : THandle; LinkText: pWideChar; LinkCode: AnsiString; repaint: LongBool): Integer; far; stdcall;external 'ter32.dll';
function TerUpdateHyperlinkTextU(hWnd : THandle; NewText: pWideChar; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetHypertextU(hWnd : THandle; LineNo: LongInt; ColNo: Integer; HyperText: pWideChar; HyperCode: AnsiString;
                    SelectText: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetInputFieldId(hWnd : THandle; FieldName: AnsiString): LongInt; far; stdcall;external 'ter32.dll';
function TerSelectFrameText(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSelectParaText(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetEffectiveFont(hWnd : THandle; FontId: LongInt): LongBool; far; stdcall;external 'ter32.dll';
function TerCreateLeftRightHdrFtr(hWnd: THandle; HdrFtr: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetCellParam(hWnd: THandle; select,ParamType,ParamValue:Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetPageParam(hWnd: THandle; PageNo,ParamType: Integer): LongInt; far; stdcall;external 'ter32.dll';
function TerSetCharFlow(hWnd : THandle; flow: Integer; repaint: LongBool):
                    LongBool; far; stdcall;external 'ter32.dll';
function TerSetWaveUnderline2(hWnd : THandle; UlineColor: TColorRef; LineNo: LongInt; StartCol, EndCol: Integer; SetReset: LongBool; repaint: LongBool):
                     LongBool; far; stdcall;external 'ter32.dll';
function TerMarkCells(hWnd: THandle; select:Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerEnableScrollBar(hWnd: THandle; HScrollBar, enable:LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetRefParamStr(hWnd : THandle; ParamNum: Integer; ParamVal: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerSetSectParam(hWnd: THandle; sect,ParamType,ParamValue:Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerReformatTable(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetFlags8(hWnd: THandle; SetFlags: LongBool; FlagValues: LongInt): LongInt; far; stdcall;external 'ter32.dll';
function TerEditStyleU(hWnd: THandle; StartStyle: LongBool; StyleName: pWideChar; NewStyle: LongBool;
                    StyleType: Integer; repaint: LongBool): Integer; far; stdcall;external 'ter32.dll';
function TerSetStyleParamU(hWnd: THandle; id,ParamType,IntParam: LongInt; TextParm: pWideChar; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetStyleInfoU(hWnd : THandle; StyleId: Integer; StyleName: pWideChar; var StyleType: Integer): 
                          Integer; far; stdcall;external 'ter32.dll';
function TerGetStyleIdU(hWnd : THandle; StyleName: pWideChar): Integer; far; stdcall;external 'ter32.dll';
function TerDeleteStyleU(hWnd : THandle; StyleId: Integer; StyleName: pWideChar): LongBool; far; stdcall;external 'ter32.dll';
function TerSetBorderLineColor(hWnd: THandle; BorderLineColor: TColorRef): LongBool; far; stdcall;external 'ter32.dll';
function TerDeleteReviewer(hWnd : THandle; RevId: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerSetCustomFontList(hWnd : THandle;FontList: AnsiString; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetDefaultCellBorderWidth(hWnd : THandle; BorderWidth: LongBool; BorderColor: TColorRef): LongBool; far; stdcall;external 'ter32.dll';
function TerDeleteMenuItem(hWnd : THandle; CmdId: LongInt): LongBool; far; stdcall;external 'ter32.dll';
function TerSetFrameParam(hWnd: THandle; FrameId,ParamType,ParamValue:Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerGetTagPos(hWnd: THandle; TagId: Integer; TagName: AnsiString): LongInt; far; stdcall;external 'ter32.dll';
function TerGetTagPos2(hWnd: THandle; TagId: Integer; TagName: AnsiString; LineNo: LongInt; ColNo: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerDeleteTag(hWnd: THandle; LineNo,ColNo,TagType: Integer; TagName: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerSetTcField(hWnd : THandle; TocLevel: LongInt; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerInsertToc2(hWnd : THandle; TocType: LongInt; styles: AnsiString; MinLevel, MaxLevel: LongInt; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerEnableMbcs(hWnd : THandle; EnableDisable: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetDefListLevel(hWnd : THandle; level,NumType: LongInt; ListText: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerInsertPictureFileXY2(hWnd : THandle; FileName: AnsiString; embed: LongBool; align: Integer; insert,PageRelative: LongBool;
         PosX, PosY: Integer):Integer; far; stdcall;external 'ter32.dll';
function TerSetFlags9(hWnd: THandle; SetFlags: LongBool; FlagValues: LongInt): LongInt; far; stdcall;external 'ter32.dll';
function TerSetStKey(key: AnsiString): Integer; far; stdcall;external 'ter32.dll';
function TerSetStDictPathKey(key: AnsiString): Integer; far; stdcall;external 'ter32.dll';
function TerSetHtmlAddOnKey(key: AnsiString): Integer; far; stdcall;external 'ter32.dll';
function TerSetUserFont(typeface: AnsiString; TwipsSize,StylesOn,StylesOff:LongInt): LongBool; far; stdcall;external 'ter32.dll';
function TerSetPlaceHolderPict(hWnd: THandle; path: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerApplyComment(hWnd: THandle; ShowDialog: LongBool; AuthorName,AuthorInit,CommentText: AnsiString; repaint: LongBool): LongInt; far; stdcall;external 'ter32.dll';
function TerEditComment(hWnd: THandle; ShowDialog: LongBool; id: LongInt; AuthorName,AuthorInit,CommentText: AnsiString; repaint: LongBool): LongInt; far; stdcall;external 'ter32.dll';
function TerStResetUserDict(NewUserDictPath: AnsiString): Integer; far; stdcall;external 'ter32.dll';
function TerSetRowParam(hWnd: THandle; ParamType,id,ParamVal: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerApplyCommentU(hWnd: THandle; ShowDialog: LongBool; AuthorName,AuthorInit,CommentText: pWideChar; repaint: LongBool): LongInt; far; stdcall;external 'ter32.dll';
function TerChangeToolbarIcon(hWnd : THandle; id: LongInt; BmpFile:AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerSetHilightColor(hWnd : THandle; dialog: LongBool; UlineColor: TColorRef; toggle, repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetFlags10(hWnd: THandle; SetFlags: LongBool; FlagValues: LongInt): LongInt; far; stdcall;external 'ter32.dll';
function TerSetParam(hWnd : THandle; ParamType,ParamValue: LongInt): LongInt; far; stdcall;external 'ter32.dll';
function TerSetParamStr(hWnd : THandle; ParamType: LongInt; ParamValue: AnsiString): LongInt; far; stdcall;external 'ter32.dll';
function TerSetFlags11(hWnd: THandle; SetFlags: LongBool; FlagValues: LongInt): LongInt; far; stdcall;external 'ter32.dll';



// undocumented fucntions
function TerInsertUserField(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerRecreateColSpan(hWnd : THandle; CellId: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerGetRowParam(hWnd: THandle; ParamType,id: Integer; var ParamValue: Integer): LongBool; far; stdcall;external 'ter32.dll';
function TerCreateHtmlRule(hWnd : THandle; x, width, thickness : Integer; RuleColor: TColorRef; flags : Integer) : Integer; far; stdcall;external 'ter32.dll';
function TerCreateHtmlRule2(hWnd : THandle; x, width, thickness : Integer; RuleColor: TColorRef; flags : Integer; insert, repaint: LongBool) : Integer; far; stdcall;external 'ter32.dll';
function TerSetCharOffset(hWnd : THandle; offset: Integer; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerUpdateDynField(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetUserField(hWnd : THandle; FieldText: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerChangeFieldRtf(hWnd : THandle; FldName,RtfData: AnsiString; RtfLen: LongInt; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSpoolBegin(JobName: AnsiString): LongBool; far; stdcall;external 'ter32.dll';
function TerSpoolEnd(): LongBool; far; stdcall;external 'ter32.dll';
function TerSetSectColWidth(hWnd : THandle; sect,col,ColWidth,ColSpace: LongInt; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerGetSectColWidth(hWnd : THandle; sect,col: LongInt; GetColWidth: LongBool): LongInt; far; stdcall;external 'ter32.dll';
function TerShrinkTableToPageWidth(hWnd : THandle; all,repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerStopMessages(hWnd : THandle; stop: LongBool): LongBool; far; stdcall;external 'ter32.dll';
function TerSetTag2(hWnd: THandle; LineNo: LongInt; ColNo,TagType: Integer; TagName,AuxText: AnsiString; AuxInt: LongInt; flags: Integer):
                    Integer; far; stdcall;external 'ter32.dll';
function TerResetUserColors(hWnd : THandle; repaint: LongBool): LongBool; far; stdcall;external 'ter32.dll';
