******************************************************************************* Constructor Function and Procedure List of maXbox 4.7.5.20 codeX signed ******************************************************************************* ///////////////////////////////////////////////////////////////////////////// ref Help Extract Functions of maXbox4.exe BigBitBox API HEX in BOX474 ----------------------------------------------------------------------------- File EXE: 29.5 MB (31,012,768) V4.7.5.20 January 2021 EKON/BASTA/JAX/IBZ/SWS/PASCON *****************Now the Funclist********************************************** Funclist Function : 19754; Source Compiled: 3'021'957 lines *****************Now the Proclist********************************************** Proclist Procedure Size is: 11701 *****************Now Constructors********************************************** Constructlist Constructor Size is: 1819_ def head:max: maXbox10: 19/01/2021 13:00:42 file E:\maxbox\maxbox3\docs\maxbox_extract_funclist475_.txt doc file: maxbox_extract_funclist475.txt (sort function) maxbox_functions_sortlist.txt all unit file: http://www.softwareschule.ch/examples/packages.txt ------------------------------------------------------------------------- Funclist total Size all is: 33282! Constructor, Function and Procedure AExtraxt of EXE Functions of maXbox4.exe, locs of file = 34680 ASize of EXE: 31,012,768 bytes CRC32: 768395C5 SHA1: of maXbox4.exe (4.7.5.20) D82EAD01C58738887661428F94B207DB1D8FAEB5 SHA-256 9bb02566c31d45225d0f09f311b72365753dd48d5d7edd92823a4b1c3e24c001 https://www.virustotal.com/gui/file/9bb02566c31d45225d0f09f311b72365753dd48d5d7edd92823a4b1c3e24c001/detection https://www.virustotal.com/gui/file/c8e3d55e254e584a4796514f3ba892bacf2322fdb5092175e6ef74d7d98e295b/detection https://www.virustotal.com/gui/file/e0cb57d978207d09a6849efb0e972fd4d0b407a42f6eb891ab41e68b53785293/detection https://www.virustotal.com/gui/file/47a2058ebefa24bac16f47f403e1377bd15edc4ac0800623eaaf7c5801466a70/detection https://www.virustotal.com/gui/file/00676493be62cfa08ac93ec4ab306afee19922d50f8ea7a80e21117323f02d66/detection https://www.virustotal.com/gui/file/e621723093e9a65d036bc169a0307fb5587237708892d4caa638d7148bbecdce/detection ////////////////////////////////////////////////////////////////////////// FUNCTION Metric of Script: 256_findfunctions4_of_EXE_80_1.txt Function *************Now the Funclist***************** function GetResStringChecked(Ident: string; const Args: array of const): string Function ( Index : Longint) : Integer function (Command: Word; Data: Longint; var CallHelp: Boolean): Boolean Function _CheckAutoResult( ResultCode : HResult) : HResult function _T(Name: tbtString): Variant; function ABNFToText(const AText : String) : String Function Abs(e : Extended) : Extended; Function AbsInt(e : Extended) : Integer; Function AbsInt( const B : integer) : integer; Function AbsFloat( const B : double) : extended; Function Ackermann( const A, B : Integer) : Integer Function AcquireLayoutLock : Boolean Function ActionByName( const AName : string) : TWebActionItem Function ACTIVEBUFFER : PCHAR Function Add : TAggregate function Add : TCollectionItem Function Add : TColumn Function Add : TComboExItem Function Add : TCookie Function Add : TCoolBand Function Add : TFavoriteLinkItem Function Add : TFileTypeItem Function Add : THeaderSection Function Add : THTMLTableColumn Function Add : TIdEMailAddressItem Function Add : TIdMessagePart Function Add : TIdUserAccount Function Add : TListColumn Function Add : TListItem Function Add : TStatusPanel Function Add : TTaskDialogBaseButtonItem Function Add : TWebActionItem Function Add : TWorkArea Function Add( AClass : TClass) : Integer Function Add( AComponent : TComponent) : Integer Function Add( AItem, AData : Integer) : Integer Function Add( AItem, AData : Pointer) : Pointer Function Add( AItem, AData : TObject) : TObject Function Add( AObject : TObject) : Integer Function Add( const Access, Count : Cardinal; const Offset : Int64) : Integer Function Add( const S : WideString) : Int Function Add( Image, Mask : TBitmap) : Int Function Add( Index : LongInt; const Text : string) : LongInt Function Add( Sibling : TTreeNode; const S : string) : TTreeNode Function Add(const S: string): Int function Add(S: string): Int; Function AddAt(const Access,Count: Cardinal; const Offset: Int64; const Address:Pointer):Int Function ADDCHILD : TFIELDDEF Function AddChild( Index : LongInt; const Text : string) : LongInt Function AddChild( Parent : TTreeNode; const S : string) : TTreeNode Function AddChildFirst( Parent : TTreeNode; const S : string) : TTreeNode Function AddChildObject(Index:LongInt;const Text:string;const Data:Pointer:LongInt Function AddChildObject( Parent:TTreeNode;const S:string;Ptr:Pointer) : TTreeNode Function AddChildObjectFirst(Parent:TTreeNode;const S:string; Ptr:Pointer):TTreeNode Function ADDFIELDDEF : TFIELDDEF Function AddFileExtIfNecessary( AFileName, AExt : string) : string Function AddFirst( Sibling : TTreeNode; const S : string) : TTreeNode Function AddIcon( Image : TIcon) : Int Function AddImage( Value : TCustomImageList; Index : Int) : Int Function ADDINDEXDEF : TINDEXDEF Function AddItem(const Caption:String;const ImageIdx,SelectImageIdx,OverlayImagIdx,Indent:Int;Data:Ptr):TComboExItem Function AddItem( Item : THeaderSection; Index : Int) : THeaderSection Function AddItem( Item : TListItem; Index : Int) : TListItem Function AddItem( Item : TStatusPanel; Index : Int) : TStatusPanel Function AddMapping( const FieldName : string) : Boolean Function AddMasked( Image : TBitmap; MaskColor : TColor) : Int Function AddModuleClass( AClass : TComponentClass) : TComponent Function AddModuleName( const AClass : string) : TComponent Function AddNode(Node,Relative:TTreeNode;const S:string;Ptr:Pointer;Method:TNodeAttachMode):TTreeNode Function AddObject( const S : WideString; AObject : TObject) : Int Function AddObject(Index:LongInt;const Text:string; const Data:Pointer): LongInt Function AddObject( Sibling : TTreeNode; const S : string;Ptr: Pointer): TTreeNode function AddObject(S:String;AObject:TObject):Int Function AddObjectFirst( Sibling : TTreeNode; const S : string; Ptr : Pointer) : TTreeNode Function AddParameter : TParameter Function AddParamSQLForDetail(Params:TParams;SQL:WideStr;Native:Bool;QuoteChar:WideString):WideString Function Addr64ToAddr32(const Value: TJclAddr64): TJclAddr32; Function Addr32ToAddr64(const Value: TJclAddr32): TJclAddr64; function AdjustLineBreaksS(const S: string): string) TTextLineBreakStyle', '(tlbsLF, tlbsCRLF) Function AdjustLineBreaks(const S: string; Style: TTextLineBreakStyle): string; Function AllData : string function AllocMemCount: Int; function AllocMemSize: Int; Function AllocPatternBitmap( BkColor, FgColor : TColor) : TBitmap Function AllowRegKeyForEveryone( Key : HKEY; Path : string) : Boolean Function AlphaComponent( const Color32 : TColor32) : Int Function AlphaSort : Boolean Function AlphaSort( ARecurse : Boolean) : Boolean Function AnsiCat( const x, y : AnsiString) : AnsiString Function AnsiCompareFileName( S1, S2 : string) : Int function AnsiCompareFileName(const S1: string; const S2: string): Int) Function AnsiCompareStr( S1, S2 : string) : Int function AnsiCompareStr(const S1: string; const S2: string): Int;) Function AnsiCompareText( S1, S2 : string) : Int function AnsiCompareText(const S1: string; const S2: string): Int;) Function AnsiContainsStr( const AText, ASubText : string) : Boolean Function AnsiContainsText( const AText, ASubText : string) : Boolean Function AnsiCopy( const src : AnsiString; index, count : Int) : AnsiString Function AnsiDequotedStr( S : string; AQuote : Char) : string Function AnsiEndsStr( const ASubText, AText : string) : Boolean Function AnsiEndsText( const ASubText, AText : string) : Boolean Function AnsiExtractQuotedStr( var Src : PChar; Quote : Char) : string function AnsiExtractQuotedStr(var Src: PChar; Quote: Char): string) Function AnsiIndexStr( const AText : string; const AValues : array of string) : Int Function AnsiIndexText( const AText : string; const AValues : array of string) : Int Function AnsiLastChar( S : string) : PChar function AnsiLastChar(const S: string): PChar) Function AnsiLeftStr( const AText : AnsiString; const ACount : Int) : AnsiString Function AnsiLowerCase( S : string) : string Function AnsiLowercase(s : String) : String; Function AnsiLowerCaseFileName( S : string) : string Function AnsiMatchStr( const AText:string; const AValues:array of string): Boolean Function AnsiMatchText(const AText:string; const AValues: array of string): Boolean Function AnsiMidStr(const AText: AnsiString; const AStart, ACount: Int): AnsiString Function AnsiPos( const src, sub : AnsiString) : Int Function AnsiPos( Substr, S : string) : Int function AnsiPos(const Substr: string; const S: string): Int;) Function AnsiQuotedStr( S : string; Quote : Char) : string Function AnsiReplaceStr( const AText, AFromText, AToText : string) : string Function AnsiReplaceText( const AText, AFromText, AToText : string) : string Function AnsiResemblesText( const AText, AOther : string) : Boolean Function AnsiReverseString( const AText : AnsiString) : AnsiString Function AnsiRightStr( const AText : AnsiString; const ACount : Int) : AnsiString function AnsiSameCaption(const Text1: string; const Text2: string): Boolean) Function AnsiSameStr( S1, S2 : string) : Boolean function AnsiSameStr(const S1: string; const S2: string): Boolean) Function AnsiSameText( const S1, S2 : string) : Boolean Function AnsiSameText( S1, S2 : string) : Boolean function AnsiSameText(const S1: string; const S2: string): Boolean) Function AnsiStartsStr( const ASubText, AText : string) : Boolean Function AnsiStartsText( const ASubText, AText : string) : Boolean Function AnsiStrComp( S1, S2 : PChar) : Int function AnsiStrComp(S1: PChar; S2: PChar): Int) Function AnsiStrIComp( S1, S2 : PChar) : Int function AnsiStrIComp(S1: PChar; S2: PChar): Int) Function AnsiStrLastChar( P : PChar) : PChar function AnsiStrLastChar(P: PChar): PChar) Function AnsiStrLComp( S1, S2 : PChar; MaxLen : Cardinal) : Int Function AnsiStrLIComp( S1, S2 : PChar; MaxLen : Cardinal) : Int Function AnsiStrLower( Str : PChar) : PChar Function AnsiStrPos( Str, SubStr : PChar) : PChar function AnsiStrPos(Str: PChar; SubStr: PChar): PChar) Function AnsiStrScan(Str: PChar; Chr: Char): PChar) Function AnsiStrUpper( Str : PChar) : PChar Function AnsiToUtf8( const S : string) : UTF8String Function AnsiToUtf8Ex( const S : string; const cp : Int) : UTF8String Function AnsiUpperCase( S : string) : string Function AnsiUppercase(s : String) : String; Function AnsiUpperCaseFileName( S : string) : string Function ApplyUpdates(const Delta:OleVariant;MaxErrors:Int;out ErrorCount:Int): OleVariant Function ApplyUpdates(const Delta:OleVariant;MaxErrors: Int;out ErrorCount:Int): OleVariant; Function ApplyUpdates( MaxErrors : Int) : Int Function ApplyUpdates1(const Delta:OleVar;MaxErrs:Int;out ErrCount:Int;var OwnerData:OleVar):OleVariant; Function ArcCos( const X : Extended) : Extended Function ArcCosh( const X : Extended) : Extended Function ArcCot( const X : Extended) : Extended Function ArcCotH( const X : Extended) : Extended Function ArcCsc( const X : Extended) : Extended Function ArcCscH( const X : Extended) : Extended Function ArcSec( const X : Extended) : Extended Function ArcSecH( const X : Extended) : Extended Function ArcSin( const X : Extended) : Extended Function ArcSinh( const X : Extended) : Extended Function ArcTan( const X : Extended) : Extended Function ArcTan2( const Y, X : Extended) : Extended Function ArithmeticMean( const X : TDynDoubleArray) : Float function ArrayLength: Int; Function AsHex( const AValue : T4x4LongWordRecord) : string Function AsHex( const AValue : T5x4LongWordRecord) : string Function ASNDecLen( var Start : Int; const Buffer : string) : Int Function ASNDecOIDItem( var Start : Int; const Buffer : string) : Int Function ASNEncInt( Value : Int) : string Function ASNEncLen( Len : Int) : string Function ASNEncOIDItem( Value : Int) : string Function ASNEncUInt( Value : Int) : string Function ASNItem(var Start: Int; const Buffer: string; var ValueType:Int): string Function ASNObject( const Data : string; ASNType : Int) : string Function Assigned(I: Longint): Boolean; Function AspectRatio(aWidth, aHeight: Int): String; Function AsWideString( Field : TField) : WideString Function AtLeast( ACount : Int) : Boolean Function AttemptToUseSharedMemoryManager : Boolean Function Authenticate : Boolean Function AuthenticateUser( const AUsername, APassword : String) : Boolean Function Authentication : String Function BatchMove( ASource : TBDEDataSet; AMode : TBatchMode) : Longint Function BcdCompare( const bcd1, bcd2 : TBcd) : Int Function BcdFromBytes( const AValue : TBytes) : TBcd Function BcdPrecision( const Bcd : TBcd) : Word Function BcdScale( const Bcd : TBcd) : Word Function BcdToBytes( const Value : TBcd) : TBytes Function BCDToCurr( const BCD : TBcd; var Curr : Currency) : Boolean Function BcdToDouble( const Bcd : TBcd) : Double Function BcdToInt( const Bcd : TBcd; Truncate : Boolean) : Int Function BcdToStr( const Bcd : TBcd) : string; Function BcdToStrF(const Bcd:TBcd;Format:TFloatFormat;const Precision,Digits:Int):string function beep2(dwFreq, dwDuration: Int): boolean; Function BeginPeriod( const Period : Cardinal) : Boolean Function BeginTrans : Int Function BeginTransaction : TDBXTransaction; Function BeginTransaction1( Isolation : TDBXIsolation) : TDBXTransaction; function BigMulu(aone, atwo: string): string; function BigNumber(aone, atwo: string): string; function BigExp(aone, atwo: string): string; function BigMul(aone, atwo: string): string; function BigAdd(aone, atwo: string): string; function BigSub(aone, atwo: string): string; function BigFactorial(aone: string): string; Function BinaryToDouble( ABinary : string; DefValue : Double) : Double Function BinomialCoeff( N, R : Cardinal) : Float function BinominalCoefficient(n, k: Int): string; Function BinStrToInt( const ABinary : String) : Int Function BinToByte(Binary: String): Byte; function BinToHex2(Binary: String): string; function BinToInt(Binary: String): Int; Function BinToChar(St: String): Char; Function BinToStr(ans: string): string; Function BitBlt(hdcDest:HDC;nXDest,nYDest,nWidth,nHeigh:Int;hdcSrc:HDC;nXSrc,nYSrc:Int;dwRop:DWORD):Bool; Function BitmapsAreIdentical( ABitmap1, ABitmap2 : TBitmap) : Boolean Function BitsHighest( X : Byte) : Int; Function BitsHighest1( X : ShortInt) : Int; Function BitsHighest2( X : SmallInt) : Int; Function BitsHighest3( X : Word) : Int; Function BitsHighest4( X : Int) : Int; Function BitsHighest5( X : Cardinal) : Int; Function BitsHighest6( X : Int64) : Int; Function BitsLowest( X : Byte) : Int; Function BitsLowest1( X : Shortint) : Int; Function BitsLowest2( X : Smallint) : Int; Function BitsLowest3( X : Word) : Int; Function BitsLowest4( X : Cardinal) : Int; Function BitsLowest5( X : Int) : Int; Function BitsLowest6( X : Int64) : Int; Function BitsNeeded( const X : Byte) : Int; Function BitsNeeded1( const X : Word) : Int; Function BitsNeeded2( const X : Int) : Int; Function BitsNeeded3( const X : Int64) : Int; Function BlueComponent( const Color32 : TColor32) : Int Function BooleanToInt( const Pb : Boolean) : Int Function BoolToStr(B: Boolean; UseBoolStrs: Boolean): string) Function BoolToStr1(value : boolean) : string; Function booltoint( aBool : Boolean) : LongInt Function inttobool( aInt : LongInt) : Boolean Function Bounds( ALeft, ATop, AWidth, AHeight : Int) : TRect function Bounds(ALeft, ATop, AWidth, AHeight: Int): TRect) Function BreakApart(BaseString,BreakString:string;StringList: TStrings): TStrings Function BrightColor( const Color : TColor; const Pct : Single) : TColor Function BrightColorChannel( const Channel : Byte; const Pct : Single) : Byte Function BufferRequest( Length : Int) : TStream Function BuildFileList(const Path: string;const Attr:Int;const List:TStrings):Bool Function Buttons : PTaskDialogButton Function BytesPerScanline(PixelsPerScanline, BitsPerPixel,Alignment:Longint):Longint Function BytesToCardinal( const AValue : TIdBytes; const AIndex : Int) : Cardinal Function BytesToChar( const AValue : TIdBytes; const AIndex : Int) : Char Function BytesToInt64( const AValue : TIdBytes; const AIndex : Int) : Int64 Function BytesToInt( const AValue : TIdBytes; const AIndex : Int) : Int Function BytesToIPv6( const AValue : TIdBytes; const AIndex : Int) : TIdIPv6Address Function BytesToShort( const AValue : TIdBytes; const AIndex : Int) : Short Function BytesToString(ABytes:TIdBytes; AStartIndex:Int; AMaxCount:Int): string; Function BytesToStr(const Value: TBytes): String; Function BytesToWord( const AValue : TIdBytes; const AIndex : Int) : Word Function ByteToBin(Int: Byte): String; Function ByteToCharIndex( S : string; Index : Int) : Int function ByteToCharIndex(const S: string; Index: Int): Int) Function ByteToCharLen( S : string; MaxLen : Int) : Int function ByteToCharLen(const S: string; MaxLen: Int): Int) Function ByteToHex( const AByte : Byte) : string Function ByteToOctal( const AByte : Byte) : string Function ByteType( S : string; Index : Int) : TMbcsByteType function ByteType(const S: string; Index: Int): TMbcsByteType) Function CalcTitleRect( Col : TColumn; ARow : Int; var MasterCol : TColumn) : TRect Function CalculateDFAFingerprint( oStates : TList) : Int function CallTerminateProcs: Boolean) function CANFOCUS:BOOLEAN Function CanLoad( const Ext : string) : Boolean Function CanParse( AWebRequest : TWebRequest) : Boolean Function CanSave( const Ext : string) : Boolean Function CanStart( cChar : char) : boolean Function CaptureScreen : TBitmap; Function CaptureScreen1( Rec : TRect) : TBitmap; Function CardinalToFourChar( ACardinal : LongWord) : string Function CastSoapToNative(Info:PTypeInfo;const SoapData:WideString;NatData:Pointer;IsNull:Bool):Bool Function CastSoapToVariant1(SoapInfo:PTypeInfo;const SoapData:WideString):Variant; Function Ceil( const X : Extended) : Int Function Ceil16( X : Int) : Int Function Ceil4( X : Int) : Int Function Ceil8( X : Int) : Int Function Ceiling( const X : Extended) : Int Function CellRect( ACol, ARow : Longint) : TRect Function CelsiusToFahrenheit( const AValue : Double) : Double Function CenterPoint( const Rect : TRect) : TPoint function CenterPoint(const Rect: TRect): TPoint) Function ChangeFileExt( FileName, Extension : string) : string function ChangeFileExt(const FileName: string; const Extension: string): string) Function CharInSet2( const Ch : Char; const SetOfChar : TSetOfChar) : Boolean Function CharInSet( const Ch : Char; const testSet: TSysCharSet): Boolean Function CharIsInEOF( const AString : string; ACharPos : Int) : Boolean Function CharIsInSet(const AString:string;const ACharPos:Int;const ASet:String):Bool Function CharLength( S : String; Index : Int) : Int Function CharRange( const AMin, AMax : Char) : String function CharsetToIdent(Charset: Longint; var Ident: string): Boolean) Function CharToBin(vChr: Char): String; Function CharNext(lpsz: PChar): PChar; stdcall; Function CharToByteIndex( S : string; Index : Int) : Int function CharToByteIndex(const S: string; Index: Int): Int) Function CharToByteLen( S : string; MaxLen : Int) : Int function CharToByteLen(const S: string; MaxLen: Int): Int) Function CharToHex(const APrefix : String; const cc : Char) : shortstring; function CharToHexStr(Value: char): string); function CharToOem(ins, outs: PChar):boolean; function CharToUniCode(Value: Char): string; Function CheckMenuDropdown : Boolean Function CheckMessages : longint Function CheckBox: string; Function CheckOpen( Status : DBIResult) : Boolean Function CheckPassword( const APassword : String) : Boolean Function CheckResponse(const AResponse:SmallInt;const AAllowedResponses:array of SmallInt): SmallInt Function CheckCrc32( var X : array of Byte; N : Int; Crc : Cardinal) : Int; function CheckSynchronize(Timeout: Int): Boolean Function CheckWin32Version( AMajor : Int; AMinor : Int) : Boolean Function CheckCom(AComNumber: Int): Int;; Function CheckLPT1: string;; function ChrA(const a: byte): char; Function ClassIDToProgID(const ClassID: TGUID): string; Function ClassNameIs(const Name: string): Boolean Function ClearBit( const Value : Byte; const Bit : TBitRange) : Byte; Function ClearBit1( const Value : Shortint; const Bit : TBitRange) : Shortint; Function ClearBit2( const Value : Smallint; const Bit : TBitRange) : Smallint; Function ClearBit3( const Value : Word; const Bit : TBitRange) : Word; Function ClearBit4( const Value : Int; const Bit : TBitRange) : Int; Function ClearBit5( const Value : Cardinal; const Bit : TBitRange) : Cardinal; Function ClearBit6( const Value : Int64; const Bit : TBitRange) : Int64; function CLIENTTOSCREEN(POINT:TPOINT):TPOINT Function Clipboard : TClipboard Function ClipCodes( const X, Y, MinX, MinY, MaxX, MaxY : Float) : TClipCodes; Function ClipCodes1( const X, Y : Float; const ClipRect : TRect) : TClipCodes; Function ClipLine( var X1, Y1, X2, Y2 : Int; const ClipRect : TRect) : Boolean; Function ClipLineToRect( var P1, P2 : TFloatPoint; const Rect : TFloatRect) : Boolean Function Clone( out stm : IStream) : HResult Function CloneConnection : TSQLConnection Function CloneMemoryStream( Original : TMemoryStream) : TMemoryStream function CLOSEQUERY:BOOLEAN Function CloseVolume( var Volume : THandle) : Boolean Function CloseHandle(Handle: Int): Int; stdcall; Function CPlApplet(hwndCPl:THandle;uMsg:DWORD;lParam1,lParam2:Longint):Longint Function CmdLine: PChar; function CmdShow: Int; // type TPos = (tLat, tLon);TShowFmt = (sfNautical, sfStatute, sfMetric); Function CoordinateStr(Idx: Int; PosInSec: Double; PosLn: TPos): string; Function Color32( const R, G, B : Byte; const A : Byte) : TColor32; Function Color32( WinColor : TColor) : TColor32; Function Color321( const Index : Byte; const Palette : TPalette32) : TColor32; Function ColorAdjustLuma( clrRGB : TColor; n : Int; fScale :BOOLean) : TColor Function ColorHLSToRGB( Hue, Luminance, Saturation : Word) : TColorRef Function ColorToHTML( const Color : TColor) : String function ColorToIdent(Color: Longint; var Ident: string): Boolean) Function ColorToRGB(color: TColor): Longint function ColorToString(Color: TColor): string) Function ColorToWebColorName( Color : TColor) : string Function ColorToWebColorStr( Color : TColor) : string Function ColumnAtDepth( Col : TColumn; ADepth : Int) : TColumn Function Combination(npr, ncr: Int): extended; Function CombinationInt(npr, ncr: Int): Int64; Function CombineInfo( Bitmap : TCustomBitmap32) : TCombineInfo Function CommaAdd( const AStr1, AStr2 : String) : string Function CommercialRound( const X : Extended) : Int64 Function Commit( grfCommitFlags : Longint) : HResult Function Compare( const NameExt : string) : Boolean function CompareDate(const A, B: TDateTime): TValueRelationship; Function CompareDateTime( const ADateTime1, ADateTime2 : TDateTime) : Int Function CompareFiles(const FN1,FN2:string;Breathe:TNotifyEvent;BreathingSender:TObject):bool Function CompareMemoryStreams( S1, S2 : TMemoryStream) : boolean Function CompareStr( S1, S2 : string) : Int function CompareStr(const S1: string; const S2: string): Int) function CompareString(const S1: string; const S2: string): Int) Function CompareText( S1, S2 : string) : Int function CompareText(const S1: string; const S2: string): Int) Function CompareTextLike(cWildStr,cStr:string;const cWildChar:char;lCaseSensitive:bool):bool function CompareTime(const A, B: TDateTime): TValueRelationship; function CompareValueE(const A,B:Extended;Epsilon:Extended= 0):TValueRelationship; overload; function CompareValueD(const A, B:Double; Epsilon:Double = 0):TValueRelationship; overload; function CompareValueS(const A, B: Single; Epsilon: Single = 0): TValueRelationship; overload; function CompareValueI(const A, B: Int): TValueRelationship; overload; function CompareValueI64(const A, B: Int64): TValueRelationship; overload; Function CompatibleConversionType(const AType:TConvType; const AFamily : TConvFamily):Boolean Function CompatibleConversionTypes( const AFrom, ATo : TConvType) : Boolean Function ComponentTypeToString( const ComponentType : DWORD) : string Function ComposeDateTime(Date,Time : TDateTime) : TDateTime;; Function ComponentToStringProc(Component: TComponent): string; Function StringToComponentProc(Value: string): TComponent; Function CompToCurrency( Value : Comp) : Currency Function CompToDouble( Value : Comp) : Double function ComputeFileCRC32(const FileName : String) : Int; function ComputeSHA256(astr: string; amode: char): string) //mode F:File, S:String function ComputeSHA512(astr: string; amode: char): string) //mode F:File, S:String function ComPortSelect: Int; // Search for the first available port Function Concat(s: string): string Function ConnectAndGetAll : string Function Connected : Boolean function constrain(x, a, b: Int): Int; Function ConstraintCallBack(Req:DsInfoReq;var ADataSources:DataSources): DBIResult Function ConstraintsDisabled : Boolean function CONTAINSCONTROL(CONTROL:TCONTROL):BOOLEAN Function ContainsState( oState : TniRegularExpressionState) : boolean Function ContainsStr( const AText, ASubText : string) : Boolean Function ContainsText( const AText, ASubText : string) : Boolean Function ContainsTransition( oTransition : TniRegularExpressionTransition) : boolean Function Content: string Function ContentFromStream( Stream : TStream) : string Function ContentFromString( const S : string) : string Function CONTROLSDISABLED : BOOLEAN Function Convert( const AValue : Double; const AFrom, ATo : TConvType) : Double; Function Convert1(const AValue:Double;const AFrom1,AFrom2,ATo1,ATo2:TConvType):Double; Function ConvertFrom( const AFrom : TConvType; const AValue : Double) : Double Function ConvertReadStream( Stream : TStream; Buffer : PChar; BufSize : Int) : Int Function ConvertTo( const AValue : Double; const ATo : TConvType) : Double Function ConvertWriteStream( Stream : TStream; Buffer : PChar; BufSize : Int) : Int Function ConvFamilyToDescription( const AFamily : TConvFamily) : string Function ConvTypeToDescription( const AType : TConvType) : string Function ConvTypeToFamily( const AFrom, ATo : TConvType) : TConvFamily; Function ConvTypeToFamily( const AType : TConvType) : TConvFamily; Function ConvAdd(const AVal:Dbl;const AType1:TConvType;const AVal2:Dbl;const AType2,AResultType:TConvType): Double Function ConvCompareValue(const AValue1:Double;const AType1:TConvType;const AValue2:Double;const AType2:TConvType): TValueRelationship Function ConvDec( const AValue : Double; const AType, AAmountType : TConvType) : Double; Function ConvDec1(const AValue:Dbl;const AType:TConvType;const AAmount:Dble;const AAmountType:TConvType):Double; Function ConvDiff(const AVal1:Dbl;const AType1:TConvType;const AVal2:Dble;const AType2,AResuType:TConvType):Double Function ConvInc( const AValue : Double; const AType, AAmountType : TConvType) : Double; Function ConvInc1(const AValue:Dbl;const AType:TConvType;const AAmount:Double;const AAmountType:TConvType):Double; Function ConvSameValue(const AValue1:Dbl;const AType1:TConvType;const AValue2:Dbl;const AType2:TConvType):Bool Function ConvToStr( const AValue : Double; const AType : TConvType) : string Function ConvWithinNext( const AValue, ATest : Double; const AType : TConvType; const AAmount : Double; const AAmountType : TConvType) : Boolean Function ConvWithinPrevious(const AValue,ATest:Double;const AType:TConvType; const AAmount:Double;const AAmountType: TConvType) : Boolean function Copy(s: AnyString; iFrom, iCount: Longint): AnyString; Function CopyFile( Source, Dest : string; CanOverwrite : Boolean) : Boolean Function CopyFileEx( Source, Dest : string; Flags : FILEOP_FLAGS) : Boolean Function CopyFileTo( const Source, Destination : string) : Boolean function CopyFrom(Source:TStream;Count:Int64):LongInt Function CopyPalette( Palette : HPALETTE) : HPALETTE Function CopyTo( Length : Int) : string Function CopyTo(stm:IStream;cb: Largeint;out cbRead: Largeint;out cbWritten:Largeint): HResult Function CopyToEOF : string Function CopyToEOL : string Function Cos(e : Extended) : Extended; Function Cosecant( const X : Extended) : Extended Function Cot( const X : Extended) : Extended Function Cotan( const X : Extended) : Extended Function CotH( const X : Extended) : Extended Function Count : Int Function CountBitsCleared( X : Byte) : Int; Function CountBitsCleared1( X : Shortint) : Int; Function CountBitsCleared2( X : Smallint) : Int; Function CountBitsCleared3( X : Word) : Int; Function CountBitsCleared4( X : Int) : Int; Function CountBitsCleared5( X : Cardinal) : Int; Function CountBitsCleared6( X : Int64) : Int; Function CountBitsSet( X : Byte) : Int; Function CountBitsSet1( X : Word) : Int; Function CountBitsSet2( X : Smallint) : Int; Function CountBitsSet3( X : ShortInt) : Int; Function CountBitsSet4( X : Int) : Int; Function CountBitsSet5( X : Cardinal) : Int; Function CountBitsSet6( X : Int64) : Int; function countDirfiles(const apath: string): Int; function CountGenerations(Ancestor,Descendent: TClass): Int Function Coversine( X : Float) : Float function CRC32(const fileName: string): LongWord; Function CREATEBLOBSTREAM( FIELD : TFIELD; MODE : TBLOBSTREAMMODE) : TSTREAM Function CreateColumns : TDBGridColumns Function CreateDataLink : TGridDataLink Function CreateDir( Dir : string) : Boolean function CreateDir(const Dir: string): Boolean) Function CreateDOSProcessRedirected(const CommandLine,InputFile,OutputFile:string): Bool Function CreateEnvironmentBlock(const Options:TEnvironmentOptions;const AdditionalVars:TStrings):PChar Function CREATEFIELD(OWNER:TCOMPONENT;PARENTFIELD:TOBJECTFIELD;const FIELDNAME:String;CREATECHILDREN:BOOL):TFIELD Function CreateGlobber( sFilespec : string) : TniRegularExpression Function CreateGrayMappedBmp( Handle : HBITMAP) : HBITMAP Function CreateGrayMappedRes( Instance : THandle; ResName : PChar) : HBITMAP function CreateGUID(out Guid: TGUID): HResult) Function CreateInstance( const unkOuter: IUnknown;const iid:TGUID; out obj):HResult Function CreateMappedBmp(Handle : HBITMAP; const OldColors,NewColors:array of TColor):HBITMAP Function CreateMappedRes(Instance:THandle;ResName:PChar;const OldColors,NewColors:array of TColor):HBITMAP Function CreateMessageDialog(const Msg:string;DlgType:TMsgDlgType;Buttons:TMsgDlgButtons):TForm; Function CreateMessageDialog1(const Msg:string;DlgType:TMsgDlgType;Btns:TMsgDlgBtns;DefaultBtn:TMsgDlgBtn):TForm; function CreateOleObject(const ClassName: String): IDispatch; Function CREATEPARAM(FLDTYPE:TFIELDTYPE;const PARAMNAME:String; PARAMTYPE:TPARAMTYPE): TPARAM Function CreateParameter(const Name:WideString;DataType:TDataType;Direction:TParameterDirection;Size:Int;Value: OleVariant):TParameter Function CreateLocate( DataSet : TDataSet) : TJvLocateObject Function CreateMappedBmp(Handle: HBITMAP;const OldColors,NewColors:array of TColor) : HBITMAP Function CreateMappedRes(Instance:THandle;ResName:PChar;const OldColors,NewColors:array of TColor):HBITMAP Function CreateMutex2(lpMutexAttributes:TObject;bInitialOwner:BOOL;lpName:PChar): THandle; Function CreateSemaphore2(lpSemaphoreAttributes:TObject;lInitialCount,lMaximumCount:Longint;lpName:PChar):THandle; //Ex.: vMutex := CreateMutex2(Nil, True, MutexName); Function IPAddrToName // ShowMessage(IPAddrToName(LocalIp)); Function CreateRecordBuffer( Length : Int) : TRecordBuffer Function CreateValueBuffer( Length : Int) : TValueBuffer Function CreatePopupCalculator(AOwner:TComponent;ABiDiMode:TBiDiMode):TWinControl Function CreateRecordBuffer( Length : Int) : TRecordBuffer Function CreateRotatedFont( Font : TFont; Angle : Int) : HFONT Function CreateTwoColorsBrushPattern( Color1, Color2 : TColor) : TBitmap Function CreateValueBuffer( Length : Int) : TValueBuffer Function CreateHexDump( AOwner : TWinControl) : THexDump Function Csc( const X : Extended) : Extended Function CscH( const X : Extended) : Extended function currencyDecimals: Byte function currencyFormat: Byte function currencyString: String Function CurrentProcessId : TIdPID Function CurrentReadBuffer : string Function CurrentThreadId : TIdPID Function CurrentYear : Word Function CurrToBCD(const Curr:Currency;var BCD:TBcd;Precision:Int;Decimals:Int):Bool Function CurrToStr( Value : Currency) : string; Function CurrToStrF(Value:Currency;FormatSettings:TFormatSettings;Digits:Int):string; Function CurrToStrFS(Value:Currency;Format:TFloatFormat;Digits:Int;const FormatSettings:TFormatSettings):string; function CursorToIdent(cursor: Longint; var Ident: string): Boolean; function CursorToString(cursor: TCursor): string; Function CustomSort( SortProc : TLVCompare; lParam : Longint) : Boolean Function CustomSort(SortProc:TTVCompare;Data:Longint;ARecurse : Boolean):Boolean Function CycleToDeg( const Cycles : Extended) : Extended Function CycleToGrad( const Cycles : Extended) : Extended Function CycleToRad( const Cycles : Extended) : Extended Function D2H( N : Longint; A : Byte) : string Function DarkColor( const Color : TColor; const Pct : Single) : TColor Function DarkColorChannel( const Channel : Byte; const Pct : Single) : Byte Function DataLinkDir : string Function DataRequest( Data : OleVariant) : OleVariant Function DataRequest( Input : OleVariant) : OleVariant Function DataToRawColumn( ACol : Int) : Int Function Date : TDateTime function Date: TDateTime; Function DateIsNull( const pdtValue : TDateTime; const pdtKind : TdtKind) : Boolean Function DateOf( const AValue : TDateTime) : TDateTime function DateSeparator: char; Function DateTimeGMTToHttpStr( const GMTValue : TDateTime) : String Function DateTimeToFileDate( DateTime : TDateTime) : Int function DateTimeToFileDate(DateTime: TDateTime): Int; Function DateTimeToGmtOffSetStr( ADateTime : TDateTime; SubGMT : Boolean) : string Function DateTimeToInternetStr(const Value:TDateTime;const AIsGMT:Boolean): String Function DateTimeToJulianDate( const AValue : TDateTime) : Double Function DateTimeToModifiedJulianDate( const AValue : TDateTime) : Double Function DateTimeToStr( DateTime : TDateTime) : string; Function DateTimeToStr2(DateTime: TDateTime;FormatSettings:TFormatSettings):string; function DateTimeToTimeStamp(DateTime: TDateTime): TTimeStamp Function DateTimeToUnix( const AValue : TDateTime) : Int64 function DateTimeToUnix(D: TDateTime): Int64; Function DateToStr( DateTime : TDateTime) : string; function DateToStr(const DateTime: TDateTime): string; function DateToStr(D: TDateTime): string; Function DateToStr2( DateTime : TDateTime; FormatSettings : TFormatSettings) : string; Function DayOf( const AValue : TDateTime) : Word Function DayOfTheMonth( const AValue : TDateTime) : Word function DayOfTheMonth(const AValue: TDateTime): Word; Function DayOfTheWeek( const AValue : TDateTime) : Word Function DayOfTheYear( const AValue : TDateTime) : Word function DayOfTheYear(const AValue: TDateTime): Word; Function DayOfWeek( DateTime : TDateTime) : Word function DayOfWeek(const DateTime: TDateTime): Word; Function DayOfWeekStr( DateTime : TDateTime) : string Function DaysBetween( const ANow, AThen : TDateTime) : Int Function DaysInAMonth( const AYear, AMonth : Word) : Word Function DaysInAYear( const AYear : Word) : Word Function DaysInMonth( const AValue : TDateTime) : Word Function DaysInYear( const AValue : TDateTime) : Word Function DaySpan( const ANow, AThen : TDateTime) : Double Function DBUseRightToLeftAlignment( AControl : TControl; AField : TField) : Boolean function DecimalSeparator: char; Function DecLimit( var B : Byte; const Limit : Byte; const Decr : Byte) : Byte; Function DecLimit1(var B:Shortint;const Limit:Shortint const Decr:Shortint):Shortint; Function DecLimit2(var B:Smallint;const Limit:Smallint;const Decr:Smallint):Smallint; Function DecLimit3( var B : Word; const Limit : Word; const Decr : Word) : Word; Function DecLimit4( var B : Int; const Limit : Int; const Decr : Int) : Int; Function DecLimit5(var B Cardinal;const Limit Cardinal;const Decr:Cardinal):Cardinal; Function DecLimit6( var B : Int64; const Limit : Int64; const Decr : Int64) : Int64; Function DecLimitClamp( var B : Byte; const Limit : Byte; const Decr : Byte) : Byte; Function DecLimitClamp1(var B:Shortint;const Limit:Shortint; const Decr : Shortint): Shortint; Function DecLimitClamp2(var B:Smallint;const Limit: Smallint;const Decr: Smallint) : Smallint; Function DecLimitClamp3( var B : Word; const Limit : Word; const Decr : Word) : Word; Function DecLimitClamp4( var B : Int; const Limit : Int; const Decr : Int) : Int; Function DecLimitClamp5(var B:Cardinal;const Limit:Cardinal; const Decr:Cardinal) Cardinal; Function DecLimitClamp6(var B: Int64; const Limit:Int64; const Decr:Int64): Int64; Function DecodeDateFully(DateTime: TDateTime; var Year,Month,Day,DOW:Word): Boolean Function DecodeSoundexInt( AValue : Int) : string Function DecodeSoundexWord( AValue : Word) : string Function DefaultAlignment : TAlignment Function DefaultCaption : string Function DefaultColor : TColor Function DefaultFont : TFont Function DefaultImeMode : TImeMode Function DefaultImeName : TImeName Function DefaultReadOnly : Boolean Function DefaultWidth : Int Function DegMinSecToFloat( const Degs, Mins, Secs : Float) : Float Function DegToCycle( const Degrees : Extended) : Extended Function DegToGrad( const Degrees : Extended) : Extended Function DegToGrad( const Value : Extended) : Extended; Function DegToGrad1( const Value : Double) : Double; Function DegToGrad2( const Value : Single) : Single; Function DegToRad( const Degrees : Extended) : Extended Function DegToRad( const Value : Extended) : Extended; Function DegToRad1( const Value : Double) : Double; Function DegToRad2( const Value : Single) : Single; Function DelChar( const pStr : string; const pChar : Char) : string Function DelEnvironmentVar( const Name : string) : Boolean Function Delete( const MsgNum : Int) : Boolean Function DeleteDirectory(const DirectoryName:string;MoveToRecycleBin:Boolean):Bool Function DeleteFile(const FileName: string): boolean) Function DeleteFileEx( FileName : string; Flags : FILEOP_FLAGS) : Boolean Function DelimiterPosn( const sString : string; const sDelimiters: string): Int; Function DelimiterPosn1(const sString:string;const sDelimiters:string;out cDelimiter:char):Int; Function DelSpace( const pStr : string) : string Function DelString( const pStr, pDelStr : string) : string Function DelTree( const Path : string) : Boolean Function Depth : Int Function Description : string Function DescriptionsAvailable : Boolean Function DescriptionToConvFamily(const ADescription:string;out AFamily:TConvFamily):Boolean Function DescriptionToConvType(const ADescription:string;out AType:TConvType):Bool; Function DescriptionToConvType1(const AFamil:TConvFamily;const ADescr:string;out AType:TConvType):Bool; Function DetectUTF8Encoding( const s : UTF8String) : TEncodeType Function DialogsToPixelsX( const Dialogs : Word) : Word Function DialogsToPixelsY( const Dialogs : Word) : Word Function Digits( const X : Cardinal) : Int Function DirectoryExists( const Name : string) : Boolean Function DirectoryExists( Directory : string) : Boolean Function DiskFree( Drive : Byte) : Int64 function DiskFree(Drive: Byte): Int64) Function DiskInDrive( Drive : Char) : Boolean Function DiskSize( Drive : Byte) : Int64 function DiskSize(Drive: Byte): Int64) Function DISPATCHCOMMAND( ACOMMAND : WORD) : BOOLEAN Function DispatchEnabled : Boolean Function DispatchMask : TMask Function DispatchMethodType : TMethodType Function DISPATCHPOPUP( AHANDLE : HMENU) : BOOLEAN Function DispatchRequest( Sender : TObject; Request : TWebRequest; Response : TWebResponse) : Boolean Function DisplayCase( const S : String) : String Function DisplayRect( Code : TDisplayCode) : TRect Function DisplayRect( TextOnly : Boolean) : TRect Function DisplayStream( Stream : TStream) : string TBufferCoord', 'record Char : Int; Line : Int; end TDisplayCoord', 'record Column : Int; Row : Int; end Function DisplayCoord( AColumn, ARow : Int) : TDisplayCoord Function BufferCoord( AChar, ALine : Int) : TBufferCoord Function DomainName( const AHost : String) : String Function DownloadFile(SourceFile, DestFile: string): Boolean; //fast! Function DownloadFileOpen(SourceFile, DestFile: string): Boolean; //open process Function DosPathToUnixPath( const Path : string) : string Function DottedLineTo( const Canvas : TCanvas; const X, Y : Int) : Boolean; Function DoubleDecliningBalance(const Cost,Salvage:Extended;Life,Period:Int):Extended Function DoubleToBcd( const AValue : Double) : TBcd; Function DoubleToHex( const D : Double) : string Function DoUpdates : Boolean Function Dragging: Boolean; Function DrawCaption( p1 : HWND; p2 : HDC; const p3 : TRect; p4 : UINT) : BOOL Function DrawAnimatedRects(hwnd: HWND;idAni Int;const lprcFrom,lprcTo: TRect): BOOL Function DrawEdge( hdc : HDC; var qrc : TRect; edge : UINT; grfFlags : UINT) : BOOL Function DrawFrameControl( DC : HDC; const Rect : TRect; uType, uState : UINT) : BOOL {Works like InputQuery but displays 2edits. If PasswordChar <> #0, second edit's PasswordChar is set} Function DualInputQuery(const ACapt,Prpt1,Prpt2:str;var AVal1,AVal2:string;PasswrdChar:Char=#0):Bool; Function DupeString( const AText : string; ACount : Int) : string Function Edit : Boolean Function EditCaption : Boolean Function EditText : Boolean Function EditFolderList( Folders : TStrings) : Boolean Function EditQueryParams(DataSet:TDataSet;List: TParams; AHelpContext: THelpContext): Boolean Function Elapsed( const Update : Boolean) : Cardinal Function EnableProcessPrivilege(const Enable:Boolean; const Privilege:string):Boolean Function EnableThreadPrivilege(const Enable Boolean;const Privilege:string): Boolean Function EncodeDate( Year, Month, Day : Word) : TDateTime function EncodeDate(Year, Month, Day: Word): TDateTime; Function EncodeDateDay( const AYear, ADayOfYear : Word) : TDateTime Function EncodeDateMonthWeek( const AYear, AMonth, AWeekOfMonth, ADayOfWeek : Word) : TDateTime Function EncodeDateTime(const AYear,AMonth,ADay,AHour,AMinute,ASecond,AMilliSecond:Word): TDateTime Function EncodeDateWeek(const AYear,AWeekOfYear:Word;const ADayOfWeek:Word):TDateTime Function EncodeDayOfWeekInMonth( const AYear, AMonth, ANthDayOfWeek, ADayOfWeek : Word) : TDateTime Function EncodeString( s : string) : string Function DecodeString( s : string) : string Function EncodeTime( Hour, Min, Sec, MSec : Word) : TDateTime function EncodeTime(Hour, Min, Sec, MSec: Word): TDateTime; Function EndIP : String Function EndOfADay( const AYear, AMonth, ADay : Word) : TDateTime; Function EndOfADay1( const AYear, ADayOfYear : Word) : TDateTime; Function EndOfAMonth( const AYear, AMonth : Word) : TDateTime Function EndOfAWeek(const AYear,AWeekOfYear:Word; const ADayOfWeek:Word):TDateTime Function EndOfAYear( const AYear : Word) : TDateTime Function EndOfTheDay( const AValue : TDateTime) : TDateTime Function EndOfTheMonth( const AValue : TDateTime) : TDateTime Function EndOfTheWeek( const AValue : TDateTime) : TDateTime Function EndOfTheYear( const AValue : TDateTime) : TDateTime Function EndPeriod( const Period : Cardinal) : Boolean Function EndsStr( const ASubText, AText : string) : Boolean Function EndsText( const ASubText, AText : string) : Boolean Function EnsureMsgIDBrackets( const AMsgID : String) : String Function EnsureRange( const AValue, AMin, AMax : Int) : Int; Function EnsureRange1( const AValue, AMin, AMax : Int64) : Int64; Function EnsureRange2( const AValue, AMin, AMax : Double) : Double; Function EOF: boolean Function EOln: boolean Function EqualRect( const R1, R2 : TRect) : Boolean function EqualRect(const R1, R2: TRect): Boolean) Function Equals( Strings : TWideStrings) : Boolean function Equals(Strings: TStrings): Boolean; Function EqualState( oState : TniRegularExpressionState) : boolean Function ErrOutput: Text) function ExceptionParam: String; function ExceptionPos: Cardinal; function ExceptionProc: Cardinal; function ExceptionToString(er: TIFException; Param: String): String; function ExceptionType: TIFException; Function ExcludeTrailingBackslash( S : string) : string function ExcludeTrailingBackslash(const S: string): string) Function ExcludeTrailingPathDelimiter( const APath : string) : string Function ExcludeTrailingPathDelimiter( S : string) : string function ExcludeTrailingPathDelimiter(const S: string): string) function ExecConsoleApp(const AppName,Parameters:String;AppOutput:TStrings):bool; Function ExecProc : Int Function ExecSQL : Int Function ExecSQL( ExecDirect : Boolean) : Int Function Execute : _Recordset; Function Execute : Boolean Function Execute : Boolean; Function Execute(const SQL: string;Params:TParams;Cache:Boolean;cursor:phDBICur):Int Function Execute(const SQL: WideString;Params:TParams;ResultSet: TPSResult):Int Function Execute( ParentWnd : HWND) : Boolean Function Execute1(constCommText:WideString;const CType:TCommType;const ExecuteOpts:TExecuteOpts):_Recordset; Function Execute1( const Parameters : OleVariant) : _Recordset; Function Execute1( ParentWnd : HWND) : Boolean; Function Execute2( var RecordsAffected:Int;const Parameters:OleVariant):_Recordset; Function ExecuteAction( Action : TBasicAction) : Boolean Function ExecuteDirect( const SQL : WideString) : Int Function ExecuteFile(const FileName:string;const Params:string;const DefDir:string;ShowCmd:Int):THandle Procedure ExecuteThread2(afunc:TThreadFunction2;thrOK:boolean);AddTypeS('TThreadFunction2','procedure Function CreateThread2(ThreadFunc: TThreadFunction2) : THandle function ExeFileIsRunning(ExeFile: string): boolean; function ExePath: string; function ScriptPath: string; function ScriptName: string; function ExePathName: string; Function Exists( AItem : Pointer) : Boolean Function ExitWindows( ExitCode : Cardinal) : Boolean function Exp(x: Extended): Extended; Function ExpandEnvironmentVar( var Value : string) : Boolean Function ExpandFileName( FileName : string) : string function ExpandFileName(const FileName: string): string) Function ExpandUNCFileName( FileName : string) : string function ExpandUNCFileName(const FileName: string): string) Function ExpJ( const X : Float) : Float; Function Exsecans( X : Float) : Float Function Extract( const AByteCount : Int) : string Function Extract( Item : TClass) : TClass Function Extract( Item : TComponent) : TComponent Function Extract( Item : TObject) : TObject Function ExtractFileDir( FileName : string) : string function ExtractFileDir(const FileName: string): string) Function ExtractFileDrive( FileName : string) : string function ExtractFileDrive(const FileName: string): string) Function ExtractFileExt( FileName : string) : string function ExtractFileExt(const FileName: string): string) Function ExtractFileExtNoDot( const FileName : string) : string Function ExtractFileExtNoDotUpper( const FileName : string) : string Function ExtractFileName( FileName : string) : string function ExtractFileName(const filename: string):string; Function ExtractFilePath( FileName : string) : string function ExtractFilePath(const filename: string):string; Function ExtractRelativePath( BaseName, DestName : string) : string function ExtractRelativePath(const BaseName: string; const DestName: string): string) Function ExtractShortPathName( FileName : string) : string function ExtractShortPathName(const FileName: string): string) function ExtractStrings(Separators,WhiteSpace:TSysCharSet;Content:PChar;Strings:TStrings):Int function ExtractStrings(Separators:TSysCharSet;WhiteSpace:TSysCharSet;Content:PChar;Str:TStrings):Int) Function Fact(numb: Int): Extended; Function FactInt(numb: Int): int64; Function Factorial( const N : Int) : Extended Function FahrenheitToCelsius( const AValue : Double) : Double function FalseBoolStrs: array of string Function Fetch(var AInput:string;const ADelim:string;const ADelete:Bool;const ACaseSensitive:Bool):string Function FetchCaseInsensitive(var AInput:string; const ADelim:string; const ADelete:Boolean): string Function Fibo(numb: Int): Extended; Function FiboInt(numb: Int): Int64; Function Fibonacci( const N : Int) : Int Function FIELDBYNAME( const FIELDNAME : STRING) : TFIELD Function FIELDBYNAME( const FIELDNAME : WIDESTRING) : TFIELD Function FIELDBYNAME( const NAME : String) : TFIELD Function FIELDBYNAME( const NAME : String) : TFIELDDEF Function FIELDBYNUMBER( FIELDNO : Int) : TFIELD Function FileAge( FileName : string) : Int Function FileAge(const FileName: string): Int) Function FileCompareText( const A, B : String) : Int Function FileContains(const FileName:string;Text:string;CaseSensitive:Bool;ExceptionOnError:Bool): Boolean Function FileCreate(FileName: string): Int; //FileCreate2(FileName:string;Rights:Int):Int; Function FileCreate(const FileName: string): Int) Function FileCreateTemp( var Prefix : string) : THandle Function FileDateToDateTime( FileDate : Int) : TDateTime function FileDateToDateTime(FileDate: Int): TDateTime; Function FileExists( const FileName : string) : Boolean Function FileExists( FileName : string) : Boolean function fileExists(const FileName: string): Boolean; Function FileGetAttr( FileName : string) : Int Function FileGetAttr(const FileName: string): Int) Function FileGetDate( Handle : Int) : Int Function FileGetDate(handle: Int): Int Function FileGetDisplayName( const FileName : string) : string Function FileGetSize( const FileName : string) : Int Function FileGetTempName( const Prefix : string) : string Function FileGetTypeName( const FileName : string) : string Function FileIsReadOnly( FileName : string) : Boolean Function FileLoad( ResType : TResType; const Name : string; MaskColor : TColor) : Boolean Function FileOpen( FileName : string; Mode : LongWord) : Int Function FileOpen(const FileName: string; mode:Int): Int) Function FileRead(handle: Int; Buffer: PChar; count: LongWord): Int Function FileSearch( Name, DirList : string) : string Function FileSearch(const Name, dirList: string): string) Function FileSeek( Handle : Int; Offset : Int64; Origin : Int) : Int64; Function FileSeek( Handle, Offset, Origin : Int) : Int; Function FileSeek(handle, offset, origin: Int): Int Function FileSetAttr( FileName : string; Attr : Int) : Int function FileSetAttr(const FileName: string; Attr: Int): Int) Function FileSetDate(FileName : string; Age : Int) : Int; Function FileSetDate(handle: Int; age: Int): Int Function FileSetDate2(FileHandle : Int; Age : Int) : Int; Function FileSetDateH( Handle : Int; Age : Int) : Int; Function FileSetReadOnly( FileName : string; ReadOnly : Boolean) : Boolean Function FileSize( const FileName : string) : int64 Function FileSizeByName( const AFilename : string) : Longint function FileWrite(Handle: Int; const Buffer: pChar; Count: LongWord): Int) Function FilterSpecArray : TComdlgFilterSpecArray Function FIND( ACAPTION : String) : TMENUITEM Function Find( AItem : Pointer; out AData : Pointer) : Boolean Function FIND( const ANAME : String) : TNAMEDITEM Function Find( const DisplayName : string) : TAggregate Function Find( const Item : TBookmarkStr; var Index : Int) : Boolean Function FIND( const NAME : String) : TFIELD Function FIND( const NAME : String) : TFIELDDEF Function FIND( const NAME : String) : TINDEXDEF Function Find( const S : WideString; var Index : Int) : Boolean function Find(S:String;var Index:Int):Boolean Function FindAuthClass( AuthName : String) : TIdAuthenticationClass Function FindBand( AControl : TControl) : TCoolBand Function FindBoundary( AContentType : string) : string Function FindButton( AModalResult : TModalResult) : TTaskDialogBaseButtonItem Function FindCaption(StartIndex:Int;Value:string;Partial,Inclusive,Wrap:Boolean): TListItem Function FindCdLineSwitch( Switch : string; IgnoreCase : Boolean) : Boolean; Function FindCloseW(FindFile: Int): LongBool; stdcall; Function FindCmdLineSwitch(Switch:string;Chars:TSysCharSet;IgnoreCase:Boolean): Boolean; Function FindCmmdLineSwitch( Switch : string) : Boolean; function FindComponent(AName: String): TComponent; function FindComponent(vlabel: string): TComponent; function FindComponent2(vlabel: string): TComponent; function FindControl(Handle: HWnd): TWinControl; Function FindData( StartIndex : Int; Value : Pointer; Inclusive, Wrap : Boolean) : TListItem Function FindDatabase( const DatabaseName : string) : TDatabase function FindDragTarget(const Pos: TPoint; AllowDisabled: Boolean): TControl; Function FINDFIELD( const FIELDNAME : STRING) : TFIELD Function FINDFIELD( const FIELDNAME : WideString) : TFIELD Function FindFirst2(const Path: string; Attr: Int; var F: TSearchRec):Int) Function FindNext2(var F: TSearchRec): Int) procedure FindClose2(var F: TSearchRec) Function FINDFIRST : BOOLEAN TJvSpecialFolder = (sfRecycleBin, sfControlPanel, sfDesktop, sfDesktopDirectory, sfMyComputer, sfFonts, sfNetHood, sfNetwork, sfPersonal, sfPrinters, sfPrograms,sfRecent,sfSendTo,sfStartMenu, stStartUp, sfTemplates); FFolder: array [TJvSpecialFolder] of Int = (CSIDL_BITBUCKET, CSIDL_CONTROLS, CSIDL_DESKTOP, CSIDL_DESKTOPDIRECTORY, CSIDL_DRIVES, CSIDL_FONTS, CSIDL_NETHOOD, CSIDL_NETWORK, CSIDL_PERSONAL, CSIDL_PRINTERS, CSIDL_PROGRAMS, CSIDL_RECENT, CSIDL_SENDTO, CSIDL_STARTMENU, CSIDL_STARTUP, CSIDL_TEMPLATES); Function FindFilesDlg(StartIn: string; SpecialFolder: TJvSpecialFolder; UseFolder: Boolean): Boolean); function Findfirst(const filepath: string; attr: Int): Int; function FindFirst2(const Path: string; Attr: Int; var F: TSearchRec): Int) Function FindFirstNotOf( AFind, AText : String) : Int Function FindFirstOf( AFind, AText : String) : Int Function FindImmediateTransitionOn( cChar : char) : TniRegularExpressionState Function FINDINDEXFORFIELDS( const FIELDS : String) : TINDEXDEF Function FindInstanceOf( AClass : TClass; AExact : Boolean; AStartAt : Int) : Int Function FINDITEM( VALUE : Int; KIND : TFINDITEMKIND) : TMENUITEM function FindItemId( Id : Int) : TCollectionItem Function FindKey( const KeyValues : array of const) : Boolean Function FINDLAST : BOOLEAN Function FindLineControl( ComponentType, ControlType : DWORD) : TJclMixerLineControl Function FindModuleClass( AClass : TComponentClass) : TComponent Function FindModuleName( const AClass : string) : TComponent Function FINDNEXT : BOOLEAN function FindNext: Int; function FindNext2(var F: TSearchRec): Int) Function FindNextPage( CurPage : TTabSheet; GoForward, CheckTabVisible : Boolean) : TTabSheet Function FindNextToSelect : TTreeNode Function FINDPARAM( const VALUE : String) : TPARAM Function FindParam( const Value : WideString) : TParameter Function FINDPRIOR : BOOLEAN Function FindResource( ModuleHandle : HMODULE; ResourceName, ResourceType : PChar) : TResourceHandle Function FindSession( const SessionName : string) : TSession function FindStringResource(Ident: Int): string) Function FindText(const SearchStr:string;StartPos,Length:Int;Options:TSearchTypes):Int Function FindUnusedFileName( const FileName, FileExt, Suffix : AnsiString) : AnsiString function FindVCLWindow(const Pos: TPoint): TWinControl; function FindWindow(C1, C2: PChar): Longint; Function FindInPaths(const fileName,paths: String): String; Function Finger : String Function First : TClass Function First : TComponent Function First : TObject Function FirstDelimiter( const delimiters : string; const Str : String) : Int; Function FirstDelimiter1(const delimiters:WideString; const Str : WideString) : Int; Function FirstInstance( const ATitle : string) : Boolean Function FloatPoint( const X, Y : Float) : TFloatPoint; Function FloatPoint1( const P : TPoint) : TFloatPoint; Function FloatPtInRect( const Rect : TFloatRect; const P : TFloatPoint) : Boolean Function FloatRect( const ALeft, ATop, ARight, ABottom : Double) : TFloatRect; Function FloatRect1( const Rect : TRect) : TFloatRect; Function FloatsEqual( const X, Y : Float) : Boolean Function FloatToBin(const D: Double): string; //doubletohex -> hextobin! in buffer Function FloatToCurr( Value : Extended) : Currency Function FloatToDateTime( Value : Extended) : TDateTime Function FloatToStr( Value : Extended) : string; Function FloatToStr(e : Extended) : String; Function FloatToStrF(Value:Extended;Format:TFloatFormat;Precision,Digits:Int):string; function FloatToStrF(Value:Extended;Format:TFloatFormat;Precision:Int;Digits:Int): string) Function FloatToStr2( Value : Extended; Format : TFloatFormat; Precision, Digits : Int; FormatSettings : TFormatSettings) : string; Function FloatToStrFS(Value:Extended;Format:TFloatFormat;Precision,Digits:Int;FormatSettings:TFormatSettings):string; function FloatToText(BufferArg:PChar;const Value:Extended;ValueType:TFloatValue;Format:TFloatFormat;Precision,Digits: Int):Int) Function Floor( const X : Extended) : Int Function FloorInt( Value : Int; StepSize : Int) : Int Function FloorJ( const X : Extended) : Int Function Flush( const Count : Cardinal) : Boolean Function Flush(var t: Text): Int function FmtLoadStr(Ident: Int; const Args: array of const): string) function FOCUSED:BOOLEAN Function ForceBackslash( const PathName : string) : string Function ForceDirectories( const Dir : string) : Boolean Function ForceDirectories( Dir : string) : Boolean Function ForceDirectories( Name : string) : Boolean Function ForceInBox( const Point : TPoint; const Box : TRect) : TPoint Function ForceInRange( A, Min, Max : Int) : Int Function ForceInRangeR( const A, Min, Max : Double) : Double Function ForEach( AProc : TBucketProc; AInfo : Pointer) : Boolean; Function ForEach1( AEvent : TBucketEvent) : Boolean; Function ForegroundTask: Boolean function Format(const Format: string; const Args: array of const): string; Function FormatBcd( const Format : string; Bcd : TBcd) : string FUNCTION FormatBigInt(s: string): STRING; function FormatByteSize(const bytes: int64): string; function FormatBuf(var Buffer:PChar;BufLen:Card;const Format:string;FmtLen:Card;const Args:array of const):Cardinal Function FormatCount(iCount:Int;const sSingular:string;const sPlural:string):string Function FormatCurr( Format : string; Value : Currency) : string; function FormatCurr(const Format: string; Value: Currency): string) Function FormatDateTime( Format : string; DateTime : TDateTime) : string; function FormatDateTime(const fmt: string; D: TDateTime): string; Function FormatFloat( Format : string; Value : Extended) : string; function FormatFloat(const Format: string; Value: Extended): string) Function FormatFloat( Format : string; Value : Extended) : string; Function FormatFloat2(Format:string;Value:Extended;FormatSettings:TFormatSettings):string; Function FormatCurr( Format : string; Value : Currency) : string; Function FormatCurr2(Format: string; Value : Currency; FormatSettings : TFormatSettings) : string; Function Format2(const Format:string;const Args:array of const;const FSettings:TFormatSettings): string FUNCTION FormatInt(i: Int): STRING; FUNCTION FormatInt64(i: int64): STRING; Function FormatMaskText( const EditMask : string; const Value : string) : string Function FormatValue( AValue : Cardinal) : string Function FormatVersionString( const HiV, LoV : Word) : string; Function FormatVersionString1( const Major, Minor, Build, Revision : Word) : string; function Frac(X: Extended): Extended); Function FreeResource( ResData : HGLOBAL) : LongBool Function FromCommon( const AValue : Double) : Double function FromCommon(const AValue: Double): Double; Function FTPGMTDateTimeToMLS( const ATimeStamp:TDateTime; const AIncludeMSecs : Boolean): String Function FTPLocalDateTimeToMLS( const ATimeStamp:TDateTime; const AIncludeMSecs : Boolean) : String Function FTPMLSToGMTDateTime( const ATimeStamp : String) : TDateTime Function FTPMLSToLocalDateTime( const ATimeStamp : String) : TDateTime Function FuncIn(AValue: Variant; ASet: Variant): Boolean; //Function Funclist Size is: 6444 of mX3.9.8.9 Function FutureValue(const Rate:Extended;NPeriods:Int;const Payment,PresentValue:Extended;PaymentTime:TPaymentTime):Extended Function FullTimeToStr(SUMTime: TDateTime): string;; Function Gauss( const x, Spread : Double) : Double function Gauss(const x,Spread: Double): Double; Function GCD(x, y : LongInt) : LongInt; Function GCDJ( X, Y : Cardinal) : Cardinal Function GDAL: LongWord Function GdiFlush : BOOL Function GdiSetBatchLimit( Limit : DWORD) : DWORD Function GdiGetBatchLimit : DWORD Function GenerateHeader : TIdHeaderList Function GeometricMean( const X : TDynFloatArray) : Float Function Get( AURL : string) : string; Function Get2( AURL : string) : string; Function Get8087CW : Word function GetActiveOleObject(const ClassName: String): IDispatch; Function GetAliasDriverName( const AliasName : string) : string Function GetAPMBatteryFlag : TAPMBatteryFlag Function GetAPMBatteryFullLifeTime : DWORD Function GetAPMBatteryLifePercent : Int Function GetAPMBatteryLifeTime : DWORD Function GetAPMLineStatus : TAPMLineStatus Function GetAppdataFolder : string Function GetAppDispatcher : TComponent function GetArrayLength: Int; Function GetASCII: string; Function GetASCIILine: string; Function GetAsHandle( Format : Word) : THandle function GetAssociatedProgram(const Extension:string;var Filename,Description:string): bool; Function GetBackupFileName( const FileName : string) : string function GetBaseAddress(PID:DWORD):DWORD; //Process API Function GetBBitmap( Value : TBitmap) : TBitmap Function GetBIOSCopyright : string Function GetBIOSDate : TDateTime Function GetBIOSExtendedInfo : string Function GetBIOSName : string Function getBitmap(apath: string): TBitmap; Function GetBitmap( Index : Int; Image : TBitmap) : Boolean //object Function getBitMapObject(const bitmappath: string): TBitmap; Function GetButtonState( Button : TPageScrollerButton) : TPageScrollerButtonState Function GetCapsLockKeyState : Boolean function GetCaptureControl: TControl; Function GetCDAudioTrackList( var TrackList : TJclCdTrackInfoArray; Drive : Char) : TJclCdTrackInfo; Function GetCDAudioTrackList1( TrackList : TStrings; IncludeTrackType : Boolean; Drive : Char) : string; Function GetCdInfo( InfoType : TJclCdMediaInfo; Drive : Char) : string Function GetChangedText( const Text : string; SelStart, SelLength : Int; Key : Char) : string Function GetClientThread( ClientSocket : TServerClientWinSocket) : TServerClientThread Function GetClockValue : Int64 function getCmdLine: PChar; function getCmdShow: Int; function GetCPUSpeed: Double; Function GetColField( DataCol : Int) : TField Function GetColorBlue( const Color : TColor) : Byte Function GetColorFlag( const Color : TColor) : Byte Function GetColorGreen( const Color : TColor) : Byte Function GetColorRed( const Color : TColor) : Byte Function GetComCtlVersion : Int Function GetComPorts: TStringlist; Function GetCommonAppdataFolder : string Function GetCommonDesktopdirectoryFolder : string Function GetCommonFavoritesFolder : string Function GetCommonFilesFolder : string Function GetCommonProgramsFolder : string Function GetCommonStartmenuFolder : string Function GetCommonStartupFolder : string Function GetComponent( Owner, Parent : TComponent) : TComponent Function GetConnectionRegistryFile( DesignMode : Boolean) : string Function GetCookiesFolder : string Function GetCPUSpeed( var CpuSpeed : TFreqInfo) : Boolean Function GetCurrent : TFavoriteLinkItem Function GetCurrent : TListItem Function GetCurrent : TTaskDialogBaseButtonItem Function GetCurrent : TToolButton Function GetCurrent : TTreeNode Function GetCurrent : WideString Function GetCurrentDir : string function GetCurrentDir: string) Function GetCurrentFolder : string Function GETCURRENTRECORD( BUFFER : PCHAR) : BOOLEAN Function GetCurrentProcessId : TIdPID Function GetCurrentThreadHandle : THandle Function GetCurrentThreadID: LongWord; stdcall; Function GetCustomHeader( const Name : string) : String Function GetDataItem( Value : Pointer) : Longint Function GetDataLinkFiles( FileNames : TWideStrings; Directory : string) : Int; Function GetDataLinkFiles1( FileNames : TStrings; Directory : string) : Int; Function GETDATASIZE : Int Function GetDC(hdwnd: HWND): HDC; Function GetDefaultFileExt( const MIMEType : string) : string Function GetDefaults : Boolean Function GetDefaultSchemaName : WideString Function GetDefaultStreamLoader : IStreamLoader Function GetDesktopDirectoryFolder : string Function GetDesktopFolder : string Function GetDFAState( oStates : TList) : TniRegularExpressionState Function GetDirectorySize( const Path : string) : Int64 Function GetDisplayWidth : Int Function GetDLLVersion(const DLLName:string;var pdwMajor, pdwMinor:Int) : Boolean Function GetDomainName : string Function GetDriverRegistryFile( DesignMode : Boolean) : string function GetDriveType(rootpath: pchar): cardinal; Function GetDriveTypeStr( const Drive : Char) : string Function GetEnumerator : TFavoriteLinkItemsEnumerator Function GetEnumerator : TListItemsEnumerator Function GetEnumerator : TTaskDialogButtonsEnumerator Function GetEnumerator : TToolBarEnumerator Function GetEnumerator : TTreeNodesEnumerator Function GetEnumerator : TWideStringsEnumerator Function GetEnvVar( const VarName : string) : string Function GetEnvironmentVar( const AVariableName : string) : string Function GetEnvironmentVariable( const VarName : string) : string Function GetEnvironmentVar(const Name string; var Value:string;Expand:Boolean): Bool Function GetEnvironmentVars( const Vars : TStrings; Expand : Boolean) : Boolean Function getEnvironmentString: string; Function GetExceptionHandler : TObject Function GetFavoritesFolder : string Function GetFieldByName( const Name : string) : string Function GetFieldInfo(const Origin: Widestring;var FieldInfo TFieldInfo): Boolean Function GetFieldValue( ACol : Int) : string Function GetFileAgeCoherence( const FileName : string) : Boolean Function GetFileCreation( const FileName : string) : TFileTime Function GetFileCreationTime( const Filename : string) : TDateTime Function GetFileInformation( const FileName : string) : TSearchRec Function GetFileLastAccess( const FileName : string) : TFileTime Function GetFileLastWrite( const FileName : string) : TFileTime Function GetFileList(FileList: TStringlist; apath: string): TStringlist; Function GetFileList1(apath: string): TStringlist; Function GetFileMIMEType( const AFileName : string) : string Function GetFileSize( const FileName : string) : Int64 Function GetFileVersion( AFileName : string) : Cardinal Function GetFileVersion( const AFilename : string) : Cardinal Function GetFileSize2(Handle: Int; x: Int): Int; stdcall; Function GetFileDate(aFile:string; aWithTime:Boolean):string; Function GetFileCount(adirmask: string): Int; //files count in directory! Function GetFilterData( Root : PExprNode) : TExprData Function getFirstChild : LongInt Function getFirstChild : TTreeNode Function GetFirstDelimitedToken( const cDelim : char; const cStr : string) : string Function GetFirstNode : TTreeNode Function GetFontsFolder : string Function GetFormulaValue( const Formula : string) : Extended Function GetFreePageFileMemory : Int Function GetFreePhysicalMemory : Int Function GetFreeSystemResources( const ResourceType : TFreeSysResKind) : Int; Function GetFreeSystemResources1 : TFreeSystemResources; Function GetFreeVirtualMemory : Int Function GetFromClipboard : Boolean Function GetFullURI( const AOptionalFileds : TIdURIOptionalFieldsSet) : String Function GetGBitmap( Value : TBitmap) : TBitmap Function GetGMTDateByName( const AFileName : TIdFileName) : TDateTime Function GetGroupState( Level : Int) : TGroupPosInds Function GetHandle : HWND Function GETHELPCONTEXT( VALUE : Int; BYCOMMAND : BOOLEAN) : THELPCONTEXT function GetHexArray(ahexdig: THexArray): THexArray; Function GetHighLightColor( const Color : TColor; Luminance : Int) : TColor function GetHINSTANCE: longword; Function GetHistoryFolder : string Function GetHitTestInfoAt( X, Y : Int) : THitTests function getHMODULE: longword; Function GetHostByName(const AComputerName: String): String; Function GetHostName : string Function getHostIP: string; Function GetHotSpot : TPoint Function GetHueBitmap( Value : TBitmap) : TBitmap Function GetImageBitmap : HBITMAP Function GETIMAGELIST : TCUSTOMIMAGELIST Function GetIncome( const aNetto : Currency) : Currency Function GetIncome( const aNetto : Extended) : Extended Function GetIncome( const aNetto : Extended): Extended Function GetIncome(const aNetto : Extended) : Extended function GetIncome(const aNetto: Currency): Currency Function GetIncome2( const aNetto : Currency) : Currency Function GetIncome2( const aNetto : Currency): Currency Function getIndex_Attrs( tag : string; var idx : Int; var Attrs : string) : string Function GETINDEXFORFIELDS( const FIELDS : String; CASEINSENSITIVE : BOOLEAN) : TINDEXDEF Function GetIndexForOrderBy( const SQL : WideString; DataSet : TDataSet) : TIndexDef Function GetInstRes(Instance:THandle;ResType:TResType;const Name:string;Width:Int;LoadFlags:TLoadResources;MaskColor:TColor):Bool; Function GetInstRes1(Instance:THandle;ResType:TResType;ResID:DWORD;Width:Int;LoadFlags:TLoadResources;MaskColor:TColor):Bool; Function GetIntelCacheDescription( const D : Byte) : string Function GetInteractiveUserName : string Function GetInternetCacheFolder : string Function GetInternetFormattedFileTimeStamp( const AFilename : String) : String Function GetIPAddress( const HostName : string) : string Function GetIP( const HostName : string) : string Function GetIPHostByName(const AComputerName: String): String; Function GetIsAdmin: Boolean; Function GetItem( X, Y : Int) : LongInt Function GetItemAt( X, Y : Int) : TListItem Function GetItemHeight(Font: TFont): Int; Function GetItemPath( Index : Int) : string Function GetKeyFieldNames( List : TStrings) : Int; Function GetKeyFieldNames1( List : TWideStrings) : Int; Function GetKeyState( const VirtualKey : Cardinal) : Boolean Function GetLastChild : LongInt Function GetLastChild : TTreeNode Function GetLastDelimitedToken( const cDelim : char; const cStr : string) : string function GetLastError: Int Function GetLAT_CONV_FACTOR: double; //for WGS84 power(1 - 1 / 298.257223563, 2); Function GetLinesCount(sFileName : String): Int; Function GetLoader( Ext : string) : TBitmapLoader Function GetLoadFilter : string Function GetLocalComputerName : string Function GetLocaleChar( Locale, LocaleType : Int; Default : Char) : Char Function GetLocaleStr( Locale, LocaleType : Int; Default : string) : string Function GetLocalUserName : string Function GetLoginUsername : WideString function getLongDayNames: string) Function GetLongHint(const hint: string): string function getLongMonthNames: string) Function GetMacAddresses( const Machine : string; const Addresses : TStrings) : Int Function GetMainAppWndFromPid( PID : DWORD) : HWND Function GetMapX(C_form,apath: string; const Data: string): boolean; //c_form: [html/json/xml] //if GetMAPX('html',ExePath+'cologne2mapX.html','cathedral cologne then Procedure GetGEOMap(C_form,apath: string; const Data: string); Function GetMapXGeoReverse(C_form: string; const lat,long: string): string; //if GetMapXGeoReverse('XML',topPath,'47.0397826','7.62914761277888 then Function GetGeoCode(C_form,apath: string; const data: string; sfile: boolean): string; Function GetMaskBitmap : HBITMAP Function GetMaxAppAddress : Int Function GetMciErrorMessage( const MciErrNo : MCIERROR) : string Function GetMemoryLoad : Byte Function GetMIMEDefaultFileExt( const MIMEType : string) : TIdFileName Function GetMIMETypeFromFile( const AFile : string) : string Function GetMIMETypeFromFile( const AFile : TIdFileName) : string Function GetMinAppAddress : Int Function GetModule : TComponent Function GetModuleHandle( ModuleName : PChar) : HMODULE Function GetModuleName( Module : HMODULE) : string Function GetModulePath( const Module : HMODULE) : string Function GetModuleFileName(Module: Int; Filename: PChar;Size: Int): Int; stdcall; Function GetMorseID(InChar : Char): Word;; Function GetMorseString2(InChar : Char): string;; Function GetMorseLine(dots: boolean): string;; //whole table! {1 or dots} Function GetMorseTable(dots: boolean): string;; //whole table! Function GetMorseSign(InChar : Char): string;; Function GetCommandLine: PChar; stdcall; Function GetMonochromeBitmap( Value : TBitmap) : TBitmap Function GetMultiN(aval: Int): string; Function GetName : String Function GetNearestItem( Point : TPoint; Direction : TSearchDirection) : TListItem Function GetNethoodFolder : string Function GetNext : TTreeNode Function GetNextChild( Value : LongInt) : LongInt Function GetNextChild( Value : TTreeNode) : TTreeNode Function GetNextDelimitedToken( const cDelim : char; var cStr : String) : String Function GetNextItem(StartItem:TListItem;Direction:TSearchDirection;States:TItemStates):TListItem Function GetNextPacket : Int Function getNextSibling : TTreeNode Function GetNextVisible : TTreeNode Function GetNode( ItemId : HTreeItem) : TTreeNode Function GetNodeAt( X, Y : Int) : TTreeNode Function GetNodeDisplayWidth( Node : TOutlineNode) : Int function GetNumberOfProcessors: longint; Function GetNumLockKeyState : Boolean Function GetObjectProperty( Instance : TPersistent; const PropName : string) : TObject Function GetOnlyTransitionOn( cChar : char) : TniRegularExpressionState Function GetOptionalParam( const ParamName : string) : OleVariant Function GetOSName: string; Function GetOSVersion: string; Function GetOSNumber: string; Function GetOsVersionInfo: TOSVersionInfo; //thx to wischnewski Function GetPackageModuleHandle( PackageName : PChar) : HMODULE function GetPageSize: Cardinal; Function GetParameterFileName : string Function GetParams( var OwnerData : OleVariant) : OleVariant Function GETPARENTCOMPONENT : TCOMPONENT Function GetParentForm(control: TControl): TForm Function GETPARENTMENU : TMENU Function GetPassword : Boolean Function GetPassword : string Function GetPersonalFolder : string Function GetPidFromProcessName( const ProcessName : string) : DWORD function getPI: extended; //of const PI math Function GetPixel(dc:HDC; PixelCoords.X: TPoint, PixelCoords.Y: TPoint); Function GetPosition : TPoint Function GetPrev : TTreeNode Function GetPrevChild( Value : LongInt) : LongInt Function GetPrevChild( Value : TTreeNode) : TTreeNode Function getPrevSibling : TTreeNode Function GetPrevVisible : TTreeNode Function GetPrinthoodFolder : string Function GetPrivilegeDisplayName( const PrivilegeName : string) : string Function getProcessList: TStrings; Function GetProcessId : TIdPID Function GetProcessNameFromPid( PID : DWORD) : string Function GetProcessNameFromWnd( Wnd : HWND) : string Function GetProcessMemoryInfo(Process:THandle;ppsmemCounters:TProcessMemoryCounters;cb:DWORD):BOOL Function getProcessAllMemory(ProcessID : DWORD): TProcessMemoryCounters; Function getProcessMemoryInfo2(ProcessID : DWORD): TProcessMemoryCounters; Function GetProgramFilesFolder : string Function GetProgramsFolder : string Function GetProxy : string Function GetQuoteChar : WideString Function GetQrCode4(Width,Height:Word; Correct_Level:string;const Data:string;aformat:string):TLinearBitmap; Function GetQrCodetoFile(Width,Height:Word;Correct_Level:string;const Data:string;aformat:string):TLinearBitmap; Function GetRate : Double Function getPerfTime: string; Function getRuntime: string; Function GetRBitmap( Value : TBitmap) : TBitmap Function GetReadableName( const AName : string) : string Function GetRecentDocs : TStringList Function GetRecentFolder : string Function GetRecords( Count : Int; out RecsOut : Int; Options : Int) : OleVariant; Function GetRecords1(Count:Int;out RecsOut:Int;Options:Int;const CommandText:WideString;var Params,OwnerData : OleVariant):OleVariant; Function GetRecordset(const CommandText: WideString;ConnectionString:WideString):_Recordset Function GetRegisteredCompany : string Function GetRegisteredOwner : string Function GetResource(ResType:TResType;const Name:string;Width:Int;LoadFlags:TLoadResources;MaskColor:TColor:Bool Function GetResourceName( ObjStream : TStream; var AName : string) : Boolean Function GetResponse( const AAllowedResponses : array of SmallInt) : SmallInt; Function GetResponse1( const AAllowedResponse : SmallInt) : SmallInt; Function GetRValue( rgb : DWORD) : Byte Function GetGValue( rgb : DWORD) : Byte Function GetBValue( rgb : DWORD) : Byte Function GetCValue( cmyk : COLORREF) : Byte Function GetMValue( cmyk : COLORREF) : Byte Function GetYValue( cmyk : COLORREF) : Byte Function GetKValue( cmyk : COLORREF) : Byte Function CMYK( c, m, y, k : Byte) : COLORREF Procedure GetScreenShot(var ABitmap : TBitmap); Function GetOSName: string; Function GetProcAddress( hModule : HMODULE; lpProcName : LPCSTR) : FARPROC Function GetProcAddress(Module : HMODULE; Proc : PChar): Dword Function GetSafeCallExceptionMsg : String Function GetSaturationBitmap( Value : TBitmap) : TBitmap Function GetSaveFilter : string Function GetSaver( Ext : string) : TBitmapLoader Function GetScrollLockKeyState : Boolean Function GetSearchString : string Function GetSelections( AList : TList) : TTreeNode function GETSELTEXTBUF(BUFFER:PCHAR;BUFSIZE:Int):Int Function GetSendToFolder : string Function GetServer : IAppServer Function GetServerList : OleVariant Function GetShadowColor( const Color : TColor; Luminance : Int) : TColor Function GetShellProcessHandle : THandle Function GetShellProcessName : string Function GetShellVersion : Cardinal function getShortDayNames: string) Function GetShortHint(const hint: string): string function getShortMonthNames: string) Function GetSizeOfFile( const FileName : string) : Int64; Function GetSizeOfFile1( Handle : THandle) : Int64; Function GetStdHandle(nStdHandle: Int): Int; stdcall; Function GetStartmenuFolder : string Function GetStartupFolder : string Function GetStringProperty( Instance : TPersistent; const PropName : string) : WideString Function GetSuccessor( cChar : char) : TniRegularExpressionState Function GetSwapFileSize : Int Function GetSwapFileUsage : Int Function GetSystemLocale : TIdCharSet Function GetSystemMetrics( nIndex : Int) : Int Function GetSystemPathSH(Folder: Int): TFilename ; Function GetTableNameFromQuery( const SQL : Widestring) : Widestring Function GetTableNameFromSQL( const SQL : WideString) : WideString Function GetTableNameFromSQLEx(const SQL:WideString; IdOption:IDENTIFIEROption):WideString Function GetTasksList( const List : TStrings) : Boolean Function getTeamViewerID: string; Function GetTemplatesFolder : string Function GetText : PwideChar function GetText:PChar Function GetTextBuf( Buffer : PChar; BufSize : Int) : Int function GETTEXTBUF(BUFFER:PCHAR;BUFSIZE:Int):Int Function GetTextItem( const Value : string) : Longint function GETTEXTLEN:Int Function GetThreadLocale: Longint; stdcall Function GetCurrentThreadID: LongWord; stdcall; Function GetTickCount : Cardinal Function GetTickDiff( const AOldTickCount, ANewTickCount : Cardinal) : Cardinal Function GetTicketNr : longint Function GetTime : Cardinal Function GetTime : TDateTime Function GetTimeout : Int Function GetTimeStr: String Function GetTimeString: String Function GetTimeZoneInformation(var lpTimeZoneInformation: TTimeZoneInformation): DWORD Ex: if GetTimeZoneInformation(tzi) >0 then writeln(itoa(tzi.bias)); Function GetTodayFiles(startdir, amask: string): TStringlist; Function getTokenCounts : Int Function GetTotalPageFileMemory : Int Function GetTotalPhysicalMemory : Int Function GetTotalVirtualMemory : Int Function GetUniqueFileName( const APath, APrefix, AExt : String) : String Function GetUseNowForDate : Boolean Function GetUserDomainName( const CurUser : string) : string Function GetUserName : string Function GetUserName: string; Function GetUserNameAPI( lpBuffer : PChar; var nSize : DWORD) : BOOL; Function GetUserObjectName( hUserObject : THandle) : string Function GetValueBitmap( Value : TBitmap) : TBitmap Function GetValueMSec : Cardinal Function GetValueStr : String Function GetVersion: int; Function GetVersionString(FileName: string): string; Function getVideoDrivers: string; Function GetVisibleNode( Index : LongInt) : TOutlineNode Function GetVolumeFileSystem( const Drive : string) : string Function GetVolumeName( const Drive : string) : string Function GetVolumeSerialNumber( const Drive : string) : string Function GetWebAppServices : IWebAppServices Function GetWebRequestHandler : IWebRequestHandler Function GetWindowCaption( Wnd : HWND) : string Function GetWindowDC(hdwnd: HWND): HDC; Function GetWindowIcon( Wnd : HWND; LargeIcon : Boolean) : HICON Function GetWindowRect(hwnd: HWND; arect: TRect): Boolean Function GetWindowsComputerID : string function GetWindowsDirectory(lpBuffer: PChar; uSize: longword): longword; Function GetWindowsFolder : string Function GetWindowsServicePackVersion : Int Function GetWindowsServicePackVersionString : string Function GetWindowsSystemFolder : string Function GetWindowsTempFolder : string Function GetWindowsUserID : string Function GetWindowsVersion : TWindowsVersion Function GetWindowsVersionString : string Function GmtOffsetStrToDateTime( S : string) : TDateTime Function GMTToLocalDateTime( S : string) : TDateTime Function GotoKey : Boolean Function GradToCycle( const Grads : Extended) : Extended Function GradToDeg( const Grads : Extended) : Extended Function GradToDeg( const Value : Extended) : Extended; Function GradToDeg1( const Value : Double) : Double; Function GradToDeg2( const Value : Single) : Single; Function GradToRad( const Grads : Extended) : Extended Function GradToRad( const Value : Extended) : Extended; Function GradToRad1( const Value : Double) : Double; Function GradToRad2( const Value : Single) : Single; Function Gray32( const Intensity : Byte; const Alpha : Byte) : TColor32 Function GreenComponent( const Color32 : TColor32) : Int function GUIDToString(const GUID: TGUID): string) Function HandleAllocated : Boolean function HandleAllocated: Boolean; Function HandleRequest : Boolean Function HandleRequest( Request : TWebRequest; Response : TWebResponse) : Boolean Function HarmonicMean( const X : TDynFloatArray) : Float Function HasAsParent( Value : TTreeNode) : Boolean Function HASCHILDDEFS : BOOLEAN Function HasCurValues : Boolean Function HasExtendCharacter( const s : UTF8String) : Boolean Function HasFormat( Format : Word) : Boolean Function HashValue( AStream : TStream) : T5x4LongWordRecord; Function HashValue(AStream : TStream) : T4x4LongWordRecord Function HashValue(AStream: TStream): LongWord Function HashValue(AStream: TStream): Word Function HashValue1(AStream TStream; const ABeginPos, AEndPos: Int64) : T5x4LongWordRecord; Function HashValue1(AStream : TStream): T4x4LongWordRecord Function HashValue128(const ASrc: string): T4x4LongWordRecord; Function HashValue128Stream(AStream: TStream): T4x4LongWordRecord; Function HashValue16( const ASrc : string) : Word; Function HashValue16stream( AStream : TStream) : Word; Function HashValue32( const ASrc : string) : LongWord; Function HashValue32Stream( AStream : TStream) : LongWord; Function HasMergeConflicts : Boolean Function hasMoreTokens : boolean Function HASPARENT : BOOLEAN function HasParent: Boolean Function HasTransaction( Transaction : TDBXTransaction) : Boolean Function HasUTF8BOM( S : TStream) : boolean; Function HasUTF8BOM1( S : AnsiString) : boolean; Function Haversine( X : Float) : Float Function Head( s : string; const subs : string; var tail : string) : string function HELPCOMMAND(COMMAND:Int;DATA:LONGINT):BOOLEAN function HELPCONTEXT(CONTEXT:THELPCONTEXT):BOOLEAN function HELPJUMP(JUMPID:STRING):BOOLEAN Function HeronianMean( const a, b : Float) : Float function HexStrToStr(Value: string): string; function HexToBin(Text,Buffer:PChar; BufSize:Int):Int; function HexToBin2(HexNum: string): string; Function HexToDouble( const Hex : string) : Double function HexToInt(hexnum: string): LongInt; function HexToStr(Value: string): string; Function HexifyBlock( var Buffer, BufferSize : Int) : string function Hi(vdat: word): byte; function HiByte(W: Word): Byte) function High: Int64; Function HighlightCell(DataCol,DataRow:Int;const Value:string;AState:TGridDrawState):Bool function HINSTANCE: longword; function HiWord(l: DWORD): Word) function HMODULE: longword; Function HourOf( const AValue : TDateTime) : Word Function HourOfTheDay( const AValue : TDateTime) : Word Function HourOfTheMonth( const AValue : TDateTime) : Word Function HourOfTheWeek( const AValue : TDateTime) : Word Function HourOfTheYear( const AValue : TDateTime) : Word Function HoursBetween( const ANow, AThen : TDateTime) : Int64 Function HourSpan( const ANow, AThen : TDateTime) : Double Function HSLToRGB1( const H, S, L : Single) : TColor32; Function HTMLDecode( const AStr : String) : String Function HTMLEncode( const AStr : String) : String Function HTMLEscape( const Str : string) : string Function HtmlTable(DataSet:TDataSet;DataSetHandler:TDSTableProducer;MaxRows:Int):string Function HTTPDecode( const AStr : String) : string Function HTTPEncode( const AStr : String) : string Function Hypot( const X, Y : Extended) : Extended Function IBMax( n1, n2 : Int) : Int Function IBMin( n1, n2 : Int) : Int Function IBRandomString( iLength : Int) : String Function IBRandomInt( iLow, iHigh : Int) : Int Function IBStripString( st : String; CharsToStrip : String) : String Function IBFormatIdentifier( Dialect : Int; Value : String) : String Function IBFormatIdentifierValue( Dialect : Int; Value : String) : String Function IBExtractIdentifier( Dialect : Int; Value : String) : String Function IBQuoteIdentifier( Dialect : Int; Value : String) : String Function IBAddIBParamSQLForDetail(Params:TParams;SQL:string;Native:Boolean;Dialect:Int):string Procedure IBDecomposeDatabaseName(DatabaseName:String;var ServerName,Protocol,DatabasePath:String) Function RandomString( iLength : Int) : String; Function RandomInt( iLow, iHigh : Int) : Int; Function StripString( st : String; CharsToStrip : String) : String; FUNCTION Strip(const SubString: String; MainString: String): String; function StripTags(const S: string): string; //<''> of HTML function SizeToString(size : Int64; const unitStr : String) : String; FUNCTION NumbertoString(No: Word): String; Function FormatIdentifier( Dialect : Int; Value : String) : String; Function FormatIdentifierValue( Dialect : Int; Value : String) : String; Function ExtractIdentifier( Dialect : Int; Value : String) : String; Function QuoteIdentifier( Dialect : Int; Value : String) : String; Function AddIBParamSQLForDetail(Params:TParams;SQL:string;Native:Boolean;Dialect:Int):string; Procedure DecomposeDatabaseName(DatabaseName:String;var ServerName,Protocol,DatabasePath:String; function NextSQLToken(var p: PChar; var Token: String; CurSection: TSQLToken): TSQLToken; Function IconToBitmap( Ico : HICON) : TBitmap Function IconToBitmap2( Ico : HICON; Size : Int; TransparentColor : TColor) : TBitmap Function IconToBitmap3( Ico : HICON; Size : Int; TransparentColor : TColor) : TBitmap function IdentToCharset(const Ident: string; var Charset: Longint): Boolean) function IdentToColor(const Ident: string; var Color: Longint): Boolean) function IdentToCursor(const Ident: string; var cursor: Longint): Boolean; Function IdGetDefaultCharSet : TIdCharSet function IDispatchInvoke(Self:IDispatch;ProperSet:Bool;const Name:String;Par:array of variant):variant Function IdPorts2 : TStringList Function IdToMib( const Id : string) : string Function IdSHA1Hash(apath: string): string; Function IdHashSHA1(apath: string): string; Function IfStr(const bCondition:boolean;const sTrue:string;const sFalse:string): string Function IfThen( AValue : Boolean; const ATrue : string; AFalse : string) : string; Function IfThenInt( AValue : Boolean; const ATrue : Int; AFalse : Int): Int;; Function IfThenDouble( AValue : Boolean; const ATrue : double; AFalse : double): double;; Function IfThenBool( AValue : Boolean; const ATrue : boolean; AFalse : boolean): boolean;; Function iif1( ATest : Boolean; const ATrue : Int; const AFalse : Int) : Int; Function iif2( ATest : Boolean; const ATrue : string; const AFalse : string) : string; Function iif3( ATest:Boolean; const ATrue: Boolean;const AFalse: Boolean): Boolean; function ImportTest(S1: string;s2:longint; s3:Byte; s4:word; var s5:string): string; Function IncDay( const AValue : TDateTime; const ANumberOfDays : Int) : TDateTime Function IncHour( const AValue : TDateTime; const ANumberOfHours : Int64) : TDateTime Function IncLimit( var B : Byte; const Limit : Byte; const Incr : Byte) : Byte; Function IncLimit1(var B:Shortint;const Limit:Shortint;const Incr:Shortint):Shortint; Function IncLimit2(var B:Smallint;const Limit:Smallint;const Incr:Smallint):Smallint; Function IncLimit3( var B : Word; const Limit : Word; const Incr : Word) : Word; Function IncLimit4( var B : Int; const Limit : Int; const Incr : Int) : Int; Function IncLimit5(var B:Cardinal;const Limit:Cardinal;const Incr:Cardinal):Cardinal; Function IncLimit6( var B : Int64; const Limit : Int64; const Incr : Int64) : Int64; Function IncLimitClamp( var B : Byte; const Limit : Byte; const Incr : Byte) : Byte; Function IncLimitClamp1(var B: Shortint;const Limit:Shortint;const Incr: Shortint): Shortint; Function IncLimitClamp2(var B:Smallint;const Limit:Smallint;const Incr: Smallint): Smallint; Function IncLimitClamp3( var B : Word; const Limit : Word; const Incr : Word) : Word; Function IncLimitClamp4( var B : Int; const Limit : Int; const Incr : Int) : Int; Function IncLimitClamp5(var B:Cardinal;const Limit:Cardinal; const Incr:Cardinal): Cardinal; Function IncLimitClamp6(var B: Int64;const Limit:Int64; const Incr:Int64):Int64; Function IncludeTrailingBackslash( S : string) : string function IncludeTrailingBackslash(const S: string): string) Function IncludeTrailingPathDelimiter( const APath : string) : string Function IncludeTrailingPathDelimiter( S : string) : string function IncludeTrailingPathDelimiter(const S: string): string) Function IncludeTrailingSlash( const APath : string) : string Function IncMilliSecond(const AValue:TDateTime;const ANumberOfMilliSeconds:Int64):TDateTime Function IncMinute(const AValue:TDateTime;const ANumberOfMinutes:Int64):TDateTime Function IncMonth( DateTime : TDateTime; NumberOfMonths : Int) : TDateTime function IncMonth(const DateTime: TDateTime; NumberOfMonths: Int): TDateTime) Function IncSecond(const AValue:TDateTime;const ANumberOfSeconds: nt64) : TDateTime Function IncWeek( const AValue : TDateTime; const ANumberOfWeeks : Int) : TDateTime Function IncYear( const AValue : TDateTime; const ANumberOfYears : Int) : TDateTime Function IndexOf( AClass : TClass) : Int Function IndexOf( AComponent : TComponent) : Int Function IndexOf( AObject : TObject) : Int Function INDEXOF( const ANAME : String) : Int Function IndexOf( const DisplayName : string) : Int Function IndexOf( const Item : TBookmarkStr) : Int Function IndexOf( const S : WideString) : Int Function IndexOf( const View : TJclFileMappingView) : Int Function INDEXOF( FIELD : TFIELD) : Int Function IndexOf( ID : LCID) : Int Function INDEXOF( ITEM : TMENUITEM) : Int Function IndexOf( Value : TListItem) : Int Function IndexOf( Value : TTreeNode) : Int function IndexOf(const S: string): Int; Function IndexOfName( const Name : WideString) : Int function IndexOfName(Name: string): Int; Function IndexOfObject( AObject : TObject) : Int function IndexofObject(AObject:tObject):Int Function IndexOfTabAt( X, Y : Int) : Int Function IndexStr( const AText : string; const AValues : array of string) : Int Function IndexText( const AText : string; const AValues : array of string): Int Function IndexOfInt( AList : TStringList; Value : Variant) : Int Function IndexOfFloat( AList : TStringList; Value : Variant) : Int Function IndexOfDate( AList : TStringList; Value : Variant) : Int Function IndexOfString( AList : TStringList; Value : Variant) : Int Function IndyCompareStr( const A1 : string; const A2 : string) : Int Function IndyGetHostName : string Function IndyInterlockedDecrement( var I : Int) : Int Function IndyInterlockedExchange( var A : Int; B : Int) : Int Function IndyInterlockedExchangeAdd( var A : Int; B : Int) : Int Function IndyInterlockedIncrement( var I : Int) : Int Function IndyLowerCase( const A1 : string) : string Function IndyStrToBool( const AString : String) : Boolean Function IndyUpperCase( const A1 : string) : string Function InitCommonControl( CC : Int) : Boolean Function InitTempPath : string Function InMainThread : boolean Function inOpArray( W : WideChar; sets : array of WideChar) : boolean Function Input: Text) Function InputBox( const ACaption, APrompt, ADefault : string) : string function InputBox(const ACaption:string;const APrompt:string;const ADefault:string): string) Function InputLn(const AMask:string;AEcho:Boolean;ATabWidth:Int;AMaxLineLength:Int): string Function InputQuery( const ACaption, APrompt : string; var Value : string) : Boolean function InputQuery(const ACaption:string; const APrompt:string; var Value: string):Boolean) Function InquireSignal( RtlSigNum : Int) : TSignalState Function InRangeR( const A, Min, Max : Double) : Boolean function Insert( Index : Int) : TCollectionItem Function Insert( Index : Int) : TComboExItem Function Insert( Index : Int) : THeaderSection Function Insert( Index : Int) : TListItem Function Insert( Index : Int) : TStatusPanel Function Insert( Index : Int) : TWorkArea Function Insert( Index : LongInt; const Text : string) : LongInt Function Insert( Sibling : TTreeNode; const S : string) : TTreeNode Function INSERTNEWLINEAFTER( AITEM : TMENUITEM) : Int Function INSERTNEWLINEBEFORE( AITEM : TMENUITEM) : Int Function InsertNode( Node, Sibling : TTreeNode; const S : string; Ptr : Pointer) : TTreeNode Function InsertObject( Index : LongInt; const Text : string; const Data : Pointer) : LongInt Function InsertObject( Sibling : TTreeNode; const S : string; Ptr : Pointer) : TTreeNode Function Instance : Longint function InstanceSize: Longint Function Int(e : Extended) : Extended; function Int64ToStr(i: Int64): String; Function IntToBcd( const AValue : Int) : TBcd Function Intensity( const Color32 : TColor32) : Int; Function Intensity( const R, G, B : Single) : Single; Function InterestPayment(const Rate:Extended;Period,NPeriods:Int;const PresentValue,FutureValue:Extended;PaymentTime :TPaymentTime):Extended Function InterestRate(NPeriods:Int;const Payment,PresVal,FutureVal:Extended;PaymentTime:TPaymentTime):Extended Function InternalDecodeDate(DateTime:TDateTime;var Year,Month,Day,DOW:Word):Boolean Function InternalRateOfReturn(const Guess:Extended;const CashFlows:array of Double):Extended Function InternalUpdateRecord( Tree : TUpdateTree) : Boolean Function IntersectRect( out Rect : TRect; const R1, R2 : TRect) : Boolean function IntersectRect(out Rect: TRect; const R1, R2: TRect): Boolean) Function IntMibToStr( const Value : string) : string Function IntPower( const Base : Extended; const Exponent : Int) : Extended Function IntToBin( Value : cardinal) : string Function IntToHex( Value : Int; Digits : Int) : string; function IntToHex(a: Int; b: Int): string; Function IntToHex64( Value : Int64; Digits : Int) : string; function IntToHex64(Value: Int64; Digits: Int): string) Function IntTo3Str( Value : Longint; separator: string) : string Function inttobool( aInt : LongInt) : Boolean function IntToStr(i: Int64): String; Function IntToStr64(Value: Int64): string) function IOResult: Int Function IPv6AddressToStr(const AValue: TIdIPv6Address): string function IPAddrToHostName(const IP: string): string; Function IsAccel(VK: Word; const Str: string): Boolean Function IsAddressInNetwork( Address : String) : Boolean Function IsAdministrator : Boolean Function IsAlias( const Name : string) : Boolean Function IsApplicationRunning( const AClassName, ApplName : string) : Boolean Function IsASCII( const AByte : Byte) : Boolean; Function IsASCIILDH( const AByte : Byte) : Boolean; Function IsAssembly(const FileName: string): Boolean; Function IsBcdNegative( const Bcd : TBcd) : Boolean Function IsBinary(const AChar : Char) : Boolean function IsConsole: Boolean) Function IsDelimiter( Delimiters, S : string; Index : Int) : Boolean function IsDelimiter(const Delimiters: string; const S: string; Index: Int): Boolean) Function IsDelphiDesignMode : boolean Function IsDelphiRunning : boolean Function IsDFAState : boolean Function IsDirectory( const FileName : string) : Boolean Function IsDomain( const S : String) : Boolean function IsDragObject(Sender: TObject): Boolean; Function IsEditing : Boolean Function ISEMPTY : BOOLEAN Function IsEqual( Value : TParameters) : Boolean Function ISEQUAL( VALUE : TPARAMS) : BOOLEAN function IsEqualGUID(const guid1, guid2: TGUID): Boolean) Function IsFirstNode : Boolean Function IsFloatZero( const X : Float) : Boolean Function IsFormatRegistered( Extension, AppID : string) : Boolean Function IsFormOpen(const FormName: string): Boolean; Function IsFQDN( const S : String) : Boolean Function IsGrayScale : Boolean Function IsHex( AChar : Char) : Boolean; Function IsHexString(const AString: string): Boolean; Function IsHostname( const S : String) : Boolean Function IsInfinite( const AValue : Double) : Boolean Function IsInLeapYear( const AValue : TDateTime) : Boolean Function IsInternet: boolean; Function IsLeadChar( ACh : Char) : Boolean Function IsLeapYear( Year : Word) : Boolean function IsLeapYear(Year: Word): Boolean) function IsLibrary: Boolean) Function ISLINE : BOOLEAN Function IsLinkedTo( DataSet : TDataSet) : Boolean Function ISLINKEDTO( DATASOURCE : TDATASOURCE) : BOOLEAN Function IsLiteralChar( const EditMask : string; Offset : Int) : Boolean Function IsMatch( const Pattern, Text : string) : Boolean //Grep like RegEx Function IsMainAppWindow( Wnd : HWND) : Boolean Function IsMediaPresentInDrive( Drive : Char) : Boolean function IsMemoryManagerSet: Boolean) Function IsMultiTableQuery( const SQL : WideString) : Boolean function IsMultiThread: Boolean) Function IsNumeric( AChar : Char) : Boolean; Function IsNumeric2( const AString : string) : Boolean; Function IsNTFS: Boolean; Function IsOctal( AChar : Char) : Boolean; Function IsOctalString(const AString: string) : Boolean; Function IsPathDelimiter( S : string; Index : Int) : Boolean function IsPathDelimiter(const S: string; Index: Int): Boolean) Function IsPM( const AValue : TDateTime) : Boolean Function IsPositiveFloatArray( const X : TDynFloatArray) : Boolean Function IsPortAvailable( ComNum : Cardinal) : Boolean; Function IsCOMPortReal( ComNum : Cardinal) : Boolean; Function IsCOM( ComNum : Cardinal) : Boolean; Function IsCOMPort: Boolean; Function IsPrimeFactor( const F, N : Cardinal) : Boolean Function IsPrimeRM( N : Cardinal) : Boolean //rabin miller Function IsPrimeTD( N : Cardinal) : Boolean //trial division Function IsPrivilegeEnabled( const Privilege : string) : Boolean Function ISqrt( const I : Smallint) : Smallint Function IsReadOnly(const Filename: string): boolean; Function IsRectEmpty( const Rect : TRect) : Boolean function IsRectEmpty(const Rect: TRect): Boolean) Function IsRelativePrime( const X, Y : Cardinal) : Boolean Function ISRIGHTTOLEFT : BOOLEAN function IsRightToLeft: Boolean Function IsSameDay( const AValue, ABasis : TDateTime) : Boolean Function ISSEQUENCED : BOOLEAN Function IsSystemModule( const Module : HMODULE) : Boolean Function IsSystemResourcesMeterPresent : Boolean Function IsTCPPortOpen(dwPort : Word; ipAddressStr: String): boolean; Function IsToday( const AValue : TDateTime) : Boolean function IsToday(const AValue: TDateTime): Boolean; Function IsTopDomain( const AStr : string) : Boolean Function IsUTF8LeadByte( Lead : Char) : Boolean Function IsUTF8String( const s : UTF8String) : Boolean Function IsUTF8TrailByte( Lead : Char) : Boolean Function ISVALIDCHAR( INPUTCHAR : CHAR) : BOOLEAN Function IsValidDate( const AYear, AMonth, ADay : Word) : Boolean Function IsValidDateDay( const AYear, ADayOfYear : Word) : Boolean Function IsValidDateMonthWeek(const AYear,AMonth,AWeekOfMonth,ADayOfWeek:Word): Bool Function IsValidDateTime(const AYear,AMonth,ADay,AHour,AMinute,ASecond,AMilliSecond:Word): Bool Function IsValidDateWeek( const AYear, AWeekOfYear, ADayOfWeek : Word) : Boolean Function IsValidIdent( Ident : string) : Boolean function IsValidIdent1(const Ident: string; AllowDots: Boolean): Boolean) Function IsValidIP( const S : String) : Boolean Function IsValidTime( const AHour, AMinute, ASecond, AMilliSecond : Word) : Boolean Function IsValidPNG(stream: TStream): Boolean; Function IsValidJPEG(stream: TStream): Boolean; Function IsValidISBN( const ISBN : AnsiString) : Boolean Function IsVariantManagerSet: Boolean; //deprecated; Function IsVirtualPcGuest : Boolean; Function IsVmWareGuest : Boolean; Function IsVCLControl(Handle: HWnd): Boolean; Function IsWhiteString( const AStr : String) : Boolean Function IsWindowResponding( Wnd : HWND; Timeout : Int) : Boolean Function IsWoW64: boolean; Function IsWin64: boolean; Function IsWow64String(var s: string): Boolean; Function IsWin64String(var s: string): Boolean; Function IsWindowsVista: boolean; Function isPowerof2(num: int64): boolean; Function powerOf2(exponent: Int): int64; function IsZero(const A: Extended; Epsilon: Extended): Boolean //overload; function IsZero1(const A: Double; Epsilon: Double): Boolean //overload; function IsZero2(const A: Single; Epsilon: Single): Boolean //overload; Function ItemAtPos( Pos : TPoint; IgnoreTabHeight : Boolean) : Int function ITEMATPOS(POS:TPOINT;EXISTING:BOOLEAN):Int Function ItemRect( Index : Int) : TRect function ITEMRECT(INDEX:Int):TRECT Function ItemWidth( Index : Int) : Int Function JavahashCode(val: string): Int; Function JosephusG(n,k: Int; var graphout: string): Int; Function JulianDateToDateTime( const AValue : Double) : TDateTime Function JustName(PathName : string) : string; //in path and ext Function JvMessageBox( const Text, Caption : string; Flags : DWORD) : Int; Function JvMessageBox1( const Text : string; Flags : DWORD) : Int; Function KeepAlive : Boolean Function KeysToShiftState(Keys: Word): TShiftState; Function KeyDataToShiftState(KeyData: Longint): TShiftState; Function KeyboardStateToShiftState2(const KeyboardState: TKeyboardState): TShiftState; Function KeyboardStateToShiftState: TShiftState; overload; Function Languages : TLanguages Function Last : TClass Function Last : TComponent Function Last : TObject Function LastDelimiter( Delimiters, S : string) : Int function LastDelimiter(const Delimiters: string; const S: string): Int) Function LastPos( const ASubstr : string; const AStr : string) : Int Function Latitude2WGS84(lat: double): double; Function LCM(m,n:longint):longint; Function LCMJ( const X, Y : Cardinal) : Cardinal Function Ldexp( const X : Extended; const P : Int) : Extended Function LeftStr( const AText : AnsiString; const ACount : Int) : AnsiString; Function LeftStr( const AText : WideString; const ACount : Int) : WideString; function Length: Int; Procedure LetFileList(FileList: TStringlist; apath: string); function lengthmp3(mp3path: string):Int; Function LineInRect( const P1, P2 : TPoint; const Rect : TRect) : Boolean; Function LineInRect1( const P1, P2 : TFloatPoint; const Rect : TFloatRect) : Boolean; function LinesCount(sfilename:string):extended; function TextFileLineCount(const FileName: string): Int; Function LineSegmentIntersection(const L1P1:TFloatPoint;L1P2:TFloatPoint;const L2P1:TFloatPoint; L2P2:TFloatPoint;var P:TFloatPoint):Boolean function LineStart(Buffer, BufPos: PChar): PChar function LineStart(Buffer, BufPos: PChar): PChar) function ListSeparator: char; function Ln(x: Extended): Extended; Function LnXP1( const X : Extended) : Extended function Lo(vdat: word): byte; Function LoadCursor(hInstance: HINST; lpCursorName: PChar): HCURSOR Function LoadedModulesList(const List:TStrings;ProcessID:DWORD;HandlesOnly:Boolean): Boolean Function LoadFileAsString( const FileName : string) : string Function LoadFromFile( const FileName : string) : TBitmapLoader function LoadFile(const FileName: TFileName): string; Function LoadLibraryEx(LibName: PChar; hFile: Longint; Flags: Longint): Longint; stdcall; Function LoadPackage(const Name: string): HMODULE Function LoadResource( ModuleHandle : HMODULE; ResHandle : TResourceHandle) : HGLOBAL Function LoadStr( Ident : Int) : string Function LoadString(Instance: Longint; IDent: Int; Buffer: PChar; Size: Int): Int; stdcall; Function LoadWideStr( Ident : Int) : WideString Function LOCATE(const KEYFIELDS:String;const KEYVALUES:VARIANT;OPTIONS:TLOCATEOPTIONS):BOOLEAN Function LockRegion(libOffset:Longint;cb:Largeint;dwLockType:Longint): HResult Function LockServer( fLock : LongBool) : HResult Function LockVolume( const Volume : string; var Handle : THandle) : Boolean Function Log( const X : Extended) : Extended Function Log10( const X : Extended) : Extended Function Log2( const X : Extended) : Extended function LogBase10(X: Float): Float; Function LogBase2(X: Float): Float; Function LogBaseN(Base, X: Float): Float; Function LogN( const Base, X : Extended) : Extended Function LogOffOS : Boolean Function LoginDialog( const ADatabaseName : string; var AUserName, APassword : string) : Boolean Function LoginDialogEx(const ADatabaseName:string;var AUserName,APassword:string;NameReadOnly:Bool):Bool; Function LongDateFormat: string; function LongTimeFormat: string; Function LongWordToFourChar( ACardinal : LongWord) : string Function LOOKUP(const KEYFIELDS:String;const KEYVALUES:VARIANT;const RESULTFIELDS:String):VARIANT Function LookupName( const name : string) : TInAddr Function LookupService( const service : string) : Int function Low: Int64; Function LowerCase( S : string) : string Function Lowercase(s : AnyString) : AnyString; Function LRot( const Value : Byte; const Count : TBitRange) : Byte; Function LRot1( const Value : Word; const Count : TBitRange) : Word; Function LRot2( const Value : Int; const Count : TBitRange) : Int; function MainInstance: longword function MainThreadID: longword Function Map(x, in_min, in_max, out_min, out_max: Int): Int; //arduino Function mapMax(ax, in_min, in_max, out_min, out_max: Int): Int; Function MakeCanonicalIPv4Address( const AAddr : string) : string Function MakeCanonicalIPv6Address( const AAddr : string) : string Function MakeDIB( out Bitmap : PBitmapInfo) : Int Function MakeDWordIntoIPv4Address( const ADWord : Cardinal) : string Function MakeFile(const FileName: string): Int); function MakeLong(A, B: Word): Longint) Function MakeTempFilename( const APath : String) : string Function MakeValidFileName( const Str : string) : string Function MakeValueMap( Enumeration : string; ToCds : Boolean) : string function MakeWord(A, B: Byte): Word) Function MakeYear4Digit( Year, Pivot : Int) : Int Function MapDateTime(const DateFormatType:string;DateFormat:string;Value:string;ToCds:Bool):string Function MapValues( Mapping : string; Value : string) : string Function MaskDoFormatText(const EditMask:string;const Value:string;Blank:Char):string Function MaskGetCharType( const EditMask : string; MaskOffset : Int) : TMaskCharType Function MaskGetCurrentDirectives( const EditMask : string; MaskOffset : Int) : TMaskDirectives Function MaskGetFldSeparator( const EditMask : string) : Int Function MaskGetMaskBlank( const EditMask : string) : Char Function MaskGetMaskSave( const EditMask : string) : Boolean Function MaskIntlLiteralToChar( IChar : Char) : Char Function MaskOffsetToOffset( const EditMask : String; MaskOffset : Int) : Int Function MaskOffsetToWideOffset( const EditMask : String; MaskOffset : Int) : Int Function MaskString( Mask, Value : String) : String Function Match( const sString : string) : TniRegularExpressionMatchResul Function Match1( const sString: string;iStart:Int):TniRegularExpressionMatchResult Function Matches( const Filename : string) : Boolean Function MatchesMask( const Filename, Mask : string) : Boolean Function MatchStr( const AText : string; const AValues : array of string) : Boolean Function MatchText( const AText : string; const AValues : array of string) : Boolean Function Max( AValueOne, AValueTwo : Int) : Int function Max(const x,y: Int): Int; Function Max1( const B1, B2 : Shortint) : Shortint; Function Max2( const B1, B2 : Smallint) : Smallint; Function Max3( const B1, B2 : Word) : Word; function Max3(const x,y,z: Int): Int; Function Max4( const B1, B2 : Int) : Int; Function Max5( const B1, B2 : Cardinal) : Cardinal; Function Max6( const B1, B2 : Int64) : Int64; Function Max64( const AValueOne, AValueTwo : Int64) : Int64 Function MaxFloat( const X, Y : Float) : Float Function MaxFloatArray( const B : TDynFloatArray) : Float Function MaxFloatArrayIndex( const B : TDynFloatArray) : Int function MaxIntValue(const Data: array of Int):Int) Function MaxJ( const B1, B2 : Byte) : Byte; function MaxPath: string; function MaxValue(const Data: array of Double): Double) Function MaxCalc( const Formula : string) : Extended //math expression parser Procedure MaxCalcF( const Formula : string); //out to console memo2 Function MaxCalcS( const Formula : string): string; function MD5(const fileName: string): string; Function Mean( const Data : array of Double) : Extended Function Median( const X : TDynFloatArray) : Float Function Memory : Pointer Function MemoryPos( const ASubStr : string; MemBuff : PChar; MemorySize : Int) : Int Function MessageBox(hndl: cardinal; text, caption: string; utype: cardinal): Int; function MESSAGEBOX(TEXT,CAPTION:PCHAR;FLAGS:WORD):Int Function MessageDlg(const Msg:string;DlgType:TMsgDlgType;Buttons:TMsgDlgButtons;HelpCtx:Longint):Int; Function MessageDlg1(const Msg:string;DlgType:TMsgDlgType;Buttons:TMsgDlgButtons;HelpCtx:Longint;DefaultButton:TMsgDlgBtn):Int; Function MessageDlgPos(const Msg:string;DlgType:TMsgDlgType;Buttons:TMsgDlgButtons;HelpCtx:Longint;X,Y:Int):Int; Function MessageDlgPos1(const Msg:string; DlgType:TMsgDlgType; Buttons:TMsgDlgButtons;HelpCtx:Longint;X,Y: Int;DefaultButton:TMsgDlgBtn):Int; Function MessageDlgPosHelp(const Msg:string;DlgType:TMsgDlgType;Buttons:TMsgDlgButtons;HelpCtx:Longint;X,Y: Int;const HelpFileName:string):Int; Function MessageDlgPosHelp1(const Msg:string;DlgType:TMsgDlgType;Buttons:TMsgDlgButtons;HelpCtx:Longint;X,Y : Int;const HelpFileName:string; DefaultButton:TMsgDlgBtn):Int; Function MibToId( Mib : string) : string Function MidStr( const AText : AnsiString; const AStart, ACount : Int) : AnsiString; Function MidStr( const AText : WideString; const AStart, ACount : Int) : WideString; Function microsecondsToCentimeters(mseconds:longint):longint;//340m/s speed of sound Function Micros(const Timer:THPTimer;const TimerRunning:Boolean):Int64//TypeS('THPTimer', 'Int64 Function MIDIOut( DeviceID : Cardinal) : IJclMIDIOut Procedure GetMidiOutputs( const List : TStrings) // GetGEOMAPX('html',ExePath+'cologne2mapX.html','cathedral cologne Procedure GetGEOMap(C_form,apath:string; const Data: string);//c_form:[html/json/xml] Function MIDISingleNoteTuningData( Key : TMIDINote; Frequency : Single) : TSingleNoteTuningData Function MIDINoteToStr( Note : TMIDINote) : string Function WinMidiOut( DeviceID : Cardinal) : IJclWinMidiOut Procedure GetMidiOutputs( const List : TStrings) Procedure MidiOutCheck( Code : MMResult) Procedure MidiInCheck( Code : MMResult) Function MilliSecondOf( const AValue : TDateTime) : Word Function MilliSecondOfTheDay( const AValue : TDateTime) : LongWord Function MilliSecondOfTheHour( const AValue : TDateTime) : LongWord Function MilliSecondOfTheMinute( const AValue : TDateTime) : LongWord Function MilliSecondOfTheMonth( const AValue : TDateTime) : LongWord Function MilliSecondOfTheSecond( const AValue : TDateTime) : Word Function MilliSecondOfTheWeek( const AValue : TDateTime) : LongWord Function MilliSecondOfTheYear( const AValue : TDateTime) : Int64 Function MilliSecondsBetween( const ANow, AThen : TDateTime) : Int64 Function MilliSecondSpan( const ANow, AThen : TDateTime) : Double Function milliToDateTime( MilliSecond : LongInt) : TDateTime; Function Micros( const Timer : THPTimer; const TimerRunning : Boolean): Int64 Function millis: int64; Function Min( AValueOne, AValueTwo : Int) : Int Function Min1( const B1, B2 : Shortint) : Shortint; Function Min2( const B1, B2 : Smallint) : Smallint; Function Min3( const B1, B2 : Word) : Word; Function Min4( const B1, B2 : Int) : Int; Function Min5( const B1, B2 : Cardinal) : Cardinal; Function Min6( const B1, B2 : Int64) : Int64; Function Min64( const AValueOne, AValueTwo : Int64) : Int64 Function MinClientRect : TRect; Function MinClientRect1( IncludeScroller : Boolean) : TRect; Function MinClientRect2( TabCount : Int; IncludeScroller : Boolean) : TRect; Function MinFloat( const X, Y : Float) : Float Function MinFloatArray( const B : TDynFloatArray) : Float Function MinFloatArrayIndex( const B : TDynFloatArray) : Int Function MinimizeName(const Filename:string;Canvas : TCanvas; MaxLen:Int): string Function MinimizeName(const Filename:TFileName;Canvas:TCanvas; MaxLen:Int):FileName function MinimizeName(const Filename: String; Canvas: TCanvas;MaxLen: Int):TFileName Function MinIntValue( const Data : array of Int) : Int function MinIntValue(const Data: array of Int):Int) Function MinJ( const B1, B2 : Byte) : Byte; Function MinuteOf( const AValue : TDateTime) : Word Function MinuteOfTheDay( const AValue : TDateTime) : Word Function MinuteOfTheHour( const AValue : TDateTime) : Word Function MinuteOfTheMonth( const AValue : TDateTime) : Word Function MinuteOfTheWeek( const AValue : TDateTime) : Word Function MinuteOfTheYear( const AValue : TDateTime) : LongWord Function MinutesBetween( const ANow, AThen : TDateTime) : Int64 Function MinuteSpan( const ANow, AThen : TDateTime) : Double Function MinValue( const Data : array of Double) : Double function MinValue(const Data: array of Double): Double) Function MixerLeftRightToArray( Left, Right : Cardinal) : TDynCardinalArray Function MMCheck( const MciError : MCIERROR; const Msg : string) : MCIERROR Function ModFloat( const X, Y : Float) : Float Function ModifiedJulianDateToDateTime( const AValue : Double) : TDateTime Function Modify( const Key : string; Value : Int) : Boolean Function ModuleCacheID : Cardinal Function ModuleFromAddr( const Addr : Pointer) : HMODULE Function MonitorFromPoint(const Point:TPoint;MonitorDefault:TMonitorDefaultTo): TMonitor Function MonitorFromRect(const Rect:TRect;MonitorDefault:TMonitorDefaultTo):TMonitor Function MonitorFromWindow(const Handle:THandle; MonitorDefault:TMonitorDefaultTo): TMonitor Function MonthOf( const AValue : TDateTime) : Word Function MonthOfTheYear( const AValue : TDateTime) : Word Function MonthsBetween( const ANow, AThen : TDateTime) : Int Function MonthSpan( const ANow, AThen : TDateTime) : Double Function MonthStr( DateTime : TDateTime) : string Function MouseCoord( X, Y : Int) : TGridCoord Function MOVEBY( DISTANCE : Int) : Int Function MoveFile( Source, Dest : string; Flags : FILEOP_FLAGS) : Boolean Function MoveNext : Boolean Function MSecsToTimeStamp( MSecs : Comp) : TTimeStamp function MSecsToTimeStamp(MSecs: Comp): TTimeStamp) Function Name : string Function NetPresentValue(const Rate:Extended;const CashFlows:array of Double;PaymentTime:TPaymentTime):Extended function NetworkVolume(DriveChar: Char): string Function NEWBOTTOMLINE : Int Function NewCompareNode(Field: TField;Operator:TCANOperator; const Value:Variant) : PExprNode Function NEWITEM(const ACAPTION:String;ASHORTCUT:TSHORTCUT;ACHECKED,AENABLED:BOOL;AONCLICK: TNOTIFYEVENT;HCTX:WORD;const ANAME:String):TMENUITEM Function NEWLINE : TMENUITEM Function NEWMENU( OWNER : TCOMPONENT;const ANAME:STRING;ITEMS: array of TMenuItem): TMAINMENU Function NewNode(Kind: TExprNodeKind; Operator:TCANOperator; const Data:Variant; Left,Right:PExprNode):PExprNode Function NEWPOPUPMENU(OWNER:TCOMPONENT;const ANAME:String; ALIGNMENT:TPOPUPALIGNMENT;AUTOPOPUP:BOOLEAN; const ITEMS : array of TCMENUITEM) : TPOPUPMENU Function NewState( eType : TniRegularExpressionStateType) : TniRegularExpressionState Function NEWSUBMENU(const ACAPT:String;HCTX:WORD;const ANAME:String;ITEMS:array of TMenuItem;AENABLED:BOOL): TMENUITEM Function NEWTOPLINE : Int Function Next : TIdAuthWhatsNext Function NextCharIndex( S : String; Index : Int) : Int Function NextRecordSet : TCustomSQLDataSet Function NextRecordset( var RecordsAffected : Int) : _Recordset Function NextSQLToken1(var p: WideChar;out Token:WideString;CurSection:TSQLToken):TSQLToken; Function NextToken : Char Function nextToken : WideString function NextToken:Char Function Norm( const Data : array of Double) : Extended Function NormalizeAngle( const Angle : Extended) : Extended Function NormalizeBcd(const InBcd TBcd;var OutBcd:TBcd;const Prec,Scale Word):Bool Function NormalizeRect( const Rect : TRect) : TRect function NormalizeRect(const Rect: TRect): TRect; Function Now : TDateTime function Now2: tDateTime Function NumProcessThreads : Int Function NumThreadCount : Int Function NthDayOfWeek( const AValue : TDateTime) : Word Function NtProductType : TNtProductType Function NtProductTypeString : string function Null: Variant; Function NullPoint : TPoint Function NullRect : TRect Function Null2Blank(aString:String):String; Function NumberOfPeriods(const Rate:Extended;Payment:Extended;const PresentValue,FutureValue:Extended;PaymentTime:TPaymentTime):Extended Function NumIP : Int function Odd(x: Longint): boolean; Function OffsetFromUTC : TDateTime Function OffsetPoint( const P, Offset : TPoint) : TPoint Function OffsetRect( var Rect : TRect; DX : Int; DY : Int) : Boolean function OffsetRect(var Rect: TRect; DX:Int; DY:Int): Boolean) Function OffsetToMaskOffset( const EditMask : string; Offset : Int) : Int Function OkToChangeFieldAlignment( AField : TField; Alignment : TAlignment) : Boolean Function OldBCDToCurr( const BCD : TBcd; var Curr : Currency) : Boolean Function OldCurrToBCD(const Curr:Currency;var BCD:TBcd;Precision:Int;Decimals:Int):Bool function OpenBit:Int Function OpenDatabase : TDatabase Function OpenDatabase( const DatabaseName : string) : TDatabase Procedure OpenDir(adir: string); Function OpenGLColorToWinColor( const Red, Green, Blue : Float) : TColor Function OpenMap(const Data: string): boolean; Function OpenMapX(const Data: string): boolean; Function OpenObject( Value : PChar) : Boolean; Function OpenObject1( Value : string) : Boolean; Procedure Openweb('http://snippets.delphidabbler.com/#') Procedure OpenURL( const AText : TKkString); Procedure OpenWeb( const AText : TKkString); Procedure OpenBrowser( const AText : TKkString); Function OpenSession( const SessionName : string) : TSession Function OpenVolume( const Drive : Char) : THandle function OrdFourByteToCardinal(AByte1, AByte2, AByte3, AByte4 : Byte): Cardinal Function OrdFourByteToLongWord( AByte1, AByte2, AByte3, AByte4 : Byte) : LongWord Function OrdToBinary( const Value : Byte) : string; Function OrdToBinary1( const Value : Shortint) : string; Function OrdToBinary2( const Value : Smallint) : string; Function OrdToBinary3( const Value : Word) : string; Function OrdToBinary4( const Value : Int) : string; Function OrdToBinary5( const Value : Cardinal) : string; Function OrdToBinary6( const Value : Int64) : string; Function OSCheck( RetVal : Boolean) : Boolean Function OSFileTypeToString( const OSFileType:DWORD;const OSFileSubType:DWORD): string Function OSIdentToString( const OSIdent : DWORD) : string Function Output: Text) Function Overlay( ImageIndex : Int; Overlay : TOverlay) : Boolean Function Owner : TCustomListView function Owner : TPersistent Function PadInputLiterals(const EditMask:String;const Value:string;Blank:Char):string Function PadL( pStr : String; pLth : Int) : String Function Padl(s : AnyString;I : longInt) : AnyString; Function PadLCh( pStr : String; pLth : Int; pChr : char) : String Function PadR( pStr : String; pLth : Int) : String Function Padr(s : AnyString;I : longInt) : AnyString; Function PadRCh( pStr : String; pLth : Int; pChr : char) : String Function PadString(const AString: String;const ALen:Int; const AChar:Char):String Function Padz(s : AnyString;I : longInt) : AnyString; Function PaethPredictor( a, b, c : Byte) : Byte Function PARAMBYNAME( const VALUE : String) : TPARAM Function ParamByName( const Value : WideString) : TParameter Function ParamCount: Int Function ParamsEncode( const ASrc : string) : string function ParamStr(Index: Int): string) Function ParseDate( const DateStr : string) : TDateTime Function PARSESQL( SQL : String; DOCREATE : BOOLEAN) : String Function ParseSQL( SQL : WideString; DoCreate : Boolean) : WideString Function PathAddExtension( const Path, Extension : string) : string Function PathAddSeparator( const Path : string) : string Function PathAppend( const Path, Append : string) : string Function PathBuildRoot( const Drive : Byte) : string Function PathCanonicalize( const Path : string) : string Function PathCommonPrefix( const Path1, Path2 : string) : Int Function PathCompactPath(const DC:HDC;const Path:string;const Width:Int;CmpFmt:TCompactPath):string; Function PathCompactPath1(const Canv:TCanvas;const Path:string;const Width:Int;CmpFmt:TCompactPath):string; Function PathEncode( const ASrc : string) : string Function PathExtractFileDirFixed( const S : AnsiString) : AnsiString Function PathExtractFileNameNoExt( const Path : string) : string Function PathExtractPathDepth( const Path : string; Depth : Int) : string Function PathGetDepth( const Path : string) : Int Function PathGetLongName( const Path : string) : string Function PathGetLongName2( Path : string) : string Function PathGetShortName( const Path : string) : string Function PathIsAbsolute( const Path : string) : Boolean Function PathIsChild( const Path, Base : AnsiString) : Boolean Function PathIsDiskDevice( const Path : string) : Boolean Function PathIsUNC( const Path : string) : Boolean Function PathRemoveExtension( const Path : string) : string Function PathRemoveSeparator( const Path : string) : string Function Payment(Rate:Extended;NPeriods:Int;const PresentVal,FutureVal:Extended;PaymentTime:TPaymentTime):Extended Function Peek : Pointer Function Peek : TObject function PERFORM(MSG:CARDINAL;WPARAM,LPARAM:LONGINT):LONGINT Function PeriodPayment(const Rate:Extended;Period,NPeriods:Int; const PresentValue,FutureValue : Extended; PaymentTime:TPaymentTime): Extended function Permutation(npr, k: Int): extended; function PermutationInt(npr, k: Int): Int64; Function PermutationJ( N, R : Cardinal) : Float Function Pi : Extended; Function PiE : Extended; Function PixelsToDialogsX( const Pixels : Word) : Word Function PixelsToDialogsY( const Pixels : Word) : Word Function PlaySound(s: pchar; flag,syncflag: Int): boolean; Function Point( X, Y : Int) : TPoint function Point(X, Y: Int): TPoint) Function PointAssign( const X, Y : Int) : TPoint Function PointDist( const P1, P2 : TPoint) : Double; function PointDist(const P1,P2: TFloatPoint): Double; Function PointDist1( const P1, P2 : TFloatPoint) : Double; function PointDist2(const P1,P2: TPoint): Double; Function PointEqual( const P1, P2 : TPoint) : Boolean Function PointIsNull( const P : TPoint) : Boolean Function PointToLineSegmentDist( const Point, LineP1, LineP2 : TFloatPoint): Double Function Poly( const X : Extended; const Coefficients : array of Double) : Extended Function PortTCPIsOpen(dwPort : Word; ipAddressStr: String): boolean; Function IsTCPPortOpen(dwPort : Word; ipAddressStr: String): boolean; Function Pop : Pointer Function Pop : TObject Function PopnStdDev( const Data : array of Double) : Extended Function PopnVariance( const Data : array of Double) : Extended Function PopulationVariance( const X : TDynFloatArray) : Float function Pos(SubStr, S: AnyString): Longint; Function PosEqual( const Rect : TRect) : Boolean Function PosEx( const SubStr, S : string; Offset : Int) : Int Function PosInSmallIntArray(const ASearchInt:SmallInt;AArray:array of SmallInt):Int Function PosInStrArray(const SearchStr:string;Contents:array of string;const CaseSensitive:Bool):Int Function Post1( AURL : string; const ASource : TStrings) : string; Function Post2( AURL : string; const ASource : TStream) : string; Function Post3( AURL : string; const ASource : TIdMultiPartFormDataStream) : string; Function PostData( const UserData : WideString; const CheckSum : DWORD) : Boolean Function PostData( const UserData : WideString; const CheckSum : Int): Boolean function PostMessage(hWnd:HWND;Msg:longword;wParam: ongint;lParam:longint):Bool; Function Power( const Base, Exponent : Extended) : Extended Function PowerBig(aval, n:Int): string; Function PowerIntJ( const X : Float; N : Int) : Float; Function PowerJ( const Base, Exponent : Float) : Float; Function PowerOffOS : Boolean Function PreformatDateString( Ps : string) : string Function PresentValue(const Rate:Extend;NPeriods:Int;const Payment,FutureVal:Extend;PaymentTime:TPaymentTime):Extended Function PrimeFactors( N : Cardinal) : TDynCardinalArray Function Printer : TPrinter Function ProcessPath2(const ABasePath:String;const APath:String;const APathDelim:string): string Function ProcessResponse : TIdHTTPWhatsNext Function ProduceContent : string Function ProduceContentFromStream( Stream : TStream) : string Function ProduceContentFromString( const S : string) : string Function ProgIDToClassID(const ProgID: string): TGUID; Function PromptDataLinkFile(ParentHandle:THandle;InitialFile:WideString):WideString Function PromptDataSource(ParentHandle:THandle;InitialString:WideString):WideString Function PromptForFileName( var AFileName : string; const AFilter : string; const ADefaultExt : string; const ATitle : string; const AInitialDir : string; SaveDialog : Boolean) : Boolean function PromptForFileName(var AFileName: string; const AFilter: string; const ADefaultExt: string;const ATitle: string; const AInitialDir: string; SaveDialog: Boolean): Boolean) Function PSScriptNeedFile(Sender:TObject;const OrginFileName:String;var FileName,Output:String):Bool Function PtInRect( const Rect : TRect; const P : TPoint) : Boolean function PtInRect(const Rect: TRect; const P: TPoint): Boolean) Function Push( AItem : Pointer) : Pointer Function Push( AObject : TObject) : TObject Function Put1( AURL : string; const ASource : TStream) : string; Function Pythagoras( const X, Y : Extended) : Extended Function queryDLLInterface( var queryList : TStringList) : TStringList Function queryDLLInterfaceTwo( var queryList : TStringList) : TStringList Function QueryInterface(const IID: TGUID; out Obj): HResult, CdStdCall Function queryPerformanceCounter2(mse: int64): int64; //Function QueryPerformanceCounter(var lpPerformanceCount: Int64): LongBool; stdcall; //Function QueryPerformanceFrequency(mse: int64): boolean; Function QueryPerformanceCounter(var lcount: Int64): Boolean; stdcall; Function QueryPerformanceFrequency(var lfreq: int64): boolean; stdcall; Procedure QueryPerformanceCounter1(var aC: Int64); Function QueryPerformanceFrequency1(var freq: int64): boolean; Function Quote( const ACommand : String) : SmallInt Function QuotedStr( S : string) : string Function RadToCycle( const Radians : Extended) : Extended Function RadToDeg( const Radians : Extended) : Extended Function RadToDeg( const Value : Extended) : Extended; Function RadToDeg1( const Value : Double) : Double; Function RadToDeg2( const Value : Single) : Single; Function RadToGrad( const Radians : Extended) : Extended Function RadToGrad( const Value : Extended) : Extended; Function RadToGrad1( const Value : Double) : Double; Function RadToGrad2( const Value : Single) : Single; Function RandG( Mean, StdDev : Extended) : Extended function Random(const ARange: Int): Int; function random2(a: Int): double function RandomE: Extended; function RandomF: Extended; Function RandomFrom( const AValues : array of string) : string; Function RandomRange( const AFrom, ATo : Int) : Int function randSeed: longint Function RawToDataColumn( ACol : Int) : Int Function Read : Char Function Read( pv : Pointer; cb : Longint; pcbRead : PLongint) : HResult function Read(Buffer:String;Count:LongInt):LongInt Function ReadBinaryStream( const Section, Name : string; Value : TStream) : Int Function ReadBool( const Section, Ident : string; Default : Boolean) : Boolean Function ReadCardinal( const AConvert : boolean) : Cardinal Function ReadChar : Char Function ReadClient( var Buffer, Count : Int) : Int Function ReadDate( const Section, Name : string; Default : TDateTime) : TDateTime Function ReadDateTime( const Section, Name : string; Default : TDateTime) : TDateTime Function ReadFloat( const Section, Name : string; Default : Double) : Double Function ReadFromStack(const ARaiseExceptfDiscon:Bool;ATimeout:Int;const ARaiseExceptTimeout:Bool):Int Function ReadInt( const AConvert : boolean) : Int Function ReadInt( const Section, Ident : string; Default : Longint) : Longint Function ReadLn : string Function ReadLn(ATerminator: string;const ATimeout:Int;AMaxLineLength:Int):string function Readln(question: string): string; Function readm: string; //read last line in memo2 - console! Function ReadLnWait( AFailCount : Int) : string Function ReadReg(Base: HKEY; KeyName, ValueName: string): string; Function ReadRegistry(Base: HKEY; KeyName, ValueName: string): string; Function ReadSmallInt( const AConvert : boolean) : SmallInt Function ReadString( const ABytes : Int) : string Function ReadString( const Section, Ident, Default : string) : string Function ReadString( Count : Int) : string Function ReadTime( const Section, Name : string; Default : TDateTime) : TDateTime Function ReadTimeStampCounter : Int64 Function RebootOS : Boolean Function Receive( ATimeOut : Int) : TReplyStatus Function ReceiveBuf( var Buf, Count : Int) : Int Function ReceiveLength : Int Function ReceiveText : string Function ReceiveSerialData(var Data: TByteArray; DataSize: cardinal): cardinal Function ReceiveSerialText: string Function RecodeDate(const AValue:TDateTime;const AYear,AMonth,ADay:Word):TDateTime Function RecodeDateTime(const AValue:TDateTime;const AYear,AMonth,ADay,AHr,AMin,ASec,AMilliSec:Word):TDateTime Function RecodeDay( const AValue : TDateTime; const ADay : Word) : TDateTime Function RecodeHour( const AValue : TDateTime; const AHour : Word) : TDateTime Function RecodeMilliSecond(const AValue:TDateTime;const AMilliSecond:Word):TDateTime Function RecodeMinute( const AValue : TDateTime; const AMinute : Word) : TDateTime Function RecodeMonth( const AValue : TDateTime; const AMonth : Word) : TDateTime Function RecodeSecond( const AValue : TDateTime; const ASecond : Word) : TDateTime Function RecodeTime(const AValue:TDateTime;const AHour,AMinute,ASecond,AMilliSecond:Word):TDateTime Function RecodeYear( const AValue : TDateTime; const AYear : Word) : TDateTime Function Reconcile( const Results : OleVariant) : Boolean Function Rect( Left, Top, Right, Bottom : Int) : TRect function Rect(ALeft: Int; ATop: Int; ARight: Int; ABottom: Int): TRect) Function Rect2( const ATopLeft, ABottomRight : TPoint) : TRect; Function RectAssign( const Left, Top, Right, Bottom : Int) : TRect Function RectAssignPoints( const TopLeft, BottomRight : TPoint) : TRect Function RectBounds( const Left, Top, Width, Height : Int) : TRect Function RectCenter( const R : TRect) : TPoint Function RectEqual( const R1, R2 : TRect) : Boolean Function RectHeight( const R : TRect) : Int Function RectIncludesPoint( const R : TRect; const Pt : TPoint) : Boolean Function RectIncludesRect( const R1, R2 : TRect) : Boolean Function RectIntersection( const R1, R2 : TRect) : TRect Function RectIntersectRect( const R1, R2 : TRect) : Boolean Function RectIsEmpty( const R : TRect) : Boolean Function RectIsNull( const R : TRect) : Boolean Function RectIsSquare( const R : TRect) : Boolean Function RectIsValid( const R : TRect) : Boolean Function RectsAreValid( R : array of TRect) : Boolean Function RectUnion( const R1, R2 : TRect) : TRect Function RectWidth( const R : TRect) : Int Function RedComponent( const Color32 : TColor32) : Int Function Refresh : Boolean Function RefStringListCopy(aRefArray:TStringlist):TStringList; Function RegisterConversionFamily( const ADescription : string) : TConvFamily Function RegisterConversionType(AConvTypeInfo: TConvTypeInfo; out AType : TConvType) : Boolean; Function RegisterConversionType(const AFam:TConvFamil;const ADescr:string;const AFact:Double):TConvType Function RegistryRead(keyHandle: Longint; keyPath, myField: String): string; Function ReleaseDC(hdwnd: HWND; hdc: HDC): Int; Function ReleaseHandle : HBITMAP Function ReleaseHandle : HENHMETAFILE Function ReleaseHandle : HICON Function ReleasePalette : HPALETTE Function RemainderFloat( const X, Y : Float) : Float Function Remove( AClass : TClass) : Int Function Remove( AComponent : TComponent) : Int Function Remove( AItem : Int) : Int Function Remove( AItem : Pointer) : Pointer Function Remove( AItem : TObject) : TObject Function Remove( AObject : TObject) : Int Function RemoveBackslash( const PathName : string) : string Function RemoveDF( aString : String) : String //removes thousand separator Function RemoveDir( Dir : string) : Boolean function RemoveDir(const Dir: string): Boolean) Function RemoveDirectory(PathName: PChar): WordBool; stdcall; Function RemoveFileExt( const FileName : string) : string Function RemoveHeaderEntry( AHeader, AEntry : string) : string Function RenameFile( OldName, NewName : string) : Boolean function RenameFile(const OldName: string; const NewName: string): Boolean) Function ReplaceStr( const AText, AFromText, AToText : string) : string Function ReplaceText( const AText, AFromText, AToText : string) : string Function Replicate(c : char;I : longInt) : String; Function Request : TWebRequest Function ResemblesText( const AText, AOther : string) : Boolean Function Reset : Boolean function Reset2(mypath: string): TStringlist //string; Function ResInstLoad(Instance:THandle;ResType:TResType;const Name:string;MaskColor:TColor):Bool Function ResourceLoad(ResType:TResType;const Name string;MaskColor:TColor):oolean Function Response : TWebResponse Function ResumeSupported : Boolean Function RETHINKHOTKEYS : BOOLEAN Function RETHINKLINES : BOOLEAN Function Retrieve( const MsgNum : Int; AMsg : TIdMessage) : Boolean Function RetrieveCurrentDir : string Function RetrieveDeltas( const cdsArray : array of TClientDataset) : Variant Function RetrieveHeader( const MsgNum : Int; AMsg : TIdMessage) : Boolean Function RetrieveMailBoxSize : Int Function RetrieveMsgSize( const MsgNum : Int) : Int Function RetrieveProviders( const cdsArray : array of TClientDataset) : Variant Function RetrieveRaw( const MsgNum : Int; const Dest : TStrings) : boolean Function ReturnMIMEType( var MediaType, EncType : String) : Boolean Function ReverseBits( Value : Byte) : Byte; Function ReverseBits1( Value : Shortint) : Shortint; Function ReverseBits2( Value : Smallint) : Smallint; Function ReverseBits3( Value : Word) : Word; Function ReverseBits4( Value : Cardinal) : Cardinal; Function ReverseBits4( Value : Int) : Int; Function ReverseBits5( Value : Int64) : Int64; Function ReverseBytes( Value : Word) : Word; Function ReverseBytes1( Value : Smallint) : Smallint; Function ReverseBytes2( Value : Int) : Int; Function ReverseBytes3( Value : Cardinal) : Cardinal; Function ReverseBytes4( Value : Int64) : Int64; Function ReverseString( const AText : string) : string Function ReverseDNSLookup(const IPAddrs:String;DNSServer:String;Timeout,Retries:Int;var HName:Str):Bool; Function Revert : HResult Function RGB(R,G,B: Byte): TColor; Function RGB2BGR( const Color : TColor) : TColor Function RGB2TColor( R, G, B : Byte) : TColor Function RGBToWebColorName( RGB : Int) : string Function RGBToWebColorStr( RGB : Int) : string Function RgbToHtml( Value : TColor) : string Function HtmlToRgb(const Value: string): TColor; Function RightStr( const AStr : String; Len : Int) : String Function RightStr( const AText : AnsiString; const ACount : Int) : AnsiString; Function RightStr( const AText : WideString; const ACount : Int) : WideString; Function ROL( AVal : LongWord; AShift : Byte) : LongWord Function ROR( AVal : LongWord; AShift : Byte) : LongWord Function RotatePoint(Point:TFloatPoint;const Center:TFloatPoint;const Angle:Float):TFloatPoint function RotatePoint(Point:TFloatPoint;const Center:TFloatPoint;const Angle:Double):TFloatPoint; Function Round(e : Extended) : Longint; Function Round64(e: extended): Int64; Function RoundAt( const Value : string; Position : SmallInt) : string type TRoundToRange = -37..37; TRoundToEXRangeExtended = -20..20; Function RoundTo(const AValue:Extende;const ADigit:TRoundToEXRangeExtended):Extended;; Function SimpleRoundTo(const AValue:Extended;const ADigit: TRoundToRange): Extended;; Function RoundFrequency( const Frequency : Int) : Int Function RoundInt( Value : Int; StepSize : Int) : Int Function RoundPoint( const X, Y : Double) : TPoint Function RoundRect( const ALeft, ATop, ARight, ABottom : Double) : TRect Function RowCount : Int Function RowRequest(const Row:OleVariant;RequestType:Int;var OwnerData:OleVariant):OleVariant Function RowRequest( Row : OleVariant; Options : TFetchOptions) : OleVariant Function RPos( const ASub, AIn : String; AStart : Int) : Int Function RRot( const Value : Byte; const Count : TBitRange) : Byte; Function RRot1( const Value : Word; const Count : TBitRange) : Word; Function RRot2( const Value : Int; const Count : TBitRange) : Int; Function RunDLL32(const ModuleNa,FuncName,CmdLine:string;WaitForCompletion:Bool;CmdShow:Int):Bool Function RunningProcessesList( const List : TStrings; FullPath : Boolean) : Boolean Function RunByteCode(Bytecode: AnsiString; out RuntimeErrors: AnsiString): Boolean;; Function RunCompiledScript2(Bytecode: AnsiString;out RuntimeErrors:AnsiString): Bool; Function S_AddBackSlash( const ADirName : string) : string Function S_AllTrim( const cStr : string) : string Function S_AtRepl( const cAT, cStr, cRepl : string) : string Function S_Cut( const cStr : string; const iLen : Int) : string Function S_DecryptCRC32( const crc : string; StartKey, MultKey, AddKey : Int) : Int Function S_DirExists( const ADir : string) : Boolean Function S_Empty( const cStr : string) : boolean Function S_EncryptCRC32(const crc:LongWORD;StartKey,MultKey,AddKey:Int):string Function S_LargeFontsActive : Boolean Function S_LimitDigits( AValue : Extended; ANumDigits : Int) : Extended Function S_LTrim( const cStr : string) : string Function S_ReadNextTextLineFromStream( stream : TStream) : string Function S_RepeatChar( const iLen : Int; const AChar : Char) : String Function S_ReplFirst( const cAT, cStr, cRepl : string) : string Function S_RoundDecimal( AValue : Extended; APlaces : Int) : Extended Function S_RTrim( const cStr : string) : string Function S_RTrimCopy( const cStr : string; iPos, iLen : Int) : string //Type TS_ShellExecuteCmd = (seCmdOpen,seCmdPrint,seCmdExplore); Function S_ShellExecute(aFilename:string;aParameters:string;aCommand:TS_ShellExecuteCmd):string Function S_Space( const iLen : Int) : String Function S_StrBlanks( const cStr : string; const iLen : Int) : string Function S_StrBlanksCuttooLong( const cStr : string; const iLen : Int) : string Function S_StrCRC32( const Text : string) : LongWORD Function S_StrDecrypt96(const InString: string;StartKey,MultKey,AddKey:Int):string Function S_StrEncrypt96(const InString: string;StartKey,MultKey,AddKey:int): string Function S_StringtoUTF_8( const AString : string) : string Function S_StrLBlanks( const cStr : string; const iLen : Int) : string function S_StrToReal(const cStr: string; var R: Double): Boolean Function S_TokenEnd( cBuffer : PChar; lEmptyToken : boolean) : boolean Function S_TokenNext( cBuffer : PChar; lEmptyToken : boolean) : string Function S_UTF_8ToString( const AString : string) : string Function S_WBox( const AText : string) : Int Function SameDate( const A, B : TDateTime) : Boolean function SameDate(const A, B: TDateTime): Boolean; Function SameDateTime( const A, B : TDateTime) : Boolean function SameDateTime(const A, B: TDateTime): Boolean; Function SameFileName( S1, S2 : string) : Boolean Function SameText( S1, S2 : string) : Boolean function SameText(const S1: string; const S2: string): Boolean) Function SameTime( const A, B : TDateTime) : Boolean function SameTime(const A, B: TDateTime): Boolean; function SameValue(const A, B: Extended; Epsilon: Extended): Boolean //overload; function SameValue1(const A, B: Double; Epsilon: Double): Boolean //overload; function SameValue2(const A, B: Single; Epsilon: Single): Boolean //overload; Function SampleVariance( const X : TDynFloatArray) : Float Function Sar( const Value : Shortint; const Count : TBitRange) : Shortint; Function Sar1( const Value : Smallint; const Count : TBitRange) : Smallint; Function Sar2( const Value : Int; const Count : TBitRange) : Int; Function SaveToFile( const AFileName : TFileName) : Boolean Function SaveAsExcelFile(AGrid:TStringGrid;ASheetName,AFileName:string;open:bool): Boolean; Function SaveAsExcel(aGrid:TStringGrid;aSheetName,aFileName:string;openexcel:boolean):Boolean; Function ScanF(const aformat: String; const args: array of const): string; Function SCREENTOCLIENT(POINT:TPOINT):TPOINT Function SearchBuf(Buf:PChar;BufLen:Int;SelStart,SelLength:Int;SearchString:String;Options:TStringSearchOptions):PChar Function SearchBuf2(Buf:String;SelStart,SelLength:Int;SearchString:String;Options:TStringSearchOptions):Int; function SearchRecattr: Int; function SearchRecExcludeAttr: Int; Function SearchRecFileSize64( const SearchRec : TSearchRec) : Int64 function SearchRecname: string; function SearchRecsize: Int; function SearchRecTime: Int; Function Sec( const X : Extended) : Extended Function Secant( const X : Extended) : Extended Function SecH( const X : Extended) : Extended Function SecondOf( const AValue : TDateTime) : Word Function SecondOfTheDay( const AValue : TDateTime) : LongWord Function SecondOfTheHour( const AValue : TDateTime) : Word Function SecondOfTheMinute( const AValue : TDateTime) : Word Function SecondOfTheMonth( const AValue : TDateTime) : LongWord Function SecondOfTheWeek( const AValue : TDateTime) : LongWord Function SecondOfTheYear( const AValue : TDateTime) : LongWord Function SecondsBetween( const ANow, AThen : TDateTime) : Int64 Function SecondSpan( const ANow, AThen : TDateTime) : Double Function SectionExists( const Section : string) : Boolean Function Seek( const KeyValues : Variant; SeekOption : TSeekOption) : Boolean Function Seek(dlibMove: Longint; dwOrigin: Longint; out libNewPosition : Largeint): HResult function Seek(Offset:LongInt;Origin:Word):LongInt Function SelectDirectory(var Directory:string; Options:TSelectDirOpts;HelpCtx:Longint):Bool; Function SelectDirectory1(const Caption:string;const Root:WideString;var Directory:string; Options:TSelectDirExtOpts;Parent:TWinControl):Boolean; Function SelectImage(var AFileName:string;const Extensions,Filter:string):Boolean function SendAppMessage(Msg: Cardinal; WParam, LParam: Longint): Longint Function SendBuf( var Buf, Count : Int) : Int Function SendCmd( const AOut : string; const AResponse : SmallInt) : SmallInt; Function SendCmd1( const AOut : string; const AResponse : array of SmallInt) : SmallInt; Function SendKey( AppName : string; Key : Char) : Boolean function SendMessage(hWnd: HWND; Msg: longword; wParam: longint; lParam: longint): Boolean; Function SendStream( AStream : TStream) : Boolean Function SendStreamThenDrop( AStream : TStream) : Boolean Function SendText( const S : string) : Int Function SendSerialData(Data: TByteArray; DataSize: cardinal): cardinal Function SendSerialText(Data: String): cardinal Function Sent : Boolean Function ServicesFilePath: string Function SetAlpha( const Color32 : TColor32; NewAlpha : Int) : TColor32 Function SetBit( const Value : Byte; const Bit : TBitRange) : Byte; Function SetBit1( const Value : Shortint; const Bit : TBitRange) : Shortint; Function SetBit2( const Value : Smallint; const Bit : TBitRange) : Smallint; Function SetBit3( const Value : Word; const Bit : TBitRange) : Word; Function SetBit4( const Value : Cardinal; const Bit : TBitRange) : Cardinal; Function SetBit4( const Value : Int; const Bit : TBitRange) : Int; Function SetBit5( const Value : Int64; const Bit : TBitRange) : Int64; Function SetClipboard( NewClipboard : TClipboard) : TClipboard Function SetColorBlue( const Color : TColor; const Blue : Byte) : TColor Function SetColorFlag( const Color : TColor; const Flag : Byte) : TColor Function SetColorGreen( const Color : TColor; const Green : Byte) : TColor Function SetColorRed( const Color : TColor; const Red : Byte) : TColor Function SetCurrentDir( Dir : string) : Boolean function SetCurrentDir(const Dir: string): Boolean) Function SetCurrentDirectory(PathName: PChar): WordBool; stdcall; Function SetDirCreation( const DirName : string; const DateTime : TDateTime) : Boolean Function SetDirLastAccess(const DirName:string;const DateTime: TDateTime) : Bool Function SetDirLastWrite(const DirName:string; const DateTime : TDateTime): Bool Function SetDisplayResolution( const XRes, YRes : DWORD) : Longint Function SetEndOfFile(Handle: Int): LongBool; stdcall; Function SetEnvironmentVar( const Name, Value : string) : Boolean Function SetErrorProc( ErrorProc : TSocketErrorProc) : TSocketErrorProc Function SetFileCreation(const FileName:string; const DateTime : TDateTime): Bool Function SetFileLastAccess( const FileName:string; const DateTime:TDateTime): Bool Function SetFileLastWrite(const FileName:string;const DateTime:TDateTime):BoolFunction SetFileTimeStamp(const FileName:string;TimeStamp:Int):Bool function SETFOCUSEDCONTROL(CONTROL:TWINCONTROL):BOOLEAN Function SetLocalTime( Value : TDateTime) : boolean Function SetPrecisionTolerance( NewTolerance : Float) : Float Function SetPrinter( NewPrinter : TPrinter) : TPrinter Function SetPrivilege(privilegeName: string; enable: boolean): boolean; Function SetRGBValue( const Red, Green, Blue : Byte) : TColor Function SetSequence( S, Localizar, Substituir : shortstring) : shortstring Function SetSize( libNewSize : Longint) : HResult Function SetUserObjectFullAccess( hUserObject : THandle) : Boolean Function Sgn( const X : Extended) : Int function SHA1(const fileName: string): string; function SHA256(astr: string; amode: char): string) function SHA512(astr: string; amode: char): string) Function ShareMemoryManager : Boolean function ShellExecute(hWnd:HWND;Operation,FileN,Parameters,Dir:str;ShowCmd:Int):Int;stdcall; function Shellexecute2(hwnd: HWND; const FileName: string):Int; stdcall; Function ShellExecute3(aFilename:string;aParameters:string;aCommand:TS_ShellExecuteCmd):string; Function SHORTCUT( KEY : WORD; SHIFT : TSHIFTSTATE): TSHORTCUT Function SHORTCUTTOTEXT( SHORTCUT : TSHORTCUT): String function ShortDateFormat:string; Function ShortenString(const DC:HDC;const S:WideString;const Width:Int;const RTL:Bool;EllipsisWidth:Int):WideString function ShortTimeFormat: string; function SHOWMODAL:Int Function ShowModalControl(aControl:TControl;BS:TFormBorderStyle;BI:TBorderIcons;WS:TWindowState;aColor:TColor;BW:Int;Title:String;BeforeShowModal:TNotifyEvent):TModalResult; Function ShowModalPanel(aPnl:TCustomPanel;Titl:String;ShowCloseIcn:Bool;BefShowModal:TNotifyEvent):TModalResult; function ShowWindow(C1: HWND; C2: Int): boolean; procedure ShowMemory //in Dialog function ShowMemory2: string; Function ShutDownOS : Boolean Function Signe( const X, Y : Extended) : Extended Function Sign( const X : Extended) : Int Function Sin(e : Extended) : Extended; //Assuming trigonometric arguments in degrees //| Use instead PrintF('in deg: %.18f',[sin(degtorad(60.0))]); //0.866025403784438647 Function sinc( const x : Double) : Double Function SinJ( X : Float) : Float Function Size( const AFileName : String) : Int function SizeOf: Longint; Function SizeofResource( ModuleHandle : HMODULE; ResHandle : TResourceHandle) : Int function SlashSep(const Path, S: String): String Function SLNDepreciation( const Cost, Salvage : Extended; Life : Int) : Extended Function SleepEx( dwMilliseconds : DWORD; bAlertable : BOOL) : DWORD Function SmallPoint(X, Y: Int): TSmallPoint) Function Soundex( const AText : string; ALength : TSoundexLength) : string Function SoundexCompare( const AText, AOther : string; ALength : TSoundexLength) : Int Function SoundexInt( const AText : string; ALength : TSoundexIntLength) : Int Function SoundexProc( const AText, AOther : string) : Boolean Function SoundexSimilar(const AText,AOther:string;ALength:TSoundexLength):Boolean Function SoundexWord( const AText : string) : Word Function SourcePos : Longint function SourcePos:LongInt Function Split0( Str : string; const substr : string) : TStringList Procedure SplitNameValue( const Line : string; var Name, Value : string) Function SQLRequiresParams( const SQL : WideString) : Boolean Function Sqr(e : Extended) : Extended; Function Sqrt(e : Extended) : Extended; Function StartIP : String Function StartPan( WndHandle : THandle; AControl : TControl) : Boolean Function StartOfADay( const AYear, AMonth, ADay : Word) : TDateTime; Function StartOfADay1( const AYear, ADayOfYear : Word) : TDateTime; Function StartOfAMonth( const AYear, AMonth : Word) : TDateTime Function StartOfAWeek( const AYear, AWeekOfYear : Word; const ADayOfWeek:Word): TDateTime Function StartOfAYear( const AYear : Word) : TDateTime Function StartOfTheDay( const AValue : TDateTime) : TDateTime Function StartOfTheMonth( const AValue : TDateTime) : TDateTime Function StartOfTheWeek( const AValue : TDateTime) : TDateTime Function StartOfTheYear( const AValue : TDateTime) : TDateTime Function StartsStr( const ASubText, AText : string) : Boolean Function StartsText( const ASubText, AText : string) : Boolean Function StartsWith( const ANSIStr, APattern : String) : Boolean Function StartsWith( const str : string; const sub : string) : Boolean Function StartsWithACE( const ABytes : TIdBytes) : Boolean Function StatusString( StatusCode : Int) : string Function StdDev( const Data : array of Double) : Extended Function Stop : Float Function StopCount( var Counter : TJclCounter) : Float Function StoreColumns : Boolean Function StrAfter( const sString : string; const sDelimiters : string) : string; Function StrAfter1(const sString:string; const sDelimiters:string;out cDelimiter:char):string; Function StrAlloc( Size : Cardinal) : PChar function StrAlloc(Size: Cardinal): PChar) Function StrBefore( const sString : string; const sDelimiters : string) : string; Function StrBefore1(const sString:string;const sDelimiters:string;out cDelimiter:char):string; Function StrBufSize( Str : PChar) : Cardinal function StrBufSize(const Str: PChar): Cardinal) Function StrByteType( Str : PChar; Index : Cardinal) : TMbcsByteType function StrByteType(Str: PChar; Index: Cardinal): TMbcsByteType) Function StrCat( Dest : PChar; Source : PChar) : PChar function StrCat(Dest: PChar; const Source: PChar): PChar) Function StrCharLength( Str : PChar) : Int Function StrComp( Str1, Str2 : PChar) : Int function StrComp(const Str1: PChar; const Str2: PChar): Int) Function StrCopy( Dest : PChar; Source : PChar) : PChar function StrCopy(Dest: PChar; const Source: PChar): PChar) Function Stream_to_AnsiString( Source : TStream) : ansistring Function Stream_to_Base64( Source : TStream) : ansistring Function Stream_to_decimalbytes( Source : TStream) : string Function Stream2WideString( oStream : TStream) : WideString Function StreamtoAnsiString( Source : TStream) : ansistring Function StreamToByte( Source : TStream) : string Function StreamToDecimalbytes( Source : TStream) : string Function StreamtoOrd( Source : TStream) : string Function StreamToString( Source : TStream) : string Function StreamToString2( Source : TStream) : string Function StreamToString3( Source : TStream) : string Function StreamToString4( Source : TStream) : string Function StrECopy( Dest : PChar; Source : PChar) : PChar Function StrEmpty( const sString : string) : boolean Function StrEnd( Str : PChar) : PChar function StrEnd(const Str: PChar): PChar) Function StrFilter( const sString : string; xValidChars : TCharSet) : string Function StrFmt(Buffer, Format: PChar; const Args: array of const): PChar) Function StrGet(var S : String; I : Int) : Char; Function StrGet2(S : String; I : Int) : Char; Function StrHasPrefix( const sString : string; const sPrefix : string) : boolean Function StrHasSuffix( const sString : string; const sSuffix : string) : boolean Function StrHtmlDecode( const AStr : String) : String Function StrHtmlEncode( const AStr : String) : String Function StrToBytes(const Value: String): TBytes; Function StrIComp( Str1, Str2 : PChar) : Int Function StringOfChar(c : char;I : longInt) : String; Function StringOfChar2( ch : WideChar; Count : Int) : WideString; Function StringPad(InputStr,FillChar: String; StrLen:Int; StrJustify:Boolean): String; Function StringRefCount(const s: String): Int; Function StringReplace(S,OldPattern,NewPattern:string;Flags:TReplaceFlags):string Function JStringReplace(const S,OldPattern, NewPattern: string; Flags : TReplaceFlags):string Function StringReplace(const SourceString,OldPattern,NewPattern:string;Flags:TReplaceFlags): string; Function StringRemove( const S, Pattern : string; Flags : TReplaceFlags) : string Function StringToBoolean( const Ps : string) : Boolean function StringToColor(const S: string): TColor) function StringToCursor(const S: string): TCursor; function StringToGUID(const S: string): TGUID) Function StringTokenizer( const str : string; const delim : string) : IStringTokenizer Function StringToStringArray( const str : string; const delim : string): TStringDynArray Function StringWidth( S : string) : Int Function StrInternetToDateTime( Value : string) : TDateTime Function StrIsDateTime( const Ps : string) : Boolean Function StrIsFloatMoney( const Ps : string) : Boolean Function StrIsInt( const S : string) : Boolean Function StrLCat( Dest : PChar; Source : PChar; MaxLen : Cardinal) : PChar Function StrLComp( Str1, Str2 : PChar; MaxLen : Cardinal) : Int Function StrLCopy( Dest : PChar; Source : PChar; MaxLen : Cardinal) : PChar Function StrLen( Str : PChar) : Cardinal function StrLen(const Str: PChar): Cardinal) Function StrLessPrefix( const sString : string; const sPrefix : string) : string Function StrLessSuffix( const sString : string; const sSuffix : string) : string Function StrLIComp( Str1, Str2 : PChar; MaxLen : Cardinal) : Int Function StrLower( Str : PChar) : PChar Function StrMove( Dest : PChar; Source : PChar; Count : Cardinal) : PChar function StrMove(Dest: PChar; const Source: PChar; Count: Cardinal): PChar) Function StrNew( Str : PChar) : PChar function StrNew(const Str: PChar): PChar) Function StrNextChar( Str : PChar) : PChar Function StrPad( const sString:string;const sPad:string;const iLength:Int): string Function StrParse( var sString : string; const sDelimiters : string) : string; Function StrParse1(var sString:string;const sDelimiters:string;out cDelimiter:char) string; Function StrPas( Str : PChar) : string function StrPas(const Str: PChar): string) Function StrPCopy( Dest : PChar; Source : string) : PChar function StrPCopy(Dest: PChar; const Source: string): PChar) Function StrPLCopy( Dest : PChar; Source : string; MaxLen : Cardinal) : PChar Function StrPos( Str1, Str2 : PChar) : PChar Function StrScan(const Str: PChar; Chr: Char): PChar) Function StrRScan(const Str: PChar; Chr: Char): PChar) Function StrToBcd( const AValue : string) : TBcd Function StrToBool( S : string) : Boolean Function StrToBoolDef( S : string; Default : Boolean) : Boolean Function StrToCard( const AStr : String) : Cardinal Function StrToConv( AText : string; out AType : TConvType) : Double Function StrToCurr( S : string) : Currency; function StrToCurr(const S: string): Currency) Function StrToCurrDef( S : string; Default : Currency) : Currency; Function StrToDate( S : string) : TDateTime; function StrToDate(const s: string): TDateTime; Function StrToDateDef( S : string; Default : TDateTime) : TDateTime; Function StrToDateTime( S : string) : TDateTime; function StrToDateTime(const S: string): TDateTime) Function StrToDateTimeDef( S : string; Default : TDateTime) : TDateTime; Function StrToDay( const ADay : string) : Byte Function StrToFloat( S : string) : Extended; function StrToFloat(s: String): Extended; Function StrToFloatDef( S : string; Default : Extended) : Extended; function StrToFloatDef(const S: string; const Default: Extended): Extended) Function StrToFloat( S : string) : Extended; Function StrToFloat2( S : string; FormatSettings : TFormatSettings) : Extended; Function StrToFloatDef( S : string; Default : Extended) : Extended; Function StrToFloatDef2(S:string;Default:Extended;FormatSettings:TFormatSettings): Extended; Function StrToCurr( S : string) : Currency; Function StrToCurr2( S : string; FormatSettings : TFormatSettings) : Currency; Function StrToCurrDef( S : string; Default : Currency) : Currency; Function StrToCurrDef2(S:string; Default:Currency; FormatSettings:TFormatSettings) : Currency; Function StrToTime2( S : string; FormatSettings : TFormatSettings): TDateTime; Function StrToTimeDef( S : string; Default : TDateTime) : TDateTime; Function StrToTimeDef2(S:string; Default:TDateTime;FormatSettings:TFormatSettings):TDateTime; Function TryStrToTime( S : string; Value : TDateTime) : Boolean; Function StrToDateTime( S : string) : TDateTime; Function StrToDateTime2( S : string; FormatSettings : TFormatSettings) : TDateTime; Function StrToDateTimeDef( S : string; Default : TDateTime) : TDateTime; Function StrToFloatRegionalIndependent(aValue:String;aDecimalSymbol:Char;aDigitGroupSymbol:Char): Extended Function StrToInt( S : string) : Int function StrToInt(s: String): Longint; Function StrToInt64( S : string) : Int64 function StrToInt64(s: String): int64; Function StrToInt64Def( S : string; Default : Int64) : Int64 function StrToInt64Def(const S: string; const Default: Int64):Int64) Function StrToIntDef( S : string; Default : Int) : Int function StrToIntDef(const S: string; Default: Int): Int) function StrToIntDef(s: String; def: Longint): Longint; Function StrToMonth( const AMonth : string) : Byte Function StrToTime( S : string) : TDateTime; function StrToTime(const S: string): TDateTime) Function StrToTimeDef( S : string; Default : TDateTime) : TDateTime; Function StrToWord( const Value : String) : Word Function StrToXmlDate( const DateStr : string; const Format : string) : string Function StrToXmlDateTime( const DateStr : string; const Format : string) : string Function StrToXmlTime( const TimeStr : string; const Format : string) : string Function StrUpper( Str : PChar) : PChar Function StuffString(const AText:string;AStart, ALength:Cardinal;const ASubText:string):string Function Sum( const Data : array of Double) : Extended Function SumFloatArray( const B : TDynFloatArray) : Float Function SumInt( const Data : array of Int) : Int Function SumOfSquares( const Data : array of Double) : Extended Function SumPairProductFloatArray( const X, Y : TDynFloatArray) : Float Function SumSquareDiffFloatArray( const B : TDynFloatArray; Diff : Float) : Float Function SumSquareFloatArray( const B : TDynFloatArray) : Float Function Supports( CursorOptions : TCursorOptions) : Boolean Function SupportsClipboardFormat( AFormat : Word) : Boolean Function SwapWord(w : word): word) Function SwapInt(i : Int): Int) Function SwapLong(L : longint): longint) Function Swap(i : Int): Int) Function SYDDepreciation(const Cost,Salvage:Extended;Life,Period:Int): Extended Function SyncTime : Boolean Function SysErrorMessage( ErrorCode : Int) : string function SysErrorMessage(ErrorCode: Int): string) Function SystemTimeToDateTime( SystemTime : TSystemTime) : TDateTime function SystemTimeToDateTime(const SystemTime: TSystemTime): TDateTime; Function SysStringLen(const S: WideString): Int; stdcall; Function TabRect( Index : Int) : TRect Function Tan( const X : Extended) : Extended Function TaskMessageDlg(const Title,Msg:string;DlgType:TMsgDlgType;Buttons:TMsgDlgButtons;HelpCtx:Longint): Int; Function TaskMessageDlg1(const Title,Msg:string;DlgType:TMsgDlgType;Buttons:TMsgDlgButtons; HelpCtx:Longint;DefaultButton:TMsgDlgBtn):Int; Function TaskMessageDlgPos(const Title,Msg:string;DlgType:TMsgDlgType;Bts:TMsgDlgButtons;HelpCtx:Longint;X,Y:Int):Int; Function TaskMessageDlgPos1(const Title,Msg:string;DlgType:TMsgDlgType;Buttons:TMsgDlgButtons;HelpCtx:Longint;X,Y:Int;DefaultButton:TMsgDlgBtn):Int; Function TaskMessageDlgPosHelp(const Title,Msg:string;DlgType:TMsgDlgType;Buttons: TMsgDlgButtons;HelpCtx:Longint;X,Y:Int;const HelpFileName:string): Int; Function TaskMessageDlgPosHelp1(const Title, Msg:string;DlgType: TMsgDlgType; Buttons : TMsgDlgButtons;HelpCtx:Longint;X,Y:Int;const HelpFileName:string;DefaultButton:TMsgDlgBtn):Int; Function TenToY( const Y : Float) : Float Function TerminateApp( ProcessID : DWORD; Timeout : Int) : TJclTerminateAppResult Function TerminateTask( Wnd : HWND; Timeout : Int) : TJclTerminateAppResult Function TestBit( const Value : Byte; const Bit : TBitRange) : Boolean; Function TestBit2( const Value : Shortint; const Bit : TBitRange) : Boolean; Function TestBit3( const Value : Smallint; const Bit : TBitRange) : Boolean; Function TestBit4( const Value : Word; const Bit : TBitRange) : Boolean; Function TestBit5( const Value : Cardinal; const Bit : TBitRange) : Boolean; Function TestBit6( const Value : Int; const Bit : TBitRange) : Boolean; Function TestBit7( const Value : Int64; const Bit : TBitRange) : Boolean; Function TestBits( const Value, Mask : Byte) : Boolean; Function TestBits1( const Value, Mask : Shortint) : Boolean; Function TestBits2( const Value, Mask : Smallint) : Boolean; Function TestBits3( const Value, Mask : Word) : Boolean; Function TestBits4( const Value, Mask : Cardinal) : Boolean; Function TestBits5( const Value, Mask : Int) : Boolean; Function TestBits6( const Value, Mask : Int64) : Boolean; Function TestFDIVInstruction : Boolean function TestStreamFormat(Stream: TStream): TStreamOriginalFormat Function TextExtent( const Text : string) : TSize function TextHeight(Text: string): Int; Function TextIsSame( const A1 : string; const A2 : string) : Boolean Function TextStartsWith( const S, SubS : string) : Boolean function TextToFloat(Buffer: PChar; var Value: Extended; ValueType: TFloatValue): Boolean) Function ConvInt(i : Int):string; Function IntToText(i : Int):string; Function TEXTTOSHORTCUT( TEXT : String) : TSHORTCUT function TextWidth(Text: string): Int; Function ThreadCount : Int function ThousandSeparator: char; Function Ticks : Cardinal Function Time : TDateTime function Time: TDateTime; function TimeGetTime: int64; Function TimeOf( const AValue : TDateTime) : TDateTime function TimeSeparator: char; function TimeStampToDateTime(const TimeStamp: TTimeStamp): TDateTime Function TimeStampToMSecs( TimeStamp : TTimeStamp) : Comp function TimeStampToMSecs(const TimeStamp: TTimeStamp): Comp) Function TimeToStr( DateTime : TDateTime) : string; function TimeToStr(const DateTime: TDateTime): string; Function TimeZoneBias : TDateTime Function ToCommon( const AValue : Double) : Double function ToCommon(const AValue: Double): Double; Function Today : TDateTime Function ToggleBit( const Value : Byte; const Bit : TBitRange) : Byte; Function ToggleBit1( const Value : Shortint; const Bit : TBitRange) : Shortint; Function ToggleBit2( const Value : Smallint; const Bit : TBitRange) : Smallint; Function ToggleBit3( const Value : Word; const Bit : TBitRange) : Word; Function ToggleBit4( const Value : Cardinal; const Bit : TBitRange) : Cardinal; Function ToggleBit5( const Value : Int; const Bit : TBitRange) : Int; Function ToggleBit6( const Value : Int64; const Bit : TBitRange) : Int64; function TokenComponentIdent:String Function TokenFloat : Extended function TokenFloat:Extended Function TokenInt : Longint function TokenInt:LongInt Function TokenString : string function TokenString:String Function TokenSymbolIs( const S : string) : Boolean function TokenSymbolIs(S:String):Boolean Function Tomorrow : TDateTime Function ToRightOf( const pc : TControl; piSpace : Int) : Int Function ToString : string Function TotalVariance( const Data : array of Double) : Extended Function Trace2( AURL : string) : string; Function TrackMenu( Button : TToolButton) : Boolean Function TRANSLATE( SRC, DEST : PCHAR; TOOEM : BOOLEAN) : Int Function TranslateURI( const URI : string) : string Function TranslationMatchesLanguages( Exact : Boolean) : Boolean Function TransparentStretchBlt(DstDC:HDC;DstX,DstY,DstW,DstH:Int;SrcDC:HDC;SrcX,SrcY,SrcW,SrcH:Int;MaskDC:HDC;MaskX, MaskY:Int):Bool Function Trim( S : string) : string; Function Blank( S : string) : string; //alias to Trim Function Trim( S : WideString) : WideString; Function Trim(s : AnyString) : AnyString; Function TrimAllOf( ATrim, AText : String) : String Function TrimLeft( S : string) : string; Function TrimLeft( S : WideString) : WideString; function TrimLeft(const S: string): string) Function TrimRight( S : string) : string; Function TrimRight( S : WideString) : WideString; function TrimRight(const S: string): string) function TrueBoolStrs: array of string Function Trunc(e : Extended) : Longint; Function Trunc64(e: extended): Int64; Function TruncPower( const Base, Exponent : Float) : Float Function TryConvTypeToFamily(const AFrom,ATo:TConvType; out AFamily:TConvFamily):Bool; Function TryConvTypeToFamily1(const AType:TConvType;out AFamily:TConvFamily):Bool; function TryEncodeDate(Year, Month, Day: Word; var Date: TDateTime): Boolean; Function TryEncodeDateDay(const AYear,ADayOfYear:Word out AValue:TDateTime): Bool Function TryEncodeDateMonthWeek(const AY,AMonth,AWeekOfMonth,ADayOfWeek:Word;var AValue:TDateTime):Bool Function TryEncodeDateTime(const AYear,AMonth,ADay,AHour,AMin,ASec,AMilliSecond:Word;out AValue:TDateTime):Bool Function TryEncodeDateWeek(const AY,AWeekOfYear:Word;out AValue:TDateTime;const ADayOfWeek:Word):Bool Function TryEncodeDayOfWeekInMonth(const AYear,AMonth,ANthDayOfWeek,ADayOfWeek:Word;out AVal:TDateTime):Bool function TryEncodeTime(Hour, Min, Sec, MSec: Word; var Time: TDateTime): Boolean; Function TryFloatToDateTime( Value : Extended; AResult : TDateTime) : Boolean Function TryJulianDateToDateTime( const AValue : Double; out ADateTime : TDateTime) : Boolean Function TryLock : Boolean Function TryModifiedJulianDateToDateTime(const AValue:Double;out ADateTime:TDateTime):Boolean Function TryRecodeDateTime(const AValue:TDateTime;const AYear,AMonth,ADay,AHour,AMinute,ASecond, AMilliSecond:Word; out AResult:TDateTime):Boolean Function TryStrToBcd( const AValue : string; var Bcd : TBcd) : Boolean Function TryStrToConv( AText : string; out AValue : Double; out AType : TConvType) : Boolean Function TryStrToDate( S : string; Value : TDateTime) : Boolean; Function TryStrToDateTime( S : string; Value : TDateTime) : Boolean; Function TryStrToTime( S : string; Value : TDateTime) : Boolean; Function TryStrToInt(const S: AnsiString; var I: Int): Boolean; Function TryStrToInt64(const S: AnsiString; var I: Int64): Boolean; function TryStrToBool(const S: string; out Value: Boolean): Boolean; Function TwoByteToWord( AByte1, AByte2 : Byte) : Word Function TwoCharToWord( AChar1, AChar2 : Char) : Word Function TwoToY( const Y : Float) : Float Function UCS4StringToWideString( const S : UCS4String) : WideString Function UIDL( const ADest : TStrings; const AMsgNum : Int) : Boolean function Unassigned: Variant; Function UndoLastChange( FollowChange : Boolean) : Boolean function UniCodeToStr(Value: string): string; Function UnionRect( out Rect : TRect; const R1, R2 : TRect) : Boolean function UnionRect(out Rect: TRect; const R1, R2: TRect): Boolean) Function UnixDateTimeToDelphiDateTime( UnixDateTime : Cardinal) : TDateTime Function UnixPathToDosPath( const Path : string) : string Function UnixToDateTime( const AValue : Int64) : TDateTime function UnixToDateTime(U: Int64): TDateTime; Function UnlockRegion(libOffset Longint;cb: Largeint;dwLockType:Longint):HResult Function UnlockResource( ResData : HGLOBAL) : LongBool Function UnlockVolume( var Handle : THandle) : Boolean Function UnMaskString( Mask, Value : String) : String function UpCase(ch : Char ) : Char; Function UpCaseFirst( const AStr : string) : string Function UpCaseFirstWord( const AStr : string) : string Function UpdateAction( Action : TBasicAction) : Boolean Function UpdateKind : TUpdateKind Function UPDATESTATUS : TUPDATESTATUS Function UpperCase( S : string) : string Function Uppercase(s : AnyString) : AnyString; Function URLDecode( ASrc : string) : string Function URLEncode( const ASrc : string) : string Function UseRightToLeftAlignment : Boolean Function UseRightToLeftAlignmentForField(const AField:TField;Alignment:TAlignment):Bool Function UseRightToLeftReading : Boolean Function UTF8CharLength( Lead : Char) : Int Function UTF8CharSize( Lead : Char) : Int Function UTF8Decode( const S : UTF8String) : WideString Function UTF8Encode( const WS : WideString) : UTF8String Function UTF8LowerCase( const S : UTF8string) : UTF8string Function Utf8ToAnsi( const S : UTF8String) : string Function Utf8ToAnsiEx( const S : UTF8String; const cp : Int) : string Function UTF8UpperCase( const S : UTF8string) : UTF8string Function ValidFieldIndex( FieldIndex : Int) : Boolean Function ValidParentForm(control: TControl): TForm Function Value : Variant Function ValueExists( const Section, Ident : string) : Boolean Function ValueOf( const Key : string) : Int Function ValueInSet(AValue: Variant; ASet: Variant): Boolean; Function VALUEOFKEY( const AKEY : VARIANT) : VARIANT Function VarArrayFromStrings( Strings : TStrings) : Variant Function VarArrayFromWideStrings( Strings : TWideStrings) : Variant Function VarArrayGet(var S : Variant; I : Int) : Variant; Function VarFMTBcd : TVarType Function VarFMTBcdCreate1 : Variant; Function VarFMTBcdCreate2(const AValue : string; Precision, Scale : Word) : Variant; Function VarFMTBcdCreate3(const AValue: Double;Precision: Word; Scale: Word): Variant; Function VarFMTBcdCreate4(const ABcd : TBcd) : Variant; Function Variance(const Data : array of Double) : Extended Function VariantAdd2( const V1 : Variant; const V2 : Variant) : Variant Function VariantAnd2( const V1 : Variant; const V2 : Variant) : Variant Function VariantDiv2( const V1 : Variant; const V2 : Variant) : Variant Function VariantGetElement( const V : Variant; i1 : Int) : Variant; Function VariantGetElement1( const V : Variant; i1, i2 : Int) : Variant; Function VariantGetElement2( const V : Variant; i1, i2, i3 : Int) : Variant; Function VariantGetElement3( const V : Variant; i1, i2, i3, i4 : Int) : Variant; Function VariantGetElement4( const V : Variant; i1, i2, i3, i4, i5 : Int): Variant; Function VariantMod2( const V1 : Variant; const V2 : Variant) : Variant Function VariantMul2( const V1 : Variant; const V2 : Variant) : Variant Function VariantNeg( const V1 : Variant) : Variant Function VariantNot( const V1 : Variant) : Variant Function VariantOr2( const V1 : Variant; const V2 : Variant) : Variant Function VariantShl2( const V1 : Variant; const V2 : Variant) : Variant Function VariantShr2( const V1 : Variant; const V2 : Variant) : Variant Function VariantSub2( const V1 : Variant; const V2 : Variant) : Variant Function VariantXor2( const V1 : Variant; const V2 : Variant) : Variant function VarIsEmpty(const V: Variant): Boolean; Function VarIsFMTBcd( const AValue : Variant) : Boolean; function VarIsNull(const V: Variant): Boolean; Function VarToBcd( const AValue : Variant) : TBcd function VarType(const V: Variant): TVarType; Function VarType( const V : Variant) : TVarType Function VarAsType( const V : Variant; AVarType : TVarType) : Variant Function VarIsType( const V : Variant; AVarType : TVarType) : Boolean; Function VarIsType1(const V: Variant;const AVarTypes: array of TVarType): Bool; Function VarIsByRef( const V : Variant) : Boolean Function VarIsEmpty( const V : Variant) : Boolean Procedure VarCheckEmpty( const V : Variant) Function VarIsNull( const V : Variant) : Boolean Function VarIsClear( const V : Variant) : Boolean Function VarIsCustom( const V : Variant) : Boolean Function VarIsOrdinal( const V : Variant) : Boolean Function VarIsFloat( const V : Variant) : Boolean Function VarIsNumeric( const V : Variant) : Boolean Function VarIsStr( const V : Variant) : Boolean Function VarToStr( const V : Variant) : string Function VarToStrDef( const V : Variant; const ADefault : string) : string Function VarToWideStr( const V : Variant) : WideString Function VarToWideStrDef( const V : Variant; const ADefault : WideString) : WideString Function VarToDateTime( const V : Variant) : TDateTime Function VarFromDateTime( const DateTime : TDateTime) : Variant Function VarInRange( const AValue, AMin, AMax : Variant) : Boolean Function VarEnsureRange( const AValue, AMin, AMax : Variant) : Variant TVariantRelationship', '( vrEqual, vrLessThan, vrGreaterThan, vrNotEqual ) Function VarSameValue( const A, B : Variant) : Boolean Function VarCompareValue( const A, B : Variant) : TVariantRelationship Function VarIsEmptyParam( const V : Variant) : Boolean Function VarIsError( const V : Variant; out AResult : HRESULT) : Boolean; Function VarIsError1( const V : Variant) : Boolean; Function VarAsError( AResult : HRESULT) : Variant Procedure VarCopyNoInd( var Dest : Variant; const Source : Variant) Function VarIsArray( const A : Variant) : Boolean; Function VarIsArray1( const A : Variant; AResolveByRef : Boolean) : Boolean; Function VarArrayCreate( const Bounds : array of Int; AVarType : TVarType) : Variant Function VarArrayOf( const Values : array of Variant) : Variant Function VarArrayRef( const A : Variant) : Variant Function VarTypeIsValidArrayType( const AVarType : TVarType) : Boolean Function VarTypeIsValidElementType( const AVarType : TVarType) : Boolean Function VarArrayDimCount( const A : Variant) : Int Function VarArrayLowBound( const A : Variant; Dim : Int) : Int Function VarArrayHighBound( const A : Variant; Dim : Int) : Int Function VarArrayLock( const A : Variant) : ___Pointer Procedure VarArrayUnlock( const A : Variant) Function VarArrayGet( const A : Variant; const Indices : array of Int) : Variant Procedure VarArrayPut(var A:Variant;const Value:Variant;const Indices: array of Int) Procedure DynArrayToVariant(var V: Variant;const DynArray: ___Pointer;TypeInfo: ___Pointer) Procedure DynArrayFromVariant(var DynArray:___Pointer;const V: Variant;TypeInfo:___Pointer) Function Unassigned : Variant Function Null : Variant Function VectorAdd( const V1, V2 : TFloatPoint) : TFloatPoint function VectorAdd(const V1,V2: TFloatPoint): TFloatPoint; Function VectorDot( const V1, V2 : TFloatPoint) : Double function VectorDot(const V1,V2: TFloatPoint): Double; Function VectorLengthSqr( const V : TFloatPoint) : Double function VectorLengthSqr(const V: TFloatPoint): Double; Function VectorMult( const V : TFloatPoint; const s : Double) : TFloatPoint function VectorMult(const V: TFloatPoint; const s: Double): TFloatPoint; Function VectorSubtract( const V1, V2 : TFloatPoint) : TFloatPoint function VectorSubtract(const V1,V2: TFloatPoint): TFloatPoint; Function Verify( AUserName : String) : String Function Versine( X : Float) : Float function VersionCheck: boolean; function VersionCheckAct: string; Function VersionLanguageId( const LangIdRec : TLangIdRec) : string Function VersionLanguageName( const LangId : Word) : string Function VersionResourceAvailable( const FileName : string) : Boolean Function Visible : Boolean function VolumeID(DriveChar: Char): string Function WaitFor( const AString : string) : string Function WaitFor( const TimeOut : Cardinal) : TJclWaitResult Function WaitFor1 : TWaitResult; Function WaitForData( Timeout : Longint) : Boolean Function WebColorNameToColor( WebColorName : string) : TColor Function WebColorStrToColor( WebColor : string) : TColor Function WebColorToRGB( WebColor : Int) : Int Function wGet(aURL, afile: string): boolean;' Function wGet2(aURL, afile: string): boolean;' //without file open Function wGetX(aURL, afile: string): boolean; Function wGetX2(aURL, afile: string): boolean;' //without file open Function WebGet(aURL, afile: string): boolean;' Function WebExists: boolean; //alias to isinternet Function WeekOf( const AValue : TDateTime) : Word Function WeekOfTheMonth( const AValue : TDateTime) : Word; Function WeekOfTheMonth1( const AValue : TDateTime; var AYear, AMonth : Word) : Word; Function WeekOfTheYear( const AValue : TDateTime) : Word; Function WeekOfTheYear1( const AValue : TDateTime; var AYear : Word) : Word; Function WeeksBetween( const ANow, AThen : TDateTime) : Int Function WeeksInAYear( const AYear : Word) : Word Function WeeksInYear( const AValue : TDateTime) : Word Function WeekSpan( const ANow, AThen : TDateTime) : Double Function WideAdjustLineBreaks( const S : WideString; Style : TTextLineBreakStyle): WideString Function WideCat( const x, y : WideString) : WideString Function WideCompareStr( S1, S2 : WideString) : Int function WideCompareStr(const S1: WideString; const S2: WideString): Int) Function WideCompareText( S1, S2 : WideString) : Int function WideCompareText(const S1: WideString; const S2: WideString): Int) Function WideCopy( const src : WideString; index, count : Int) : WideString Function WideDequotedStr( const S : WideString; AQuote : WideChar) : WideString Function WideEqual( const x, y : WideString) : Boolean function WideFormat(const Format: WideString; const Args: array of const): WideString) Function WideGreater( const x, y : WideString) : Boolean Function WideLength( const src : WideString) : Int Function WideLess( const x, y : WideString) : Boolean Function WideLowerCase( S : WideString) : WideString function WideLowerCase(const S: WideString): WideString) Function WidePos( const src, sub : WideString) : Int Function WideQuotedStr( const S : WideString; Quote : WideChar) : WideString Function WideReplaceStr( const AText, AFromText, AToText : WideString) : WideString Function WideReplaceText( const AText, AFromText, AToText : WideString) : WideString Function WideSameStr( S1, S2 : WideString) : Boolean function WideSameStr(const S1: WideString; const S2: WideString): Boolean) Function WideSameText( S1, S2 : WideString) : Boolean function WideSameText(const S1: WideString; const S2: WideString): Boolean) Function WideStringReplace(const S,OldPattern,NewPattern:Widestring;Flags:TReplaceFlags): Widestring Function WideStringToUCS4String( const S : WideString) : UCS4String Function WideUpperCase( S : WideString) : WideString Function Win32BackupFile( const FileName : string; Move : Boolean) : Boolean function Win32Check(RetVal: boolean): boolean) Function Win32DeleteFile(const FileName:string; MoveToRecycleBin:Boolean):Bool Function Win32RestoreFile( const FileName : string) : Boolean Function Win32Type : TIdWin32Type Function WinColor( const Color32 : TColor32) : TColor function winexec(FileName: pchar; showCmd: Int): Int; Function WinExec32( const Cmd : string; const CmdShow : Int) : Boolean Function WinExec32AndWait( const Cmd : string; const CmdShow : Int) : Cardinal Function WithinPastDays( const ANow, AThen : TDateTime; const ADays : Int) : Boolean Function WithinPastHours(const ANow, AThen:TDateTime; const AHours : Int64): Boolean Function WithinPastMilliSeconds(const ANow,AThen:TDateTime;const AMilliSeconds:Int64):Bool Function WithinPastMinutes(const ANow,AThen:TDateTime;const AMinutes:Int64):Boolean Function WithinPastMonths(const ANow, AThen:TDateTime; const AMonths:Int): Boolean Function WithinPastSeconds(const ANow,AThen: DateTime;const ASeconds:Int64): Boolean Function WithinPastWeeks( const ANow, AThen : TDateTime; const AWeeks : Int): Boolean Function WithinPastYears( const ANow, AThen : TDateTime; const AYears : Int): Boolean Function WNetAddConnection( lpRemoteName, lpPassword, lpLocalName : PChar): DWORD Function WordToStr( const Value : Word) : String Function WordGridFormatIdentToInt(const Ident: string; var Value:Longint): Boolean Function IntToWordGridFormatIdent( Value : Longint; var Ident : string) : Boolean Procedure GetWordGridFormatValues( Proc : TGetStrProc) Function WorkArea : Int Function WrapText( Line : string; MaxCol : Int) : string; Function WrapText2(Line, BreakStr:string;BreakChars:TSysCharSet;MaxCol:Int):string; Function Write( pv : Pointer; cb : Longint; pcbWritten : PLongint) : HResult function Write(Buffer:String;Count:LongInt):LongInt Function WriteClient( var Buffer, Count : Int) : Int Function WriteFile(const AFile:string; const AEnableTransferFile:Boolean): Cardinal Function WriteHeaders(StatusCode: Int; const ReasonString, Headers: string): Boolean Function WriteString( const AString : string) : Boolean Function WStrGet(var S : AnyString; I : Int) : WideChar; Function wvsprintf( Output : PChar; Format : PChar; arglist : va_list) : Int Function wsprintf( Output : PChar; Format : PChar) : Int Function XmlDateTimeToStr( const XmlDateTime : string; const Format : string) : string Function XmlTimeToStr( const XmlTime : string; const Format : string) : string Function XorDecode( const Key, Source : string) : string Function XorEncode( const Key, Source : string) : string Function XorString( const Key, Src : ShortString) : ShortString Function Yield : Bool Function YearOf( const AValue : TDateTime) : Word Function YearsBetween( const ANow, AThen : TDateTime) : Int Function YearSpan( const ANow, AThen : TDateTime) : Double Function Yesterday : TDateTime Function YesNoDialog(const ACaption, AMsg: string): boolean; Function( const Name : string; Proc : TUserFunction) Function using Special_Scholz from V 3.8.5.0 Function TimeToFloat(value:Extended):Extended; // Normalstunden --> Industriestunden Function FloatToTime(value:Extended):Extended; // Industriestunden --> Normalstunden Function FloatToTime2Dec(value:Extended):Extended; Function MinToStd(value:Extended):Extended; Function MinToStdAsString(value:Extended):String; Function RoundFloatToStr(zahl:Extended; decimals:Int):String; Function RoundFloat(zahl:Extended; decimals:Int):Extended; Function Round2Dec (zahl:Extended):Extended; Function GetAngle(x,y:Extended):Double; Function AddAngle(a1,a2:Double):Double; ********************************************************************* unit uPSI_StText; ********************************************************************* Function TextSeek( var F : TextFile; Target : LongInt) : Boolean Function TextFileSize( var F : TextFile) : LongInt Function TextPos( var F : TextFile) : LongInt Function TextFlush( var F : TextFile) : Boolean ********************************************************************* from JvVCLUtils; ********************************************************************* { Windows resources (bitmaps and icons) VCL-oriented routines } procedure DrawBitmapTransparent(Dest:TCanvas;DstX,DstY:Int;Bitmap:TBitmap;TransparentColor:TColor); procedure DrawBitmapRectTransparent(Dest: TCanvas;DstX,DstY:Int;SrcRect:TRect;Bitmap:TBitmap;TransparColor:TColor); procedure StretchBitmapRectTransparent(Dest: TCanvas; DstX, DstY, DstW,DstH: Int; SrcRect: TRect; Bitmap: TBitmap; TransparentColor:TColor); function MakeBitmap(ResID: PChar): TBitmap; function MakeBitmapID(ResID: Word): TBitmap; function MakeModuleBitmap(Module: THandle; ResID: PChar): TBitmap; function CreateTwoColorsBrushPattern(Color1, Color2: TColor): TBitmap; function CreateDisabledBitmap_NewStyle(FOriginal: TBitmap; BackColor: TColor): TBitmap; function CreateDisabledBitmapEx(FOriginal: TBitmap; OutlineColor, BackColor, HighlightColor, ShadowColor: TColor; DrawHighlight: Boolean): TBitmap; function CreateDisabledBitmap(FOriginal: TBitmap; OutlineColor: TColor): TBitmap; function ChangeBitmapColor(Bitmap: TBitmap; Color, NewColor: TColor): TBitmap; procedure AssignBitmapCell(Source: TGraphic; Dest: TBitmap; Cols, Rows,Index: Int); {$IFDEF WIN32} procedure ImageListDrawDisabled(Images: TImageList; Canvas: TCanvas; X, Y, Index: Int; HighlightColor, GrayColor: TColor; DrawHighlight: Boolean); {$ENDIF} function MakeIcon(ResID: PChar): TIcon; function MakeIconID(ResID: Word): TIcon; function MakeModuleIcon(Module: THandle; ResID: PChar): TIcon; function CreateBitmapFromIcon(Icon: TIcon; BackColor: TColor): TBitmap; {$IFDEF WIN32} function CreateIconFromBitmap(Bitmap: TBitmap; TransparentColor: TColor): TIcon; {$ENDIF} { Service routines } procedure NotImplemented; procedure ResourceNotFound(ResID: PChar); function PointInRect(const P: TPoint; const R: TRect): Boolean; function PointInPolyRgn(const P: TPoint; const Points: array of TPoint): Boolean; function PaletteColor(Color: TColor): Longint; function WidthOf(R: TRect): Int; function HeightOf(R: TRect): Int; procedure PaintInverseRect(const RectOrg, RectEnd: TPoint); procedure DrawInvertFrame(ScreenRect: TRect; Width: Int); procedure CopyParentImage(Control: TControl; Dest: TCanvas); procedure Delay(MSecs: Longint); procedure DeleteLine(StrList: TStringList; SearchPattern: String); procedure CenterControl(Control: TControl); Function PaletteEntries( Palette : HPALETTE) : Int Function WindowClassName( Wnd : HWND) : string Function ScreenWorkArea : TRect Procedure MoveWindowOrg( DC : HDC; DX, DY : Int) Procedure SwitchToWindow( Wnd : HWND; Restore : Boolean) Procedure ActivateWindow( Wnd : HWND) Procedure ShowWinNoAnimate( Handle : HWND; CmdShow : Int) Procedure CenterWindow( Wnd : HWND) Procedure ShadeRect( DC : HDC; const Rect : TRect) Procedure KillMessage( Wnd : HWND; Msg : Cardinal) Function DialogsToPixelsX( Dlgs : Word) : Word Function DialogsToPixelsY( Dlgs : Word) : Word Function PixelsToDialogsX( Pixs : Word) : Word Function PixelsToDialogsY( Pixs : Word) : Word {$IFDEF WIN32} procedure ShowMDIClientEdge(ClientHandle: THandle; ShowEdge: Boolean); function MakeVariant(const Values: array of Variant): Variant; {$ENDIF} function CreateRotatedFont(Font: TFont; Angle: Int): HFONT; function MsgBox(const Caption, Text: string; Flags: Int): Int; function MsgDlg(const Msg:string; AType:TMsgDlgType; AButtons: TMsgDlgButtons; HelpCtx:Longint): Word; {$IFDEF CBUILDER} function FindPrevInstance(const MainFormClass: ShortString; const ATitle: string): HWND; function ActivatePrevInstance(const MainFormClass: ShortString; const ATitle: string): Boolean; {$ELSE} function FindPrevInstance(const MainFormClass, ATitle: string): HWND; function ActivatePrevInstance(const MainFormClass, ATitle: string): Boolean; {$ENDIF CBUILDER} function IsForegroundTask: Boolean; procedure MergeForm(AControl: TWinControl; AForm: TForm; Align: TAlign; Show: Boolean); function GetAveCharSize(Canvas: TCanvas): TPoint; function MinimizeText(const Text: string; Canvas: TCanvas; MaxWidth: Int): string; procedure FreeUnusedOle; procedure Beep; function GetWindowsVersionJ: string; function LoadDLL(const LibName: string): THandle; function RegisterServer(const ModuleName: string): Boolean; {$IFNDEF WIN32} function IsLibrary: Boolean; {$ENDIF} { Gradient filling routine } type TFillDirection = (fdTopToBottom, fdBottomToTop, fdLeftToRight, fdRightToLeft); procedure GradientFillRect(Canvas:TCanvas; ARect:TRect;StartColor,EndColor:TColor;Direction:TFillDirection;Colors: Byte); { String routines } function GetEnvVar(const VarName: string): string; function AnsiUpperFirstChar(const S: string): string; function StringToPChar(var S: string): PChar; function StrPAlloc(const S: string): PChar; procedure SplitCommandLine(const CmdLine: string; var ExeName,Params: string); function DropT(const S: string): string; { Memory routines } function AllocMemo(Size: Longint): Pointer; function ReallocMemo(fpBlock: Pointer; Size: Longint): Pointer; procedure FreeMemo(var fpBlock: Pointer); function GetMemoSize(fpBlock: Pointer): Longint; function CompareMem(fpBlock1, fpBlock2: Pointer; Size: Cardinal): Boolean; {$IFNDEF COMPILER5_UP} procedure FreeAndNil(var Obj); {$ENDIF} // from PNGLoader Function OptimizeForPNG(Image:TLinearBitmap;QuantizationSteps:Int;TransparentColor:TColor):Int Procedure TransformRGB2LOCO( Image : TLinearBitmap) Procedure TransformLOCO2RGB( Image : TLinearBitmap) Procedure SortPalette( const Pal : TPalette; var ColorMap : TColorMap) Function DrawButtonFace( Canvas : TCanvas; const Client : TRect; BevelWidth : Int; Style: TButtonStyle; IsRounded, IsDown, IsFocused : Boolean) : TRect //TButtons Function IsAnAllResult( const AModalResult : TModalResult) : Boolean Function InitWndProc( HWindow : HWnd; Message, WParam : Longint; LParam : Longint) : Longint AddConstantN('CTL3D_ALL','LongWord').SetUInt( $FFFF); //Procedure ChangeBiDiModeAlignment( var Alignment : TAlignment) //Function SendAppMessage( Msg : Cardinal; WParam, LParam : Longint) : Longint //Procedure MoveWindowOrg( DC : HDC; DX, DY : Int) Procedure SetImeMode( hWnd : HWND; Mode : TImeMode) Procedure SetImeName( Name : TImeName) Function Win32NLSEnableIME( hWnd : HWND; Enable : Boolean) : Boolean Function Imm32GetContext( hWnd : HWND) : HIMC Function Imm32ReleaseContext( hWnd : HWND; hImc : HIMC) : Boolean Function Imm32GetConversionStatus( hImc : HIMC; var Conversion, Sentence : longword) : Boolean Function Imm32SetConversionStatus( hImc : HIMC; Conversion, Sentence : longword) : Boolean Function Imm32SetOpenStatus( hImc : HIMC; fOpen : Boolean) : Boolean // Function Imm32SetCompositionWindow( hImc : HIMC; lpCompForm : PCOMPOSITIONFORM) : Boolean //Function Imm32SetCompositionFont( hImc : HIMC; lpLogfont : PLOGFONTA) : Boolean Function Imm32GetCompositionString(hImc:HIMC;dWord1:longword;lpBuf:string;dwBufLen:longint):Longint Function Imm32IsIME( hKl : longword) : Boolean Function Imm32NotifyIME( hImc : HIMC; dwAction, dwIndex, dwValue:longword):Boolean Procedure DragDone( Drop : Boolean) //****************************************add from jvjvclutils function CanvasMaxTextHeight(Canvas: TCanvas): Int; function ReplaceComponentReference(This,NewReference:TComponent;var VarReference:TComponent):Boolean; procedure DrawLine(Canvas: TCanvas; X, Y, X2, Y2: Int); function IsPositiveResult(Value: TModalResult): Boolean; function IsNegativeResult(Value: TModalResult): Boolean; function IsAbortResult(const Value: TModalResult): Boolean; function StripAllFromResult(const Value: TModalResult): TModalResult; // returns either BrightColor or DarkColor depending on the luminance of AColor // This function gives the same result (AFAIK) as the function used in Windows to // calculate the desktop icon text color based on the desktop background color function SelectColorByLuminance(AColor, DarkColor, BrightColor: TColor): TColor; type TJvHTMLCalcType = (htmlShow, htmlCalcWidth, htmlCalcHeight, htmlHyperLink); procedure HTMLDrawTextEx(Canvas: TCanvas; Rect: TRect; const State: TOwnerDrawState; const Text: string; var Width: Int; CalcType: TJvHTMLCalcType; MouseX, MouseY: Int; var MouseOnLink: Boolean; var LinkName: string; Scale: Int = 100); overload; procedure HTMLDrawTextEx(Canvas: TCanvas; Rect: TRect; const State: TOwnerDrawState; const Text: string; var Width, Height: Int; CalcType: TJvHTMLCalcType; MouseX, MouseY: Int; var MouseOnLink: Boolean; var LinkName: string; Scale: Int = 100); overload; function HTMLDrawText(Canvas: TCanvas; Rect: TRect; const State: TOwnerDrawState; const Text: string; Scale: Int = 100): string; function HTMLDrawTextHL(Canvas: TCanvas; Rect: TRect; const State: TOwnerDrawState; const Text: string; MouseX, MouseY: Int; Scale: Int = 100): string; function HTMLPlainText(const Text: string): string; function HTMLTextExtent(Canvas: TCanvas; Rect: TRect; const State: TOwnerDrawState; const Text: string; Scale: Int = 100): TSize; function HTMLTextWidth(Canvas: TCanvas; Rect: TRect; const State: TOwnerDrawState; const Text: string; Scale: Int = 100): Int; function HTMLTextHeight(Canvas: TCanvas; const Text: string; Scale: Int = 100): Int; function HTMLPrepareText(const Text: string): string; ****************************************** uPSI_JvAppUtils; Function GetDefaultSection( Component : TComponent) : string Procedure GetDefaultIniData(Control:TControl; var IniFileName, Section : string; UseRegistry : Boolean) Procedure GetDefaultIniData( Control : TControl; var IniFileName, Section : string) Function GetDefaultIniName : string //'OnGetDefaultIniName','TOnGetDefaultIniName); Function GetDefaultIniRegKey : string Function FindForm( FormClass : TFormClass) : TForm Function FindShowForm( FormClass : TFormClass; const Caption : string) : TForm Function ShowDialog( FormClass : TFormClass) : Boolean //Function InstantiateForm( FormClass : TFormClass; var Reference) : TForm Procedure SaveFormPlacement( Form : TForm; const IniFileName : string; UseRegistry : Boolean) Procedure RestoreFormPlacement(Form : TForm; const IniFileName : string; UseRegistry : Boolean) Procedure SaveMDIChildrenReg( MainForm : TForm; IniFile : TRegIniFile) Procedure SaveFormPlacement( Form : TForm; const IniFileName : string) Procedure RestoreFormPlacement( Form : TForm; const IniFileName : string) Function GetUniqueFileNameInDir( const Path, FileNameMask : string) : string Function StrToIniStr( const Str : string) : string Function IniStrToStr( const Str : string) : string Function IniReadString( IniFile : TObject; const Section, Ident, Default : string) : string Procedure IniWriteString( IniFile : TObject; const Section, Ident, Value : string) Function IniReadInt( IniFile : TObject; const Section, Ident : string; Default : Longint) : Longint Procedure IniWriteInt( IniFile : TObject; const Section, Ident : string; Value : Longint) Function IniReadBool( IniFile : TObject; const Section, Ident : string; Default : Boolean) : Boolean Procedure IniWriteBool( IniFile : TObject; const Section, Ident : string; Value : Boolean) Procedure IniReadSections( IniFile : TObject; Strings : TStrings) Procedure IniEraseSection( IniFile : TObject; const Section : string) Procedure IniDeleteKey( IniFile : TObject; const Section, Ident : string) Procedure AppBroadcast( Msg, wParam : Longint; lParam : Longint) Procedure AppBroadcast( Msg, wParam : Word; lParam : Longint) Procedure AppTaskbarIcons( AppOnly : Boolean) Procedure InternalSaveGridLayout(Grid : TCustomGrid; IniFile : TObject; const Section : string) Procedure InternalRestoreGridLayout( Grid : TCustomGrid; IniFile : TObject; const Section : string) Procedure InternalSaveMDIChildren( MainForm : TForm; IniFile : TObject) Procedure InternalRestoreMDIChildren( MainForm : TForm; IniFile : TObject) ******************************************* uPSI_JvDBUtils; Function CreateLocate( DataSet : TDataSet) : TJvLocateObject Function IsDataSetEmpty( DataSet : TDataSet) : Boolean Procedure RefreshQuery( Query : TDataSet) Function DataSetSortedSearch(DataSet:TDataSet;const Value,FieldName:string;CaseInsensitive:Bool):Boolean Function DataSetSectionName( DataSet : TDataSet) : string Procedure InternalSaveFields( DataSet : TDataSet; IniFile : TObject; const Section : string) Procedure InternalRestoreFields(DataSet:TDataSet;IniFile:TObject;const Section:string;RestoreVisible:Bool) Function DataSetLocateThrough(DataSet:TDataSet;const KeyFields:string;const KeyValues:Variant;Options:TLocateOptions):Bool Procedure SaveFields( DataSet : TDataSet; IniFile : TIniFile) Procedure RestoreFields( DataSet : TDataSet; IniFile : TIniFile; RestoreVisible : Boolean) Procedure AssignRecord( Source, Dest : TDataSet; ByName : Boolean) Function ConfirmDelete : Boolean Procedure ConfirmDataSetCancel( DataSet : TDataSet) Procedure CheckRequiredField( Field : TField) Procedure CheckRequiredFields( const Fields : array of TField) Function DateToSQL( Value : TDateTime) : string Function FormatSQLDateRange( Date1, Date2 : TDateTime; const FieldName : string) : string Function FormatSQLDateRangeEx( Date1, Date2 : TDateTime; const FieldName : string) : string Function FormatSQLNumericRange(const FieldName:string;LowVal,HighVal,LowEmpty,HighEmpty:Double;Inclusive:Bool):string Function StrMaskSQL( const Value : string) : string Function FormatSQLCondition(const FieldName,Operator,Val:string;FieldType:TFieldType;Exact:Bool):string Function FormatAnsiSQLCondition(const FieldName,Operator,Val:string;FieldType:TFieldType;Exact:Bool):string Procedure _DBError( const Msg : string) Const('TrueExpr','String '0=0 Const('sdfStandard16','String '''"''mm''/''dd''/''yyyy''"'' Const('sdfStandard32','String '''''''dd/mm/yyyy'''''' Const('sdfOracle','String '"TO_DATE(''"dd/mm/yyyy"'', ''DD/MM/YYYY'')" Const('sdfInterbase','String '"CAST(''"mm"/"dd"/"yyyy"'' AS DATE)" Const('sdfMSSQL','String '"CONVERT(datetime, ''"mm"/"dd"/"yyyy"'', 103)" AddTypeS('Largeint', 'Longint TIFException', '(ErNoError, erCannotImport, erInvalidType, ErInternalError, '+ erInvalidHeader, erInvalidOpcode, erInvalidOpcodeParameter, erNoMainProc, erOutOfGlobalVarsRange, '+ erOutOfProcRange, ErOutOfRange, erOutOfStackRange, ErTypeMismatch, erUnexpectedEof, '+ erVersionError, ErDivideByZero, ErMathError,erCouldNotCallProc, erOutofRecordRange, '+ 'erOutOfMemory,erException,erNullPointerException,erNullVariantErrorerInterfaceNotSupportederError); (*----------------------------------------------------------------------------*) procedure SIRegister_JclIniFiles(CL: TPSPascalCompiler); begin Function JIniReadBool( const FileName, Section, Line : string) : Boolean Function JIniReadInt( const FileName, Section, Line : string) : Int Function JIniReadString( const FileName, Section, Line : string) : string Procedure JIniWriteBool( const FileName, Section, Line : string; Value : Boolean) Procedure JIniWriteInt( const FileName, Section, Line : string; Value : Int) Procedure JIniWriteString( const FileName, Section, Line, Value : string) Procedure JIniReadStrings( IniFile : TCustomIniFile; const Section : string; Strings : TStrings) Procedure JIniWriteStrings( IniFile : TCustomIniFile; const Section : string; Strings : TStrings) end; (* === compile-time registration functions === *) (*----------------------------------------------------------------------------*) procedure SIRegister_JclDateTime(CL: TPSPascalCompiler); begin 'UnixTimeStart','LongInt'( 25569); Function JEncodeDate( const Year : Int; Month, Day : Word) : TDateTime Procedure JDecodeDate( Date : TDateTime; var Year, Month, Day : Word); Procedure DecodeDate1( Date : TDateTime; var Year : Int; var Month, Day : Word); Procedure DecodeDate2( Date : TDateTime; var Year, Month, Day : Int); Function CenturyOfDate( const DateTime : TDateTime) : Int Function CenturyBaseYear( const DateTime : TDateTime) : Int Function DayOfDate( const DateTime : TDateTime) : Int Function MonthOfDate( const DateTime : TDateTime) : Int Function YearOfDate( const DateTime : TDateTime) : Int Function JDayOfTheYear( const DateTime : TDateTime; var Year : Int) : Int; Function DayOfTheYear1( const DateTime : TDateTime) : Int; Function DayOfTheYearToDateTime( const Year, Day : Int) : TDateTime Function HourOfTime( const DateTime : TDateTime) : Int Function MinuteOfTime( const DateTime : TDateTime) : Int Function SecondOfTime( const DateTime : TDateTime) : Int Function GetISOYearNumberOfDays( const Year : Word) : Word Function IsISOLongYear( const Year : Word) : Boolean; Function IsISOLongYear1( const DateTime : TDateTime) : Boolean; Function ISODayOfWeek( const DateTime : TDateTime) : Word Function JISOWeekNumber(DateTime:TDateTime; var YearOfWeekNumber,WeekDay: Int) : Int; Function ISOWeekNumber1( DateTime : TDateTime; var YearOfWeekNumber : Int) : Int; Function ISOWeekNumber2( DateTime : TDateTime) : Int; Function ISOWeekToDateTime( const Year, Week, Day : Int) : TDateTime Function JIsLeapYear( const Year : Int) : Boolean; Function IsLeapYear1( const DateTime : TDateTime) : Boolean; Function JDaysInMonth( const DateTime : TDateTime) : Int Function Make4DigitYear( Year, Pivot : Int) : Int Function JMakeYear4Digit( Year, WindowsillYear : Int) : Int Function JEasterSunday( const Year : Int) : TDateTime // TDosDateTime', 'Int Function JFormatDateTime( Form : string; DateTime : TDateTime) : string Function FATDatesEqual( const FileTime1, FileTime2 : Int64) : Boolean; Function FATDatesEqual1( const FileTime1, FileTime2 : TFileTime) : Boolean; Function HoursToMSecs( Hours : Int) : Int Function MinutesToMSecs( Minutes : Int) : Int Function SecondsToMSecs( Seconds : Int) : Int Function TimeOfDateTimeToSeconds( DateTime : TDateTime) : Int Function TimeOfDateTimeToMSecs( DateTime : TDateTime) : Int Function DateTimeToLocalDateTime( DateTime : TDateTime) : TDateTime Function LocalDateTimeToDateTime( DateTime : TDateTime) : TDateTime Function DateTimeToDosDateTime( const DateTime : TDateTime) : TDosDateTime Function JDateTimeToFileTime( DateTime : TDateTime) : TFileTime Function JDateTimeToSystemTime( DateTime : TDateTime) : TSystemTime; Procedure DateTimeToSystemTime1( DateTime : TDateTime; var SysTime : TSystemTime); Function LocalDateTimeToFileTime( DateTime : TDateTime) : FileTime Function DosDateTimeToDateTime( const DosTime : TDosDateTime) : TDateTime Function JDosDateTimeToFileTime( DosTime : TDosDateTime) : TFileTime; Procedure DosDateTimeToFileTime1( DTH, DTL : Word; FT : TFileTime); Function DosDateTimeToSystemTime( const DosTime : TDosDateTime) : TSystemTime Function DosDateTimeToStr( DateTime : Int) : string Function JFileTimeToDateTime( const FileTime : TFileTime) : TDateTime Function FileTimeToLocalDateTime( const FileTime : TFileTime) : TDateTime Function JFileTimeToDosDateTime( const FileTime : TFileTime) : TDosDateTime; Procedure FileTimeToDosDateTime1( const FileTime : TFileTime; var Date, Time : Word); Function JFileTimeToSystemTime( const FileTime : TFileTime) : TSystemTime; Procedure FileTimeToSystemTime1( const FileTime : TFileTime; var ST : TSystemTime); Function FileTimeToStr( const FileTime : TFileTime) : string Function SystemTimeToDosDateTime( const SystemTime : TSystemTime) : TDosDateTime Function JSystemTimeToFileTime( const SystemTime : TSystemTime) : TFileTime; Procedure SystemTimeToFileTime1( const SystemTime : TSystemTime; FTime : TFileTime); Function SystemTimeToStr( const SystemTime : TSystemTime) : string Function CreationDateTimeOfFile( const Sr : TSearchRec) : TDateTime Function LastAccessDateTimeOfFile( const Sr : TSearchRec) : TDateTime Function LastWriteDateTimeOfFile( const Sr : TSearchRec) : TDateTime TJclUnixTime32', 'Longword Function JDateTimeToUnixTime( DateTime : TDateTime) : TJclUnixTime32 Function JUnixTimeToDateTime( const UnixTime : TJclUnixTime32) : TDateTime Function FileTimeToUnixTime( const AValue : TFileTime) : TJclUnixTime32 Function UnixTimeToFileTime( const AValue : TJclUnixTime32) : TFileTime Function JNullStamp : TTimeStamp Function JCompareTimeStamps( const Stamp1, Stamp2 : TTimeStamp) : Int64 Function JEqualTimeStamps( const Stamp1, Stamp2 : TTimeStamp) : Boolean Function JIsNullTimeStamp( const Stamp : TTimeStamp) : Boolean Function TimeStampDOW( const Stamp : TTimeStamp) : Int Function FirstWeekDay( const Year, Month : Int; var DOW : Int) : Int; Function FirstWeekDay1( const Year, Month : Int) : Int; Function LastWeekDay( const Year, Month : Int; var DOW : Int) : Int; Function LastWeekDay1( const Year, Month : Int) : Int; Function IndexedWeekDay( const Year, Month : Int; Index : Int) : Int Function FirstWeekendDay( const Year, Month : Int; var DOW : Int) : Int; Function FirstWeekendDay1( const Year, Month : Int) : Int; Function LastWeekendDay( const Year, Month : Int; var DOW : Int) : Int; Function LastWeekendDay1( const Year, Month : Int) : Int; Function IndexedWeekendDay( const Year, Month : Int; Index : Int) : Int Function FirstDayOfWeek( const Year, Month, DayOfWeek : Int) : Int Function LastDayOfWeek( const Year, Month, DayOfWeek : Int) : Int Function IndexedDayOfWeek( const Year, Month, DayOfWeek, Index : Int) : Int FindClass('TOBJECT'),'EJclDateTimeError end; procedure SIRegister_JclMiscel2(CL: TPSPascalCompiler); begin Function SetDisplayResolution( const XRes, YRes : DWORD) : Longint Function CreateDOSProcessRedirected(const CommandLine, InputFile,OutputFile:string): Boolean Function WinExec32( const Cmd : string; const CmdShow : Int) : Boolean Function WinExec32AndWait( const Cmd : string; const CmdShow : Int) : Cardinal Function WinExec32AndRedirectOutput(const Cmd:string;var Output:string;RawOutput:Bool):Cardinal TJclKillLevel', '( klNormal, klNoSignal, klTimeOut ) Function ExitWindows( ExitCode : Cardinal) : Boolean Function LogOffOS( KillLevel : TJclKillLevel) : Boolean Function PowerOffOS( KillLevel : TJclKillLevel) : Boolean Function ShutDownOS( KillLevel : TJclKillLevel) : Boolean Function RebootOS( KillLevel : TJclKillLevel) : Boolean Function HibernateOS( Force, DisableWakeEvents : Boolean) : Boolean Function SuspendOS( Force, DisableWakeEvents : Boolean) : Boolean Function ShutDownDialog(const DialogMessage:string;TimeOut:DWORD;Force,Reboot:Bool):Bool; Function ShutDownDialog1(const MachineName,DialogMessage:string;TimeOut:DWORD;Force,Reboot:Bool):Bool; Function AbortShutDown : Boolean; Function AbortShutDown1( const MachineName : string) : Boolean; TJclAllowedPowerOperation', '( apoHibernate, apoShutdown, apoSuspend ) TJclAllowedPowerOperations', 'set of TJclAllowedPowerOperation Function GetAllowedPowerOperations : TJclAllowedPowerOperations FindClass('TOBJECT'),'EJclCreateProcessError Procedure CreateProcAsUser( const UserDomain, UserName, PassWord, CommandLine : string) Procedure CreateProcAsUserEx(const UserDomain,UserName,Password,CommandLine:string;const Environment:PChar); // with Add(EJclCreateProcessError) do end; procedure SIRegister_JclAnsiStrings(CL: TPSPascalCompiler); begin //'AnsiSigns','Set').SetSet(['-', '+']); 'C1_UPPER','LongWord( $0001); 'C1_LOWER','LongWord( $0002); 'C1_DIGIT','LongWord').SetUInt( $0004); 'C1_SPACE','LongWord').SetUInt( $0008); 'C1_PUNCT','LongWord').SetUInt( $0010); 'C1_CNTRL','LongWord').SetUInt( $0020); 'C1_BLANK','LongWord').SetUInt( $0040); 'C1_XDIGIT','LongWord').SetUInt( $0080); 'C1_ALPHA','LongWord').SetUInt( $0100); AnsiChar', 'Char Function StrIsAlpha( const S : AnsiString) : Boolean Function StrIsAlphaNum( const S : AnsiString) : Boolean Function StrIsAlphaNumUnderscore( const S : AnsiString) : Boolean Function StrContainsChars(const S:AnsiString;Chars:TSysCharSet; CheckAll : Boolean) : Boolean Function StrConsistsOfNumberChars( const S : AnsiString) : Boolean Function StrIsDigit( const S : AnsiString) : Boolean Function StrIsSubset( const S : AnsiString; const ValidChars : TSysCharSet) : Boolean Function StrSame( const S1, S2 : AnsiString) : Boolean //Function StrCenter( const S : AnsiString; L : Int; C : AnsiChar) : AnsiString Function StrCharPosLower( const S : AnsiString; CharPos : Int) : AnsiString Function StrCharPosUpper( const S : AnsiString; CharPos : Int) : AnsiString Function StrDoubleQuote( const S : AnsiString) : AnsiString Function StrEnsureNoPrefix( const Prefix, Text : AnsiString) : AnsiString Function StrEnsureNoSuffix( const Suffix, Text : AnsiString) : AnsiString Function StrEnsurePrefix( const Prefix, Text : AnsiString) : AnsiString Function StrEnsureSuffix( const Suffix, Text : AnsiString) : AnsiString Function StrEscapedToString( const S : AnsiString) : AnsiString Function JStrLower( const S : AnsiString) : AnsiString Procedure StrLowerInPlace( var S : AnsiString) ///Procedure StrLowerBuff( S : PAnsiChar) Procedure JStrMove( var Dest:AnsiString;const Source:AnsiString;const ToIndex,FromIndex,Count:Int; Function StrPadLeft( const S : AnsiString; Len : Int; C : AnsiChar) : AnsiString Function StrPadRight( const S : AnsiString; Len : Int; C : AnsiChar) : AnsiString Function StrProper( const S : AnsiString) : AnsiString //Procedure StrProperBuff( S : PAnsiChar) Function StrQuote( const S : AnsiString; C : AnsiChar) : AnsiString Function StrRemoveChars( const S : AnsiString; const Chars : TSysCharSet) : AnsiString Function StrKeepChars( const S : AnsiString; const Chars : TSysCharSet) : AnsiString Procedure JStrReplace(var S:AnsiString; const Search, Replace : AnsiString; Flags : TReplaceFlags) Function StrReplaceChar( const S : AnsiString; const Source, Replace : AnsiChar) : AnsiString Function StrReplaceChars(const S:AnsiString;const Chars:TSysCharSet;Replace:AnsiChar):AnsiString Function StrReplaceButChars(const S:AnsiString;const Chars:TSysCharSet;Replace:AnsiChar):AnsiString; Function StrRepeat( const S : AnsiString; Count : Int) : AnsiString Function StrRepeatLength( const S : AnsiString; const L : Int) : AnsiString Function StrReverse( const S : AnsiString) : AnsiString Procedure StrReverseInPlace( var S : AnsiString) Function StrSingleQuote( const S : AnsiString) : AnsiString Function StrSmartCase( const S : AnsiString; Delimiters : TSysCharSet) : AnsiString Function StrStringToEscaped( const S : AnsiString) : AnsiString Function StrStripNonNumberChars( const S : AnsiString) : AnsiString Function StrToHex( const Source : AnsiString) : AnsiString Function StrTrimCharLeft( const S : AnsiString; C : AnsiChar) : AnsiString Function StrTrimCharsLeft( const S : AnsiString; const Chars : TSysCharSet) : AnsiString Function StrTrimCharRight( const S : AnsiString; C : AnsiChar) : AnsiString Function StrTrimCharsRight( const S : AnsiString; const Chars : TSysCharSet) : AnsiString Function StrTrimQuotes( const S : AnsiString) : AnsiString Function JStrUpper( const S : AnsiString) : AnsiString Procedure StrUpperInPlace( var S : AnsiString) //Procedure StrUpperBuff( S : PAnsiChar) Function StrOemToAnsi( const S : AnsiString) : AnsiString Function StrAnsiToOem( const S : AnsiString) : AnsiString Procedure StrAddRef( var S : AnsiString) Function StrAllocSize( const S : AnsiString) : Longint Procedure StrDecRef( var S : AnsiString) //Function StrLen( S : PAnsiChar) : Int Function StrLength( const S : AnsiString) : Longint Function StrRefCount( const S : AnsiString) : Longint Procedure StrResetLength( var S : AnsiString) Function StrCharCount( const S : AnsiString; C : AnsiChar) : Int Function StrCharsCount( const S : AnsiString; Chars : TSysCharSet) : Int Function StrStrCount( const S, SubS : AnsiString) : Int Function StrCompare( const S1, S2 : AnsiString) : Int Function StrCompareRange( const S1, S2 : AnsiString; const Index, Count : Int) : Int //Function StrFillChar( const C : AnsiChar; Count : Int) : AnsiString; Function StrFillChar1( const C : Char; Count : Int) : AnsiString; Function StrFillChar(const C: Char; Count: Int): string); Function IntFillChar(const I: Int; Count: Int): string); Function ByteFillChar(const B: Byte; Count: Int): string); Function ArrFillChar(const AC: Char; Count: Int): TCharArray;; Function ArrByteFillChar(const AB: Char; Count: Int): TByteArray; Function StrFind( const Substr, S : AnsiString; const Index : Int) : Int //Function StrHasPrefix( const S : AnsiString; const Prefixes : array of AnsiString) : Boolean Function StrIndex( const S : AnsiString; const List : array of AnsiString) : Int Function StrILastPos( const SubStr, S : AnsiString) : Int Function StrIPos( const SubStr, S : AnsiString) : Int Function StrIsOneOf( const S : AnsiString; const List : array of AnsiString) : Boolean Function StrLastPos( const SubStr, S : AnsiString) : Int Function StrMatch( const Substr, S : AnsiString; const Index : Int) : Int Function StrMatches( const Substr, S : AnsiString; const Index : Int) : Boolean Function StrNIPos( const S, SubStr : AnsiString; N : Int) : Int Function StrNPos( const S, SubStr : AnsiString; N : Int) : Int Function StrPrefixIndex( const S : AnsiString; const Prefixes : array of AnsiString) : Int Function StrSearch( const Substr, S : AnsiString; const Index : Int) : Int //Function StrAfter( const SubStr, S : AnsiString) : AnsiString //Function StrBefore( const SubStr, S : AnsiString) : AnsiString Function StrBetween( const S : AnsiString; const Start, Stop : AnsiChar) : AnsiString Function StrChopRight( const S : AnsiString; N : Int) : AnsiString Function StrLeft( const S : AnsiString; Count : Int) : AnsiString Function StrMid( const S : AnsiString; Start, Count : Int) : AnsiString Function StrRestOf( const S : AnsiString; N : Int) : AnsiString Function StrRight( const S : AnsiString; Count : Int) : AnsiString Function CharEqualNoCase( const C1, C2 : AnsiChar) : Boolean Function CharIsAlpha( const C : AnsiChar) : Boolean Function CharIsAlphaNum( const C : AnsiChar) : Boolean Function CharIsBlank( const C : AnsiChar) : Boolean Function CharIsControl( const C : AnsiChar) : Boolean Function CharIsDelete( const C : AnsiChar) : Boolean Function CharIsDigit( const C : AnsiChar) : Boolean Function CharIsLower( const C : AnsiChar) : Boolean Function CharIsNumberChar( const C : AnsiChar) : Boolean Function CharIsPrintable( const C : AnsiChar) : Boolean Function CharIsPunctuation( const C : AnsiChar) : Boolean Function CharIsReturn( const C : AnsiChar) : Boolean Function CharIsSpace( const C : AnsiChar) : Boolean Function CharIsUpper( const C : AnsiChar) : Boolean Function CharIsWhiteSpace( const C : AnsiChar) : Boolean Function CharType( const C : AnsiChar) : Word Function CharHex( const C : AnsiChar) : Byte Function CharLower( const C : AnsiChar) : AnsiChar Function CharUpper( const C : AnsiChar) : AnsiChar Function CharToggleCase( const C : AnsiChar) : AnsiChar Function CharPos( const S : AnsiString; const C : AnsiChar; const Index : Int) : Int Function CharLastPos( const S : AnsiString; const C : AnsiChar; const Index : Int) : Int Function CharIPos( const S : AnsiString; C : AnsiChar; const Index : Int) : Int Function CharReplace( var S : AnsiString; const Search, Replace : AnsiChar) : Int Procedure StrIToStrings(S,Sep:AnsiString; const List:TStrings;const AllowEmptyString : Boolean) Procedure StrToStrings(S,Sep: AnsiString; const List:TStrings;const AllowEmptyString : Boolean) Function StringsToStr(const List:TStrings;const Sep:AnsiString;const AllowEmptyString:Bool):AnsiString; Procedure TrimStrings( const List : TStrings; DeleteIfEmpty : Boolean) Procedure TrimStringsRight( const List : TStrings; DeleteIfEmpty : Boolean) Procedure TrimStringsLeft( const List : TStrings; DeleteIfEmpty : Boolean) Function AddStringToStrings(const S:AnsiString;Strings:TStrings; const Unique:Boolean):Bool Function BooleanToStr( B : Boolean) : AnsiString Function FileToString( const FileName : AnsiString) : AnsiString Procedure StringToFile( const FileName, Contents : AnsiString; Append : Boolean) Procedure StringToFile2( const S, FileName : string); Function StrToken( var S : AnsiString; Separator : AnsiChar) : AnsiString Procedure StrTokens( const S : AnsiString; const List : TStrings) Procedure StrTokenToStrings( S : AnsiString; Separator : AnsiChar; const List : TStrings) //Function StrWord( var S : PAnsiChar; out Word : AnsiString) : Boolean Function StrToFloatSafe( const S : AnsiString) : Float Function StrToIntSafe( const S : AnsiString) : Int Procedure StrNormIndex( const StrLen : Int; var Index : Int; var Count : Int); Function ArrayOf( List : TStrings) : TDynStringArray; EJclStringError', 'EJclError function IsClass(Address: TObject): Boolean; function IsObject(Address: TObject): Boolean; // Console Utilities //function ReadKey: Char; function IntToStrZeroPad(Value, Count: Int): AnsiString; function JclGUIDToString(const GUID: TGUID): string; function JclStringToGUID(const S: string): TGUID; end; ********************************************** uPSI_JvDBUtil; Procedure ExecuteSQLScript(Base:TDataBase;const Script:string; const Commit:TCommit;OnProgress:TOnProgress; const UserData : Int) Function GetQueryResult( const DatabaseName, SQL : string) : Variant Function GetStoredProcResult( const ADatabaseName, AStoredProcName : string; AParams : array of Variant; const AResultName : string) : Variant //Function StrFieldDesc( Field : FLDDesc) : string Function Var2Type( V : Variant; const VarType : Int) : Variant Procedure CopyRecord( DataSet : TDataSet) //Procedure AddReference( Tbl : TTable; RefName: string; RefField: Word; MasterTable : string; MasterField : Word; ModOp, DelOp : RINTQual) Procedure AddMasterPassword( Table : TTable; pswd : string) Procedure PackTable( Table : TTable) Procedure PackEncryptedTable( Table : TTable; pswd : string) Function EncodeQuotes( const S : string) : string Function Cmp( const S1, S2 : string) : Boolean Function SubStr( const S : string; const Index : Int; const Separator : string) : string Function SubStrEnd( const S : string; const Index : Int; const Separator : string) : string Function ReplaceString( S : string; const OldPattern, NewPattern : string) : string Procedure GetXYByPos( const S : string; const Pos : Int; var X, Y : Int) **********************************************uPSI_JvJvBDEUtils;*************** //JvBDEUtils Function CreateDbLocate : TJvLocateObject //Function CheckOpen( Status : DBIResult) : Boolean Procedure FetchAllRecords( DataSet : TBDEDataSet) Function TransActive( Database : TDatabase) : Boolean Function AsyncQrySupported( Database : TDatabase) : Boolean Function GetQuoteChar( Database : TDatabase) : string Procedure ExecuteQuery( const DbName, QueryText : string) Procedure ExecuteQueryEx( const SessName, DbName, QueryText : string) Function FieldLogicMap( FldType : TFieldType) : Int Function FieldSubtypeMap( FldType : TFieldType) : Int Value : string; Buffer : Pointer) Function GetAliasPath( const AliasName : string) : string Function IsDirectory( const DatabaseName : string) : Boolean Function GetBdeDirectory : string Function LoginToDatabase( Database : TDatabase; OnLogin : TDatabaseLoginEvent) : Boolean Function DataSetFindValue( ADataSet : TBDEDataSet; const Value, FieldName : string) : Boolean Function DataSetFindLike( ADataSet : TBDEDataSet; const Value, FieldName : string) : Boolean Function DataSetRecNo( DataSet : TDataSet) : Longint Function DataSetRecordCount( DataSet : TDataSet) : Longint Function DataSetPositionStr( DataSet : TDataSet) : string Procedure DataSetShowDeleted( DataSet : TBDEDataSet; Show : Boolean) Function CurrentRecordDeleted( DataSet : TBDEDataSet) : Boolean Function IsFilterApplicable( DataSet : TDataSet) : Boolean Function IsBookmarkStable( DataSet : TBDEDataSet) : Boolean Procedure SetIndex( Table : TTable; const IndexFieldNames : string) Procedure RestoreIndex( Table : TTable) Procedure DeleteRange(Table: TTable; IndexFields:array of const; FieldValues: array of const) Procedure PackTable( Table : TTable) Procedure ReindexTable( Table : TTable) Procedure BdeFlushBuffers Function GetNativeHandle( Database : TDatabase; Buffer : Pointer; BufSize : Int) : Pointer Procedure ToggleDebugLayer( Active : Boolean; const DebugFile : string) Procedure DbNotSupported Procedure ExportDataSet(Source:TBDEDataSet;DestTable:TTable;TableType:TTableType;const AsciiCharSe :string;AsciiDelimited Boolean;MaxRecordCount:Longint) Procedure ExportDataSetEx( Source : TBDEDataSet; DestTable : TTable; TableType : TTableType; const AsciiCharSet:string;AsciiDelimited:Boolean;AsciiDelimiter,AsciiSeparator:Char;MaxRecordCount:Longint); Procedure ImportDataSet(Source:TBDEDataSet;DestTable:TTable;MaxRecCount:Longint;Mappings:TStrings;Mode:TBatchMode); Procedure InitRSRUN(Database:TDatabase;const ConName:string;ConType:Int;const ConServer:string); **********************************************uPSI_JvDateUtil; function CurrentYear: Word; function IsLeapYear(AYear: Int): Boolean; function DaysPerMonth(AYear, AMonth: Int): Int; function FirstDayOfPrevMonth: TDateTime; function LastDayOfPrevMonth: TDateTime; function FirstDayOfNextMonth: TDateTime; function ExtractDay(ADate: TDateTime): Word; function ExtractMonth(ADate: TDateTime): Word; function ExtractYear(ADate: TDateTime): Word; function IncDate(ADate: TDateTime; Days, Months, Years: Int): TDateTime; function IncDay(ADate: TDateTime; Delta: Int): TDateTime; function IncMonth(ADate: TDateTime; Delta: Int): TDateTime; function IncYear(ADate: TDateTime; Delta: Int): TDateTime; function ValidDate(ADate: TDateTime): Boolean; procedure DateDiff(Date1, Date2: TDateTime; var Days, Months, Years: Word); function MonthsBetween(Date1, Date2: TDateTime): Double; function DaysInPeriod(Date1, Date2: TDateTime): Longint; { Count days between Date1 and Date2 + 1, so if Date1 = Date2 result = 1 } function DaysBetween(Date1, Date2: TDateTime): Longint; { The same as previous but if Date2 < Date1 result = 0 } function IncTime(ATime: TDateTime; Hours, Minutes, Seconds, MSecs: Int): TDateTime; function IncHour(ATime: TDateTime; Delta: Int): TDateTime; function IncMinute(ATime: TDateTime; Delta: Int): TDateTime; function IncSecond(ATime: TDateTime; Delta: Int): TDateTime; function IncMSec(ATime: TDateTime; Delta: Int): TDateTime; function CutTime(ADate: TDateTime): TDateTime; { Set time to 00:00:00:00 } { String to date conversions } function GetDateOrder(const DateFormat: string): TDateOrder; function MonthFromName(const S: string; MaxLen: Byte): Byte; function StrToDateDef(const S: string; Default: TDateTime): TDateTime; function StrToDateFmt(const DateFormat, S: string): TDateTime; function StrToDateFmtDef(const DateFormat, S: string; Default: TDateTime): TDateTime; function DefDateFormat(FourDigitYear: Boolean): string; function DefDateMask(BlanksChar: Char; FourDigitYear: Boolean): string; ------------------------------------------------------------------------------ ********************************** JvUtils;******************************* { GetWordOnPos returns Word from string, S, on the cursor position, P} function GetWordOnPos(const S: string; const P: Int): string; { GetWordOnPosEx work like GetWordOnPos function, also returns Word position in iBeg, iEnd variables } function GetWordOnPosEx(const S: string; const P: Int; var iBeg, iEnd: Int): string; { SubStr returns substring from string, S, separated with Separator string} function SubStr(const S: string; const Index: Int; const Separator: string): string; { SubStrEnd same to previous function but Index numerated from the end of string } function SubStrEnd(const S: string; const Index: Int; const Separator: string): string; { SubWord returns next Word from string, P, and offsets Pointer to the end of Word, P2 } function SubWord(P: PChar; var P2: PChar): string; { NumberByWord returns the text representation of the number, N, in normal russian language. Was typed from Monitor magazine } function NumberByWord(const N: Longint): string; // function CurrencyByWord(Value : Currency) : string; GetLineByPos returns Line number, there //the symbol Pos is pointed. Lines separated with #13 symbol } function GetLineByPos(const S: string; const Pos: Int): Int; { GetXYByPos is same to previous function, but returns X position in line too} procedure GetXYByPos(const S: string; const Pos: Int; var X, Y: Int); { ReplaceString searches for all substrings, OldPattern,in a string, S, replaces them with NewPattern } function ReplaceString(S: string; const OldPattern, NewPattern: string): string; { ConcatSep concatenate S and S2 strings with Separator. if S = '', separator don't included } function ConcatSep(const S, S2, Separator: string): string; { ConcatLeftSep is same to previous function, but strings concatenate right to left } function ConcatLeftSep(const S, S2, Separator: string): string; { MinimizeString truncs long string, S, and appends '...' symbols, if Length of S is more than MaxLen } function MinimizeString(const S: string; const MaxLen: Int): string; { Next 4 function for russian chars transliterating. This functions are needed because Oem2Ansi and Ansi2Oem functions sometimes works sucks } procedure Dos2Win(var S: string); procedure Win2Dos(var S: string); function Dos2WinRes(const S: string): string; function Win2DosRes(const S: string): string; function Win2Koi(const S: string): string; { Spaces returns string consists on N space chars } function Spaces(const N: Int): string; { AddSpaces add spaces to string, S, if it Length is smaller than N } function AddSpaces(const S: string; const N: Int): string; { function LastDate for russian users only } { returns date relative to current date: '' } function LastDate(const Dat: TDateTime): string; { CurrencyToStr format currency, Cur, using ffCurrency float format} function CurrencyToStr(const Cur: currency): string; { Cmp compares two strings and returns True if they are equal. Case-insensitive.} function Cmp(const S1, S2: string): Boolean; { StringCat add S2 string to S1 and returns this string } function StringCat(var S1: string; S2: string): string; { HasChar returns True, if Char, Ch, contains in string, S } function HasChar(const Ch: Char; const S: string): Boolean; function HasAnyChar(const Chars: string; const S: string): Boolean; function CharInSet(const Ch: Char; const SetOfChar: TSetOfChar): Boolean; function CountOfChar(const Ch: Char; const S: string): Int; function DefStr(const S: string; Default: string): string; {**** files routines} { GetWinDir returns Windows folder name } function GetWinDir: TFileName; function GetSysDir: String; { GetTempDir returns Windows temporary folder name } function GetTempDir: string; { GenTempFileName returns temporary file name on drive, there FileName is placed } function GenTempFileName(FileName: string): string; { GenTempFileNameExt same to previous function, but returning filename has given extension, FileExt } function GenTempFileNameExt(FileName: string; const FileExt: string): string; { ClearDir clears folder Dir } function ClearDir(const Dir: string): Boolean; { DeleteDir clears and than delete folder Dir } function DeleteDir(const Dir: string): Boolean; { FileEquMask returns True if file, FileName, is compatible with given dos file mask, Mask } function FileEquMask(FileName, Mask: TFileName): Boolean; { FileEquMasks returns True if file, FileName, is compatible with given Masks. Masks must be separated with comma (';') } function FileEquMasks(FileName, Masks: TFileName): Boolean; procedure DeleteFiles(const Folder: TFileName; const Masks: string); { LZFileExpand expand file, FileSource into FileDest.File must be compressed,using MS Compress program } function LZFileExpand(const FileSource, FileDest: string): Boolean; { FileGetInfo fills SearchRec record for specified file attributes} function FileGetInfo(FileName: TFileName; var SearchRec: TSearchRec): Boolean; { HasSubFolder returns True, if folder APath contains other folders } function HasSubFolder(APath: TFileName): Boolean; { IsEmptyFolder returns True, if there are no files or folders in given folder, APath} function IsEmptyFolder(APath: TFileName): Boolean; { AddSlash add slash Char to Dir parameter, if needed } procedure AddSlash(var Dir: TFileName); { AddSlash returns string with added slash Char to Dir parameter, if needed } function AddSlash2(const Dir: TFileName): string; { AddPath returns FileName with Path, if FileName not contain any path } function AddPath(const FileName, Path: TFileName): TFileName; function AddPaths(const PathList, Path: string): string; function ParentPath(const Path: TFileName): TFileName; function FindInPath(const FileName, PathList: string): TFileName; function FindInPaths(const fileName,paths: String): String; {$IFNDEF BCB1} { BrowseForFolder displays Browse For Folder dialog } function BrowseForFolder(const Handle: HWND; const Title: string; var Folder: string): Boolean; {$ENDIF BCB1} Function BrowseForFolder(const ATitle: string; AllowCreate : Boolean; var ADirectory : string; AHelpContext : THelpContext) : Boolean Function BrowseForComputer(const ATitle : string; AllowCreate : Boolean; var ADirectory : string; AHelpContext : THelpContext) : Boolean Function BrowseDirectory(var AFolderName:string;const DlgText:string;AHelpContext:THelpContext):Boolean Function BrowseComputer(var AComputerName:string;const DlgText:string;AHelpContext:THelpContext):Boolean { DeleteReadOnlyFile clears R/O file attribute and delete file } function DeleteReadOnlyFile(const FileName: TFileName): Boolean; { HasParam returns True, if program running with specified parameter, Param } function HasParam(const Param: string): Boolean; function HasSwitch(const Param: string): Boolean; function Switch(const Param: string): string; { ExePath returns ExtractFilePath(ParamStr(0)) } function ExePath: TFileName; function CopyDir(const SourceDir, DestDir: TFileName): Boolean; function FileTimeToDateTime(const FT: TFileTime): TDateTime; function MakeValidFileName(const FileName: TFileName; const ReplaceBadChar: Char): TFileName; {**** Graphic routines } { TTFontSelected returns True, if True Type font is selected in specified device context } function TTFontSelected(const DC: HDC): Boolean; { TrueInflateRect inflates rect in other method, than InflateRect API function } function TrueInflateRect(const R: TRect; const I: Int): TRect; {**** Windows routines } { SetWindowTop put window to top without recreating window } procedure SetWindowTop(const Handle: HWND; const Top: Boolean); {**** other routines } { KeyPressed returns True, if Key VK is now pressed } function KeyPressed(VK: Int): Boolean; procedure SwapInt(var Int1, Int2: Int); function IntPower(Base, Exponent: Int): Int; function ChangeTopException(E: TObject): TObject; function StrToBool(const S: string): Boolean; {$IFNDEF COMPILER3_UP} { AnsiStrLIComp compares S1 to S2, without case-sensitivity, up to a maximum Length of MaxLen bytes. The compare operation is controlled by the current Windows locale. The return value is the same as for CompareStr. } function AnsiStrLIComp(S1, S2: PChar; MaxLen: Cardinal): Int; function AnsiStrIComp(S1, S2: PChar): Int; {$ENDIF} function Var2Type(V: Variant; const VarType: Int): Variant; function VarToInt(V: Variant): Int; function VarToFloat(V: Variant): Double; { following functions are not documented because they are don't work properly , so don't use them } function ReplaceSokr1(S: string; const Word, Frase: string): string; { ReplaceSokr1 is full equal to ReplaceString function - only for compatibility - don't use } { GetSubStr is full equal to SubStr function - only for compatibility - don't use } function GetSubStr(const S: string; const Index: Int; const Separator: Char): string; function GetParameter: string; function GetLongFileName(FileName: string): string; {* from FileCtrl} function DirectoryExists(const Name: string): Boolean; procedure ForceDirectories(Dir: string); {# from FileCtrl} function FileNewExt(const FileName, NewExt: TFileName): TFileName; function GetComputerID: string; function GetComputerName: string; {**** string routines } { ReplaceAllSokr searches for all substrings, Words,in a string, S, and replaces them with Frases with the same Index.Also see RAUtilsW.ReplaceSokr1 function } function ReplaceAllSokr(S: string; Words, Frases: TStrings): string; { ReplaceSokr searches the Word in a string, S, on PosBeg position, in the list, Words, and if founds, replaces this Word with string from another list, Frases, with the same Index, and then update NewSelStart variable } function ReplaceSokr(S:string;PosBeg,Len:Int;Words,Frases:TStrings;var NewSelStart:Int): string; { CountOfLines calculates lines count in a string,each line separated from another with CrLf sequence } function CountOfLines(const S: string): Int; { DeleteEmptyLines deletes all empty lines from strings, Ss. Lines contained only spaces also deletes. } procedure DeleteEmptyLines(Ss: TStrings); { SQLAddWhere addes or modifies existing where-statement, where, to the strings, SQL. Note: If strings SQL allready contains where-statement, it must be started on begining of any line } procedure SQLAddWhere(SQL: TStrings; const Where: string); {**** files routines - } { ResSaveToFile save resource named as Name with Typ type into file FileName. Resource can be compressed using MS Compress program} function ResSaveToFile(const Typ,Name: string; const Compressed:Boolean; const FileName: string): Boolean; function ResSaveToFileEx(Inst:HINST;Typ,Name:PChar;const Compressed:Bool;const FileName:string): Bool function ResSaveToString(Instance: HINST; const Typ, Name: string; var S: string): Boolean; { Execute executes other program and waiting for it terminating, then return its Exit Code } function ExecuteJ(const CommandLine, WorkingDirectory: string): Int; { IniReadSection read section, Section, from ini-file, IniFileName, into strings, Ss.This function reads ALL strings from specified section. Note: TIninFile.ReadSection function reads only strings with '=' symbol.} function IniReadSection(const IniFileName: TFileName; const Section: string; Ss: TStrings): Boolean; { LoadTextFile load text file, FileName, into string } function LoadTextFile(const FileName: TFileName): string; procedure SaveTextFile(const FileName: TFileName; const Source: string); { ReadFolder reads files list from disk folder, Folder, that are equal Mask, into strings, FileList} function ReadFolder(const Folder, Mask: TFileName; FileList: TStrings): Int; function ReadFolders(const Folder: TFileName; FolderList: TStrings): Int; {$IFDEF COMPILER3_UP} { TargetFileName - if FileName is ShortCut returns filename ShortCut linked to } function TargetFileName(const FileName: TFileName): TFileName; { return filename ShortCut linked to } function ResolveLink(const hWnd: HWND; const LinkFile: TFileName; var FileName: TFileName): HRESULT; {$ENDIF COMPILER3_UP} {**** Graphic routines - } { LoadIcoToImage loads two icons from resource named NameRes,into two image lists ALarge and ASmall} procedure LoadIcoToImage(ALarge, ASmall: TImageList; const NameRes: string); { RATextOut same with TCanvas.TextOut procedure, but can clipping drawing with rectangle, RClip. } procedure RATextOut(Canvas: TCanvas; const R, RClip: TRect; const S: string); {RATextOutEx same with RATextOut funct, but can calculate needed height for correct output } function RATextOutEx(Canvas:TCanvas; const R,RClip:TRect;const S: string;const CalcHeight:Boolean):Int; { RATextCalcHeight calculate needed height to correct output, using RATextOut or RATextOutEx functions } function RATextCalcHeight(Canvas: TCanvas; const R: TRect; const S: string): Int; { Cinema draws some visual effect } procedure Cinema(Canvas: TCanvas; rS {Source}, rD {Dest}: TRect); { Roughed fills rect with special 3D pattern } procedure Roughed(ACanvas: TCanvas; const ARect: TRect; const AVert: Boolean); { BitmapFromBitmap creates new small bitmap from part of source bitmap, SrcBitmap, with specified width and height, AWidth, AHeight and placed on a specified Index, Index in the source bitmap } function BitmapFromBitmap(SrcBitmap: TBitmap; const AWidth, AHeight, Index: Int): TBitmap; { TextWidth calculate text with for writing using standard desktop font } function TextWidth(AStr: string): Int; { DefineCursor load cursor from resource, and return available cursor number, assigned to it } function DefineCursor(Identifer: PChar): TCursor; {**** other routines - } { FindFormByClass returns first form specified class, FormClass,owned by Application global variable } function FindFormByClass(FormClass: TFormClass): TForm; function FindFormByClassName(FormClassName: string): TForm; { FindByTag returns the control with specified class, ComponentClass, from WinContol.Controls property, having Tag property value, equaled to Tag parameter } function FindByTag(WinControl:TWinControl;ComponentClass:TComponentClass;const Tag:Int):TComponent; { ControlAtPos2 equal to TWinControl.ControlAtPos function, but works better } function ControlAtPos2(Parent: TWinControl; X, Y: Int): TControl; { RBTag searches WinControl.Controls for checked RadioButton and returns Tag property value } function RBTag(Parent: TWinControl): Int; { AppMinimized returns True, if Application is minimized } function AppMinimized: Boolean; { MessageBox is Application.MessageBox with string (not PChar) parameters. if Caption parameter = '', it replaced with Application.Title } function MessageBoxJ(const Msg: string; Caption: string;const Flags: Int): Int; function MsgDlg2(const Msg, ACaption: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpContext: Int; Control: TWinControl): Int; function MsgDlgDef(const Msg, ACaption: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; DefButton:TMsgDlgBtn; HelpContext: Int;Control: TWinControl): Int; { Delay stop program execution to MSec msec } procedure Delay(MSec: Longword); procedure CenterHor(Parent: TControl; MinLeft: Int; Controls: array of TControl); procedure EnableControls(Control: TWinControl; const Enable: Boolean); procedure EnableMenuItems(MenuItem: TMenuItem; const Tag: Int; const Enable: Boolean); procedure ExpandWidth(Parent: TControl; MinWidth: Int; Controls: array of TControl); function PanelBorder(Panel: TCustomPanel): Int; function Pixels(Control: TControl; APixels: Int): Int; procedure SetChildPropOrd(Owner: TComponent; PropName: string; Value: Longint); procedure Error(const Msg: string); procedure ItemHtDrawEx(Canvas:TCanvas;Rect:TRect;const State:TOwnerDrawState;const Text:string; const HideSelColor: Boolean; var PlainItem: string; var Width: Int; CalcWidth: Boolean); {ex.Text parameter:'Item1bolditalic ITALICredgreenblue'} function ItemHtDraw(Canvas: TCanvas; Rect: TRect; const State: TOwnerDrawState; const Text: string; const HideSelColor: Boolean): string; function ItemHtWidth(Canvas: TCanvas; Rect: TRect;const State: TOwnerDrawState; const Text: string; const HideSelColor: Boolean): Int; function ItemHtPlain(const Text: string): string; { ClearList - clears list of TObject } procedure ClearList(List: TList); procedure MemStreamToClipBoard(MemStream: TMemoryStream; const Format: Word); procedure ClipBoardToMemStream(MemStream: TMemoryStream; const Format: Word); { RTTI support } function GetPropType(Obj: TObject; const PropName: string): TTypeKind; function GetPropStr(Obj: TObject; const PropName: string): string; function GetPropOrd(Obj: TObject; const PropName: string): Int; function GetPropMethod(Obj: TObject; const PropName: string): TMethod; procedure PrepareIniSection(SS: TStrings); { following functions are not documented because they are don't work properly, so don't use them } {$IFDEF COMPILER2} function CompareMem(P1, P2: Pointer; Length: Int): Boolean; assembler; {$ENDIF} procedure SIRegister_JvBoxProcs(CL: TPSPascalCompiler); begin Procedure BoxMoveSelectedItems( SrcList, DstList : TWinControl) Procedure BoxMoveAllItems( SrcList, DstList : TWinControl) Procedure BoxDragOver(List:TWinControl;Source:TObject;X,Y:Int;State:TDragState;var Accept:Bool;Sorted:Bool; Procedure BoxMoveFocusedItem( List : TWinControl; DstIndex : Int) Procedure BoxMoveSelected( List : TWinControl; Items : TStrings) Procedure BoxSetItem( List : TWinControl; Index : Int) Function BoxGetFirstSelection( List : TWinControl) : Int Function BoxCanDropItem( List : TWinControl; X, Y : Int; var DragIndex : Int) : Boolean end; procedure SIRegister_JvCsvParse(CL: TPSPascalCompiler); begin Const('MaxInitStrNum','LongInt'( 9); Function JvAnsiStrSplit( const InString : AnsiString; const SplitChar, QuoteChar:AnsiChar; var OutStrings : array of AnsiString; MaxSplit : Int) : Int Function JvStrSplit(const InString:string;const SplitChar,QuoteChar:Char;var OutStrings:array of string;MaxSplit:Int):Int Function JvAnsiStrSplitStrings(const InStr:AnsiString;const SplitChar,QuoteChar:AnsiChar;OutStrs:TStrings):Int; Function JvAnsiStrStrip( S : AnsiString) : AnsiString Function JvStrStrip( S : string) : string Function GetString( var Source : AnsiString; const Separator : AnsiString) : AnsiString Function PadString( const S : AnsiString; Len : Int; PadChar : AnsiChar) : AnsiString Function BuildPathName( const PathName, FileName : AnsiString) : AnsiString Function StrEatWhiteSpace( const S : string) : string Function HexToAscii( const S : AnsiString) : AnsiString Function AsciiToHex( const S : AnsiString) : AnsiString Function StripQuotes( const S1 : AnsiString) : AnsiString Function ValidNumericLiteral( S1 : PAnsiChar) : Boolean Function ValidIntLiteral( S1 : PAnsiChar) : Boolean Function ValidHexLiteral( S1 : PAnsiChar) : Boolean Function HexPCharToInt( S1 : PAnsiChar) : Int Function ValidStringLiteral( S1 : PAnsiChar) : Boolean Function StripPCharQuotes( S1 : PAnsiChar) : AnsiString Function JvValidIdentifierAnsi( S1 : PAnsiChar) : Boolean Function JvValidIdentifier( S1 : String) : Boolean Function JvEndChar( X : AnsiChar) : Boolean Procedure JvGetToken( S1, S2 : PAnsiChar) Function IsExpressionKeyword( S1 : PAnsiChar) : Boolean Function IsKeyword( S1 : PAnsiChar) : Boolean Function JvValidVarReference( S1 : PAnsiChar) : Boolean Function GetParenthesis( S1, S2 : PAnsiChar) : Boolean Procedure JvGetVarReference( S1, S2, SIdx : PAnsiChar) Procedure JvEatWhitespaceChars( S1 : PAnsiChar); Procedure JvEatWhitespaceChars1( S1 : PWideChar); Function GetTokenCount : Int Procedure ResetTokenCount end; procedure SIRegister_JvDBQueryParamsForm(CL: TPSPascalCompiler); begin SIRegister_TJvQueryParamsDialog(CL); Function EditQueryParams( DataSet : TDataSet; List : TParams; AHelpContext: THelpContext): Boolean end; ********************************* JvStrUtil / JvStrUtils;***************************** function FindNotBlankCharPos(const S: string): Int; function AnsiChangeCase(const S: string): string; function GetWordOnPos(const S: string; const P: Int): string; function GetWordOnPosEx(const S: string; const P: Int; var iBeg, iEnd: Int): string; function Cmp(const S1, S2: string): Boolean; { Spaces returns string consists on N space chars } function Spaces(const N: Int): string; { HasChar returns True, if char, Ch, contains in string, S } function HasChar(const Ch: Char; const S: string): Boolean; function HasAnyChar(const Chars: string; const S: string): Boolean; { SubStr returns substring from string, S, separated with Separator string} function SubStr(const S: string; const Index: Int; const Separator: string): string; { SubStrEnd same to previous function but Index numerated from the end of string } function SubStrEnd(const S: string; const Index: Int; const Separator: string): string; { ReplaceString searches for all substrings, OldPattern, in a string, S, replaces them with NewPattern } function ReplaceString(S: string; const OldPattern, NewPattern: string): string; function CharInSet(const Ch: Char; const SetOfChar: TSetOfChar): Boolean; { GetXYByPos is same to previous function, but returns X position in line too} procedure GetXYByPos(const S: string; const Pos: Int; var X, Y: Int); { AddSlash returns string with added slash char to Dir parameter, if needed } function AddSlash2(const Dir: TFileName): string; { AddPath returns FileName with Path, if FileName not contain any path } function AddPath(const FileName, Path: TFileName): TFileName; { ExePath returns ExtractFilePath(ParamStr(0)) } function ExePath: TFileName; function LoadTextFile(const FileName: TFileName): string; procedure SaveTextFile(const FileName: TFileName; const Source: string); { ConcatSep concatenate S and S2 strings with Separator. if S = '', separator don't included } function ConcatSep(const S, S2, Separator: string): string; { FileEquMask returns True if file, FileName, is compatible with given dos file mask, Mask } function FileEquMask(FileName, Mask: TFileName): Boolean; { FileEquMasks returns True if file, FileName, is compatible with given Masks. Masks must be separated with comma (';') } function FileEquMasks(FileName, Masks: TFileName): Boolean; function StringEndsWith(const Str, SubStr: string): Boolean; function ExtractFilePath2(const FileName: string): string; function StrToOem(const AnsiStr: string): string; { StrToOem translates a string from the Windows character set into the OEM character set. } function OemToAnsiStr(const OemStr: string): string; { OemToAnsiStr translates a string from the OEM character set into the Windows character set. } function IsEmptyStr(const S: string; const EmptyChars: TCharSet): Boolean; { EmptyStr returns true if the given string contains only character from the EmptyChars. } function ReplaceStr(const S, Srch, Replace: string): string; { Returns string with every occurrence of Srch string replaced with Replace string. } function DelSpace(const S: string): string; { DelSpace return a string with all white spaces removed. } function DelChars(const S: string; Chr: Char): string; { DelChars return a string with all Chr characters removed. } function DelBSpace(const S: string): string; { DelBSpace trims leading spaces from the given string. } function DelESpace(const S: string): string; { DelESpace trims trailing spaces from the given string. } function DelRSpace(const S: string): string; { DelRSpace trims leading and trailing spaces from the given string. } function DelSpace1(const S: string): string; { DelSpace1 return a string with all non-single white spaces removed. } function Tab2Space(const S: string; Numb: Byte): string; { Tab2Space converts any tabulation chars in the given string to the Numb spaces characters. } function NPos(const C: string; S: string; N: Int): Int; { NPos searches for a N-th position of substring C in a given string. } function MakeStr(C: Char; N: Int): string; function MS(C: Char; N: Int): string; { MakeStr return a string of length N filled with character C. } function AddChar(C: Char; const S: string; N: Int): string; { AddChar return a string left-padded to length N with characters C. } function AddCharR(C: Char; const S: string; N: Int): string; { AddCharR return a string right-padded to length N with characters C. } function LeftStr(const S: string; N: Int): string; { LeftStr return a string right-padded to length N with blanks. } function RightStr(const S: string; N: Int): string; { RightStr return a string left-padded to length N with blanks. } function CenterStr(const S: string; Len: Int): string; { CenterStr centers the characters in the string based upon the Len specified. } function CompStr(const S1, S2: string): Int; {CompStr compares S1 to S2, case-sensitivity. return val is -1 if S1 < S2,0 if S1 = S2,or 1 if S1>S2. } function CompText(const S1, S2: string): Int; { CompText compares S1 to S2, without case-sensitivity. The return value is the same as for CompStr. } function Copy2Symb(const S: string; Symb: Char): string; { Copy2Symb returns a substring of a string S from begining to first character Symb. } function Copy2SymbDel(var S: string; Symb: Char): string; { Copy2SymbDel returns a substr of string S from to first character Symb and removes substring from S. } function Copy2Space(const S: string): string; { Copy2Symb returns a substring of a string S from begining to first white space. } function Copy2SpaceDel(var S: string): string; { Copy2SpaceDel returns a substring of a string S from begining to first white space and removes this substring from S. } function AnsiProperCase(const S: string; const WordDelims: TCharSet): string; { Returns string, with the first letter of each word in uppercase, all other letters in lowercase. Words are delimited by WordDelims. } function WordCount(const S: string; const WordDelims: TCharSet): Int; { WordCount given a set of word delimiters, returns number of words in S. } function WordPosition(const N: Int; const S: string; const WordDelims: TCharSet): Int; { Given a set of word delimiters, returns start position of N'th word in S. } function ExtractWord(N: Int; const S: string; const WordDelims: TCharSet): string; function ExtractWordPos(N:Int; const S:string; const WordDelims:TCharSet;var Pos: Int): string; function ExtractDelimited(N: Int; const S: string; const Delims: TCharSet): string; { ExtractWord, ExtractWordPos and ExtractDelimited given a set of word delimiters, return the N'th word in S. } function ExtractSubstr(const S: string; var Pos: Int; const Delims: TCharSet): string; { ExtractSubstr given set of word delimiters,returns the substring from S,that started from position Pos.} function IsWordPresent(const W, S: string; const WordDelims: TCharSet): Boolean; { IsWordPresent given set of word delimiters, returns True if word W is present in string S. } function QuotedString(const S: string; Quote: Char): string; { QuotedString returns given string as a quoted string, using the provided Quote character. } function ExtractQuotedString(const S: string; Quote: Char): string; { ExtractQuotedString removes the Quote characters from the beginning and end of a quoted string, and reduces pairs of Quote characters within the quoted string to a single character. } function FindPart(const HelpWilds, InputStr: string): Int; { FindPart compares a string with '?' and another, returns the position of HelpWilds in InputStr. } function IsWild(InputStr, Wilds: string; IgnoreCase: Boolean): Boolean; { IsWild compares InputString with WildCard string and returns True if corresponds. } function XorString(const Key, Src: ShortString): ShortString; function XorEncode(const Key, Source: string): string; function XorDecode(const Key, Source: string): string; { ** Command line routines ** } {$IFNDEF COMPILER4_UP} function FindCmdLineSwitch(const Switch: string; SwitchChars: TCharSet;IgnoreCase: Boolean): Boolean; {$ENDIF} function GetCmdLineArg(const Switch: string; SwitchChars: TCharSet): string; { ** Numeric string handling routines ** } function Numb2USA(const S: string): string; { Numb2USA converts numeric string S to USA-format. } function Dec2Hex(N: Longint; A: Byte): string; function D2H(N: Longint; A: Byte): string; { Dec2Hex converts the given value to a hexadecimal string representation with the minimum number of digits (A) specified. } function Hex2Dec(const S: string): Longint; function H2D(const S: string): Longint; { Hex2Dec converts the given hexadecimal string to the corresponding Int value. } function Dec2Numb(N: Longint; A, B: Byte): string; { Dec2Numb converts the given value to a string representation with the base equal to B and with the minimum number of digits (A) specified. } function Numb2Dec(S: string; B: Byte): Longint; { Numb2Dec converts given B-based numeric string to the corresponding Int value. } function IntToBin(Value: Longint; Digits, Spaces: Int): string; { IntToBin converts given value to a bin string representation with min number of digits specified. } function IntToRoman(Value: Longint): string; { IntToRoman converts the given value to a roman numeric string representation. } function RomanToInt(const S: string): Longint; { RomanToInt converts the given string to an Int value. If the string doesn't contain a valid roman numeric value, the 0 value is returned. } procedure I64ToCardinals(I: Int64; var LowPart, HighPart: Cardinal); procedure CardinalsToI64(var I: Int64; const LowPart, HighPart: Cardinal); ********************************** JvFileUtil;********************************** procedure CopyFileJ(const FileName, DestName: string; ProgressControl: TControl); procedure CopyFileEx(const FileName,DestName:string;OverwriteReadOnly,ShellDialog:Bool;ProgressControl:TControl); procedure MoveFile(const FileName, DestName: TFileName); procedure MoveFileEx(const FileName, DestName: TFileName; ShellDialog: Boolean); {$IFDEF COMPILER4_UP} function GetFileSize(const FileName: string): Int64; {$ELSE} function GetFileSize(const FileName: string): Longint; {$ENDIF} function FileDateTime(const FileName: string): TDateTime; function HasAttr(const FileName: string; Attr: Int): Boolean; function DeleteFiles(const FileMask: string): Boolean; function DeleteFilesEx(const FileMasks: array of string): Boolean; function ClearDir(const Path: string; Delete: Boolean): Boolean; function NormalDir(const DirName: string): string; function RemoveBackSlash(const DirName: string): string; function ValidFileName(const FileName: string): Boolean; function DirExists(Name: string): Boolean; procedure ForceDirectories(Dir: string); function FileLock(Handle: Int; Offset, LockSize: Longint): Int; {$IFDEF COMPILER4_UP} overload; {$ENDIF} {$IFDEF COMPILER4_UP} function FileLock(Handle: Int; Offset, LockSize: Int64): Int; overload; {$ENDIF} function FileUnlock(Handle: Int; Offset, LockSize: Longint): Int; {$IFDEF COMPILER4_UP} overload; {$ENDIF} {$IFDEF COMPILER4_UP} function FileUnlock(Handle: Int; Offset, LockSize: Int64): Int; overload; {$ENDIF} function GetTempDir: string; function GetWindowsDir: string; function GetSystemDir: string; function BrowseDirectory(var AFolderName:string; const DlgText:string; AHelpContext:THelpContext):Boolean; {$IFDEF WIN32} function BrowseComputer(var ComputerName:string; const DlgText:string; AHelpContext:THelpContext):Boolean; function ShortToLongFileName(const ShortName: string): string; function ShortToLongPath(const ShortName: string): string; function LongToShortFileName(const LongName: string): string; function LongToShortPath(const LongName: string): string; procedure CreateFileLink(const FileName, DisplayName: string; Folder: Int); procedure DeleteFileLink(const DisplayName: string; Folder: Int); {$ENDIF WIN32} {$IFNDEF COMPILER3_UP} function IsPathDelimiter(const S: string; Index: Int): Boolean; {$ENDIF} Function CreateCalculatorForm( AOwner : TComponent; AHelpContext : THelpContext) : TJvCalculatorForm Function CreatePopupCalculator( AOwner : TComponent; ABiDiMode : TBiDiMode) : TWinControl Function CreatePopupCalculator( AOwner : TComponent) : TWinControl Procedure SetupPopupCalculator( PopupCalc : TWinControl; APrecision : Byte; ABeepOnError : Boolean) //***************************procedure SIRegister_VarHlpr(CL: TPSPascalCompiler); Procedure VariantClear( var V : Variant) Procedure VariantArrayRedim( var V : Variant; High : Int) Procedure VariantCast( const src : Variant; var dst : Variant; vt : Int) Procedure VariantCpy( const src : Variant; var dst : Variant) Procedure VariantAdd( const src : Variant; var dst : Variant) Procedure VariantSub( const src : Variant; var dst : Variant) Procedure VariantMul( const src : Variant; var dst : Variant) Procedure VariantDiv( const src : Variant; var dst : Variant) Procedure VariantMod( const src : Variant; var dst : Variant) Procedure VariantAnd( const src : Variant; var dst : Variant) Procedure VariantOr( const src : Variant; var dst : Variant) Procedure VariantXor( const src : Variant; var dst : Variant) Procedure VariantShl( const src : Variant; var dst : Variant) Procedure VariantShr( const src : Variant; var dst : Variant) Function VariantAdd2( const V1 : Variant; const V2 : Variant) : Variant Function VariantSub2( const V1 : Variant; const V2 : Variant) : Variant Function VariantMul2( const V1 : Variant; const V2 : Variant) : Variant Function VariantDiv2( const V1 : Variant; const V2 : Variant) : Variant Function VariantMod2( const V1 : Variant; const V2 : Variant) : Variant Function VariantAnd2( const V1 : Variant; const V2 : Variant) : Variant Function VariantOr2( const V1 : Variant; const V2 : Variant) : Variant Function VariantXor2( const V1 : Variant; const V2 : Variant) : Variant Function VariantShl2( const V1 : Variant; const V2 : Variant) : Variant Function VariantShr2( const V1 : Variant; const V2 : Variant) : Variant Function VariantNot( const V1 : Variant) : Variant Function VariantNeg( const V1 : Variant) : Variant Function VariantGetElement( const V : Variant; i1 : Int) : Variant; Function VariantGetElement1( const V : Variant; i1, i2 : Int) : Variant; Function VariantGetElement2( const V : Variant; i1, i2, i3 : Int) : Variant; Function VariantGetElement3( const V : Variant; i1, i2, i3, i4 : Int) : Variant; Function VariantGetElement4( const V : Variant; i1, i2, i3, i4, i5 : Int) : Variant; Procedure VariantPutElement( var V : Variant; const data : Variant; i1 : Int); Procedure VariantPutElement1( var V : Variant; const data : Variant; i1, i2 : Int); Procedure VariantPutElement2( var V : Variant; const data : Variant; i1, i2, i3 : Int); Procedure VariantPutElement3(var V: Variant; const data : Variant; i1, i2, i3, i4 : Int); Procedure VariantPutElement4( var V : Variant; const data : Variant; i1, i2, i3, i4, i5 : Int); end; ***************************************unit uPSI_JvgUtils;************************************** function IsEven(I: Int): Boolean; function InchesToPixels(DC: HDC; Value: Single; IsHorizontal: Boolean): Int; function CentimetersToPixels(DC: HDC; Value: Single; IsHorizontal: Boolean): Int; procedure SwapInt(var I1, I2: Int); function Spaces(Count: Int): string; function DupStr(const Str: string; Count: Int): string; function DupChar(C: Char; Count: Int): string; procedure Msg(const AMsg: string); function RectW(R: TRect): Int; function RectH(R: TRect): Int; function IncColor(AColor: Longint; AOffset: Byte): Longint; function DecColor(AColor: Longint; AOffset: Byte): Longint; function IsItAFilledBitmap(Bmp: TBitmap): Boolean; procedure DrawTextInRectWithAlign(DC: HDC; R: TRect; const Text: string; HAlign: TglHorAlign; VAlign: TglVertAlign; Style: TglTextStyle; Fnt: TFont; Flags: UINT); procedure DrawTextInRect(DC:HDC;R:TRect;const Text:string;Style:TglTextStyle;Fnt:TFont;Flags: UINT); procedure ExtTextOutExt(DC: HDC; X, Y: Int; R: TRect; const Text: string; Style: TglTextStyle; ADelineated, ASupress3D: Boolean; FontColor, DelinColor,HighlightColor,ShadowColor: TColor; Illumination: TJvgIllumination; Gradient: TJvgGradient; Font: TFont); procedure DrawBox(DC:HDC;var R:TRect;Style:TglBoxStyle;BackgrColor:Longint;ATransparent: Bool); function DrawBoxEx(DC: HDC; ARect: TRect; Borders: TglSides; BevelInner,BevelOuter:TPanelBevel;Bold:Boolean;BackgrColor:Longint;ATransparent:Bool):TRect; procedure GradientBox(DC: HDC; R: TRect; Gradient: TJvgGradient;PenStyle, PenWidth: Int); procedure ChangeBitmapColor(Bitmap: TBitmap; FromColor, ToColor: TColor); procedure DrawBitmapExt(DC: HDC; { DC - background & result} SourceBitmap: TBitmap; R: TRect; X, Y: Int; //...X,Y _in_ rect! BitmapOption: TglWallpaperOption; DrawState: TglDrawState; ATransparent: Boolean; TransparentColor: TColor; DisabledMaskColor: TColor); procedure CreateBitmapExt(DC: HDC; { DC - background & result} SourceBitmap: TBitmap; R: TRect; X, Y: Int; //...X,Y _in_ rect! BitmapOption: TglWallpaperOption; DrawState: TglDrawState; ATransparent: Boolean; TransparentColor: TColor; DisabledMaskColor: TColor); procedure BringParentWindowToTop(Wnd: TWinControl); function GetParentForm(Control: TControl): TForm; procedure GetWindowImageFrom(Control:TWinControl;X,Y:Int;ADrawSelf,ADrawChildWindows:Bool;DC:HDC) procedure GetWindowImage(Control: TWinControl; ADrawSelf, ADrawChildWindows: Boolean; DC: HDC); procedure GetParentImageRect(Control: TControl; Rect: TRect; DC: HDC); function CreateRotatedFont(F: TFont; Escapement: Int): HFONT; function FindMainWindow(const AWndClass, AWndTitle: string): THandle; procedure CalcShadowAndHighlightColors(BaseColor: TColor; Colors: TJvgLabelColors); function CalcMathString(AExpression: string): Single; function IIF(AExpression: Boolean; IfTrue, IfFalse: Variant): Variant; overload; function IIF(AExpression: Boolean; const IfTrue, IfFalse: string): string; overload; function GetTransparentColor(Bitmap: TBitmap; AutoTrColor: TglAutoTransparentColor): TColor; procedure TypeStringOnKeyboard(const S: string); function NextStringGridCell( Grid: TStringGrid ): Boolean; procedure DrawTextExtAligned(Canvas:TCanvas;const Text:string;R:TRect;Alignment:TglAlignment;WordWrap:Bool; procedure LoadComponentFromTextFile(Component: TComponent; const FileName: string); procedure SaveComponentToTextFile(Component: TComponent; const FileName: string); function ComponentToString(Component: TComponent): string; procedure StringToComponent(Component: TComponent; const Value: string); function PlayWaveResource(const ResName: string): Boolean; function UserName: string; function ComputerName: string; function CreateIniFileName: string; function ExpandString(const Str: string; Len: Int): string; function Transliterate(const Str: string; RusToLat: Boolean): string; function IsSmallFonts: Boolean; function SystemColorDepth: Int; function GetFileTypeJ(const FileName: string): TglFileType; Function GetFileType( hFile : THandle) : DWORD; function FindControlAtPt(Control: TWinControl; Pt: TPoint; MinClass: TClass): TControl; function StrPosExt(const Str1, Str2: PChar; Str2Len: DWORD): PChar; { **************************************Utility routines of unit classes} function LineStart(Buffer, BufPos: PChar): PChar function ExtractStrings(Separators,WhiteSpace:TSysCharSet;Content:PChar;Strings:TStrings):Int Function TestStreamFormat( Stream : TStream) : TStreamOriginalFormat Procedure RegisterClass( AClass : TPersistentClass) Procedure RegisterClasses( AClasses : array of TPersistentClass) Procedure RegisterClassAlias( AClass : TPersistentClass; const Alias : string) Procedure UnRegisterClass( AClass : TPersistentClass) Procedure UnRegisterClasses( AClasses : array of TPersistentClass) Procedure UnRegisterModuleClasses( Module : HMODULE) Function FindGlobalComponent( const Name : string) : TComponent Function IsUniqueGlobalComponentName( const Name : string) : Boolean Function InitInheritedComponent( Instance : TComponent; RootAncestor : TClass) : Boolean Function InitComponentRes( const ResName : string; Instance : TComponent) : Boolean Function ReadComponentRes( const ResName : string; Instance : TComponent) : TComponent Function ReadComponentResEx( HInstance : THandle; const ResName : string) : TComponent Function ReadComponentResFile( const FileName : string; Instance : TComponent) : TComponent Procedure WriteComponentResFile(const FileName: string; Instance : TComponent) Procedure GlobalFixupReferences Procedure GetFixupReferenceNames( Root : TComponent; Names : TStrings) Procedure GetFixupInstanceNames(Root:TComponent;const ReferenceRootName string;Names:TStrings) Procedure RedirectFixupReferences( Root : TComponent; const OldRootName, NewRootName : string) Procedure RemoveFixupReferences( Root : TComponent; const RootName : string) Procedure RemoveFixups( Instance : TPersistent) Function FindNestedComponent( Root : TComponent; const NamePath : string) : TComponent Procedure BeginGlobalLoading Procedure NotifyGlobalLoading Procedure EndGlobalLoading Function GetUltimateOwner1( ACollection : TCollection) : TPersistent; Function GetUltimateOwner( APersistent : TPersistent) : TPersistent; // AddTypeS('TWndMethod', 'Procedure (var Message : TMessage) //Function MakeObjectInstance( Method : TWndMethod) : Pointer Procedure FreeObjectInstance( ObjectInstance : Pointer) // Function AllocateHWnd( Method : TWndMethod) : HWND Procedure DeallocateHWnd( Wnd : HWND) Function AncestorIsValid( Ancestor:TPersistent; Root, RootAncestor: TComponent) : Boolean ***************************************unit uPSI_SqlTimSt and DB;************************************* Procedure VarSQLTimeStampCreate4( var aDest : Variant; const ASQLTimeStamp : TSQLTimeStamp); Function VarSQLTimeStampCreate3: Variant; Function VarSQLTimeStampCreate2( const AValue : string) : Variant; Function VarSQLTimeStampCreate1( const AValue : TDateTime) : Variant; Function VarSQLTimeStampCreate( const ASQLTimeStamp : TSQLTimeStamp) : Variant; Function VarSQLTimeStamp : TVarType Function VarIsSQLTimeStamp( const aValue : Variant) : Boolean; Function LocalToUTC( var TZInfo : TTimeZone; var Value : TSQLTimeStamp) : TSQLTimeStamp //beta Function UTCToLocal( var TZInfo : TTimeZone; var Value : TSQLTimeStamp) : TSQLTimeStamp //beta Function VarToSQLTimeStamp( const aValue : Variant) : TSQLTimeStamp Function SQLTimeStampToStr( const Format : string; DateTime : TSQLTimeStamp) : string Function SQLDayOfWeek( const DateTime : TSQLTimeStamp) : Int Function DateTimeToSQLTimeStamp( const DateTime : TDateTime) : TSQLTimeStamp Function SQLTimeStampToDateTime( const DateTime : TSQLTimeStamp) : TDateTime Function TryStrToSQLTimeStamp( const S : string; var TimeStamp : TSQLTimeStamp) : Boolean Function StrToSQLTimeStamp( const S : string) : TSQLTimeStamp Procedure CheckSqlTimeStamp( const ASQLTimeStamp : TSQLTimeStamp) Function ExtractFieldName( const Fields : string; var Pos : Int) : string; Function ExtractFieldName( const Fields : WideString; var Pos : Int) : WideString; //'Procedure RegisterFields( const FieldClasses : array of TFieldClass) Procedure DatabaseError( const Message : WideString; Component : TComponent) Procedure DatabaseErrorFmt(const Message:WIdeString; const Args:array of const;Component:TComponent) Procedure DisposeMem( var Buffer, Size : Int) Function BuffersEqual( Buf1, Buf2 : Pointer; Size : Int) : Boolean Function GetFieldProperty(DataSet:TDataSet;Control:TComponent;const FieldName:WideString): TField Function VarTypeToDataType( VarType : Int) : TFieldType ***********************************************unit JvStrings;***************************************** {template functions} function ReplaceFirst(const SourceStr, FindStr, ReplaceStr: string): string; function ReplaceLast(const SourceStr, FindStr, ReplaceStr: string): string; function InsertLastBlock(var SourceStr: string; BlockStr: string): Boolean; function RemoveMasterBlocks(const SourceStr: string): string; function RemoveFields(const SourceStr: string): string; {http functions} function URLEncode(const Value:AnsiString):AnsiString;// Converts string To A URLEncoded string function URLDecode(const Value:AnsiString):AnsiString;// Converts string From A URLEncoded string {set functions} procedure SplitSet(AText: string; AList: TStringList); function JoinSet(AList: TStringList): string; function FirstOfSet(const AText: string): string; function LastOfSet(const AText: string): string; function CountOfSet(const AText: string): Int; function SetRotateRight(const AText: string): string; function SetRotateLeft(const AText: string): string; function SetPick(const AText: string; AIndex: Int): string; function SetSort(const AText: string): string; function SetUnion(const Set1, Set2: string): string; function SetIntersect(const Set1, Set2: string): string; function SetExclude(const Set1, Set2: string): string; {replace any <,> etc by < >} function XMLSafe(const AText: string): string; {simple hash, Result can be used in Encrypt} function Hash(const AText: string): Int; { Base64 encode and decode a string } function B64Encode(const S: AnsiString): AnsiString; function B64Decode(const S: AnsiString): AnsiString; {Basic encryption from a Borland Example} function Encrypt(const InString: AnsiString; StartKey, MultKey, AddKey: Int): AnsiString; function Decrypt(const InString: AnsiString; StartKey, MultKey, AddKey: Int): AnsiString; {Using Encrypt and Decrypt in combination with B64Encode and B64Decode} function EncryptB64(const InString:AnsiString; StartKey, MultKey, AddKey: Int): AnsiString; function DecryptB64(const InString:AnsiString; StartKey, MultKey, AddKey: Int): AnsiString; procedure CSVToTags(Src, Dst: TStringList); // converts a csv list to a tagged string list procedure TagsToCSV(Src, Dst: TStringList); // converts a tagged string list to a csv list // only fieldnames from the first record are scanned ib the other records procedure ListSelect(Src, Dst: TStringList; const AKey, AValue: string); {selects akey=avalue from Src and returns recordset in Dst} procedure ListFilter(Src: TStringList; const AKey, AValue: string); {filters Src for akey=avalue} procedure ListOrderBy(Src: TStringList; const AKey: string; Numeric: Boolean); {orders a tagged Src list by akey} function PosStr(const FindString, SourceString: string; StartPos: Int = 1): Int; { PosStr searches the first occurrence of a substring FindString in a string given by SourceString with case sensitivity (upper and lower case characters are differed). This function returns the index value of the first character of a specified substring from which it occurs in a given string starting with StartPos character index. If a specified substring is not found Q_PosStr returns zero. author of algorithm is Peter Morris (UK) (Faststrings from www.torry.ru). } function PosStrLast(const FindString, SourceString: string): Int; {finds the last occurance} function LastPosChar(const FindChar: Char; SourceString: string): Int; function PosText(const FindString, SourceString: string; StartPos: Int = 1): Int; { PosText searches the first occurrence of a substring FindString in a string given by SourceString without case sensitivity (upper and lower case characters are not differed). This function returns the index value of the first character of a specified substring from which it occurs in a given string starting with Start function PosTextLast(const FindString, SourceString: string): Int; {finds the last occurance} function NameValuesToXML(const AText: string): string; {$IFDEF MSWINDOWS} procedure LoadResourceFile(AFile: string; MemStream: TMemoryStream); {$ENDIF MSWINDOWS} procedure DirFiles(const ADir, AMask: string; AFileList: TStringList); procedure RecurseDirFiles(const ADir: string; var AFileList: TStringList); procedure RecurseDirProgs(const ADir: string; var AFileList: TStringList); procedure SaveString(const AFile, AText: string); Procedure SaveStringasFile( const AFile, AText : string) function LoadStringJ(const AFile: string): string; Function LoadStringofFile( const AFile : string) : string Procedure SaveStringtoFile( const AFile, AText : string) Function LoadStringfromFile( const AFile : string) : string function HexToColor(const AText: string): TColor; function UppercaseHTMLTags(const AText: string): string; function LowercaseHTMLTags(const AText: string): string; procedure GetHTMLAnchors(const AFile: string; AList: TStringList); function RelativePath(const ASrc, ADst: string): string; function GetToken(var Start: Int; const SourceText: string): string; function PosNonSpace(Start: Int; const SourceText: string): Int; function PosEscaped(Start: Int; const SourceText, FindText: string; EscapeChar: Char): Int; function DeleteEscaped(const SourceText: string; EscapeChar: Char): string; function BeginOfAttribute(Start: Int; const SourceText: string): Int; // parses the beginning of an attribute: space + alpha character function ParseAttribute(var Start:Int; const SourceText:string; var AName,AValue:string): Boolean; //parses a name="value" attrib from Start; returns 0 when not found or else the position behind attribute procedure ParseAttributes(const SourceText: string; Attributes: TStrings); // parses all name=value attributes to the attributes TStringList function HasStrValue(const AText, AName: string; var AValue: string): Boolean; // checks if a name="value" pair exists and returns any value function GetStrValue(const AText, AName, ADefault: string): string; // retrieves string value from a line like: // name="jan verhoeven" email="jan1 dott verhoeven att wxs dott nl" // returns ADefault when not found function GetHTMLColorValue(const AText, AName: string; ADefault: TColor): TColor; // same for a color function GetIntValue(const AText, AName: string; ADefault: Int): Int; // same for an Int function GetFloatValue(const AText, AName: string; ADefault: Extended): Extended; // same for a float function GetBoolValue(const AText, AName: string): Boolean; // same for Boolean but without default function GetValue(const AText, AName: string): string; //retrieves string value from a line like: name="jan verhoeven" email="jan1 verhoeven att wxs dott nl" procedure SetValue(var AText: string; const AName, AValue: string); // sets a string value in a line procedure DeleteValue(var AText: string; const AName: string); // deletes a AName="value" pair from AText procedure GetNames(AText: string; AList: TStringList); // get a list of names from a string with name="value" pairs function GetHTMLColor(AColor: TColor): string; // converts a color value to the HTML hex value function BackPosStr(Start: Int; const FindString, SourceString: string): Int; // finds a string backward case sensitive function BackPosText(Start: Int; const FindString, SourceString: string): Int; // finds a string backward case insensitive function PosRangeStr(Start: Int; const HeadString, TailString, SourceString: string; var RangeBegin: Int; var RangeEnd: Int): Boolean; // finds a text range, e.g. .... case sensitive function PosRangeText(Start: Int; const HeadString, TailString, SourceString: string; var RangeBegin: Int; var RangeEnd: Int): Boolean; // finds a text range, e.g. .... case insensitive function BackPosRangeStr(Start: Int; const HeadString, TailString, SourceString: string; var RangeBegin: Int; var RangeEnd: Int): Boolean; // finds a text range backward, e.g. .... case sensitive function BackPosRangeText(Start: Int; const HeadString, TailString, SourceString: string; var RangeBegin: Int; var RangeEnd: Int): Boolean; // finds a text range backward, e.g. .... case insensitive function PosTag(Start: Int; SourceString: string; var RangeBegin: Int; var RangeEnd: Int): Boolean; // finds a HTML or XML tag: <....> function InnerTag(Start: Int; const HeadString, TailString, SourceString: string; var RangeBegin: Int; var RangeEnd: Int): Boolean; // finds the innertext between opening and closing tags function Easter(NYear: Int): TDateTime; // returns the easter date of a year. function GetWeekNumber(Today: TDateTime): string; //gets a datecode. Returns year and weeknumber in format: YYWW function ParseNumber(const S: string): Int; // parse number returns the last position, starting from 1 function ParseDate(const S: string): Int; // parse a SQL style data string from positions 1, // starts and ends with # ******************************************unit JvJCLUtils;************************************ PathDelim','String').SetString( '\; DriveDelim','String').SetString( ':; PathSep','String').SetString( ';; AllFilesMask','String').SetString( '*.*; PathDelim','String').SetString( '/; AllFilesMask','String').SetString( '*; NullHandle','LongInt').SetInt( 0); USDecimalSeparator','String').SetString( '.; ClassN(CL.FindClass('TOBJECT'),'EJvConvertError; TypeS('TFileTime', 'Int; // TypeS('TFormatSettings', 'record DecimalSeparator : Char; end; Function SendRectMessage(Handle: THandle; Msg : Int; wParam : longint; var R : TRect): Int; //DelphiFunction('Function SendStructMessage( Handle : THandle; Msg : Int; wParam : WPARAM; var Data) : Int; Function ReadCharsFromStream(Stream: TStream; var Buf:array of PChar;BufSize:Int):Int; Function WriteStringToStream(Stream: TStream; const Buf: AnsiString;BufSize:Int): Int; Function UTF8ToString( const S : UTF8String) : string; //ConstantN('DefaultDateOrder','').SetString('doDMY; ConstantN('CenturyOffset','Byte').SetUInt( 60); function VarIsInt(Value: Variant): Boolean; // VarIsInt returns VarIsOrdinal-[varBoolean] { PosIdx returns the index of the first appearance of SubStr in Str. The search starts at index "Index". } function PosIdx(const SubStr, S: string; Index: Int = 0): Int; function PosIdxW(const SubStr, S: WideString; Index: Int = 0): Int; function PosLastCharIdx(Ch: Char; const S: string; Index: Int = 0): Int; { GetWordOnPos returns Word from string, S, on the cursor position, P} function GetWordOnPos(const S: string; const P: Int): string; function GetWordOnPosW(const S: WideString; const P: Int): WideString; function GetWordOnPos2(const S: string; P: Int; var iBeg, iEnd: Int): string; function GetWordOnPos2W(const S: WideString; P: Int; var iBeg, iEnd: Int): WideString; { GetWordOnPosEx working like GetWordOnPos function, but also returns Word position in iBeg, iEnd variables } function GetWordOnPosEx(const S: string; const P: Int; var iBeg, iEnd: Int): string; function GetWordOnPosExW(const S: WideString; const P: Int; var iBeg, iEnd: Int): WideString; function GetNextWordPosEx(const Text: string; StartIndex: Int; var iBeg, iEnd: Int): string; function GetNextWordPosExW(const Text:WideString;StartIndex:Int; var iBeg,iEnd:Int):WideString; procedure GetEndPosCaret(const Text: string; CaretX, CaretY: Int; var X, Y: Int); { GetEndPosCaret returns the caret position of the last char. For the position after the last char of Text you must add 1 to the returned X value. } procedure GetEndPosCaretW(const Text: WideString;CaretX,CaretY:Int;var X,Y:Int); { GetEndPosCaret returns the caret position of the last char. For the position after the last char of Text you must add 1 to the returned X value. } { SubStrBySeparator returns substring from string, S, separated with Separator string} function SubStrBySeparator(const S:string;const Index:Int;const Separator:string;StartIndex:Int=1):string; function SubStrBySeparatorW(const S:WideString;const Index:Int;const Separator:WideString;StartIndex:Int:WideString; { SubStrEnd same to previous function but Index numerated from the end of string } function SubStrEnd(const S: string; const Index: Int; const Separator: string): string; { SubWord returns next Word from string, P, and offsets Pointer to the end of Word, P2 } function SubWord(P: PChar; var P2: PChar): string; function CurrencyByWord(Value: Currency): string; { GetLineByPos returns the Line number, there the symbol Pos is pointed. Lines separated with #13 symbol } function GetLineByPos(const S: string; const Pos: Int): Int; { GetXYByPos is same as GetLineByPos, but returns X position in line as well} procedure GetXYByPos(const S: string; const Pos: Int; var X, Y: Int); procedure GetXYByPosW(const S: WideString; const Pos: Int; var X, Y: Int); { ReplaceString searches for all substrings, OldPattern, in a string, S, and replaces them with NewPattern } function ReplaceString(S: string; const OldPattern,NewPattern: string; StartIndex:Int = 1):string; function ReplaceStringW(S: WideString; const OldPattern,NewPattern: WideString;StartIndex:Int=1):WideString; { ConcatSep concatenate S1 and S2 strings with Separator. if S = '' then separator not included } function ConcatSep(const S1, S2, Separator: string): string; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} { ConcatLeftSep is same to previous function, but strings concatenate right to left } function ConcatLeftSep(const S1, S2, Separator: string): string; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} { Next 4 function for russian chars transliterating. This functions are needed because Oem2Ansi and Ansi2Oem functions sometimes suck } procedure Dos2Win(var S: AnsiString); procedure Win2Dos(var S: AnsiString); function Dos2WinRes(const S: AnsiString): AnsiString; inline; {$ENDIF SUPPORTS_INLINE} function Win2DosRes(const S: AnsiString): AnsiString; inline; {$ENDIF SUPPORTS_INLINE} function Win2Koi(const S: AnsiString): AnsiString; { FillString fills the string Buffer with Count Chars } procedure FillString(var Buffer: string; Count: Int; const Value: Char); overload; procedure FillString1(var Buffer: string; StartIndex,Count:Int; const Value: Char); overload; { MoveString copies Count Chars from Source to Dest } procedure MoveString(const Source: string; var Dest: string; Count: Int); {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} overload; procedure MoveString1(const Source: string; SrcStartIdx: Int; var Dest: string; DstStartIdx: Int;Count: Int);{$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} overload; { FillWideChar fills Buffer with Count WideChars (2 Bytes) } procedure FillWideChar(var Buffer; Count: Int; const Value: WideChar); { MoveWideChar copies Count WideChars from Source to Dest } procedure MoveWideChar(const Source; var Dest;Count:Int);{$IFDEF SUPPORTS_INLINE}inline;{$ENDIF SUPPORTS_INLINE} { FillNativeChar fills Buffer with Count NativeChars } procedure FillNativeChar(var Buffer; Count: Int; const Value: Char); // D2009 internal error {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} { MoveWideChar copies Count WideChars from Source to Dest } procedure MoveNativeChar(const Source; var Dest; Count: Int); // D2009 internal error {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} { IsSubString() compares the sub string to the string. Indices are 1th based. } function IsSubString(const S: string; StartIndex: Int; const SubStr: string): Boolean; { Spaces returns string consists on N space chars } function Spaces(const N: Int): string; { AddSpaces adds spaces to string S, if its Length is smaller than N } function AddSpaces(const S: string; const N: Int): string; function SpacesW(const N: Int): WideString; function AddSpacesW(const S: WideString; const N: Int): WideString; { function LastDateRUS for russian users only } { returns date relative to current date: 'äâà äíÿ íàçàä' } function LastDateRUS(const Dat: TDateTime): string; { CurrencyToStr format Currency, Cur, using ffCurrency float format} function CurrencyToStr(const Cur: Currency): string; { HasChar returns True, if Char, Ch, contains in string, S } function HasChar(const Ch: Char; const S: string): Boolean; function HasCharW(const Ch: WideChar; const S: WideString): Boolean; inline; {$ENDIF SUPPORTS_INLINE} function HasAnyChar(const Chars: string; const S: string): Boolean; {$IFNDEF COMPILER12_UP} function CharInSet(const Ch: AnsiChar;const SetOfChar:TSysCharSet):Boolean;inline;{$ENDIF SUPPORTS_INLINE} {$ENDIF ~COMPILER12_UP} function CharInSetW(const Ch: WideChar;const SetOfChar: TSysCharSet):Boolean;inline; {$ENDIF SUPPORTS_INLINE} function CountOfChar(const Ch: Char; const S: string): Int; function DefStr(const S:string; Default:string):string; {$IFDEF SUPPORTS_INLINE} inline;{$ENDIF SUPPORTS_INLINE} { StrLICompW2 is a faster replacement for JclUnicode.StrLICompW } function StrLICompW2(S1, S2: PWideChar; MaxLen: Int): Int; function StrPosW(S, SubStr: PWideChar): PWideChar; function StrLenW(S: PWideChar): Int; function TrimW(const S: WideString):WideString;{$IFDEF SUPPORTS_INLINE} inline;{$ENDIF SUPPORTS_INLINE} function TrimLeftW(const S: WideString): WideString; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} function TrimRightW(const S: WideString): WideString; inline; {$ENDIF SUPPORTS_INLINE} TPixelFormat', '( pfDevice, pf1bit, pf4bit, pf8bit, pf24bit ) TMappingMethod', '( mmHistogram, mmQuantize, mmTrunc784, mmTrunc666, mmTripel, mmGrayscale ) Function GetBitmapPixelFormat( Bitmap : TBitmap) : TPixelFormat Function GetPaletteBitmapFormat( Bitmap : TBitmap) : TPixelFormat Procedure SetBitmapPixelFormat( Bitmap: TBitmap; PixelFormat: TPixelFormat; Method: TMappingMethod) Function BitmapToMemoryStream(Bitmap:TBitmap;PixelFormat:TPixelFormat;Method:TMappingMethod):TMemoryStream; Procedure GrayscaleBitmap( Bitmap : TBitmap) Function BitmapToMemory( Bitmap : TBitmap; Colors : Int) : TStream Procedure SaveBitmapToFile( const Filename : string; Bitmap : TBitmap; Colors : Int) Function ScreenPixelFormat : TPixelFormat Function ScreenColorCount : Int Procedure TileImage( Canvas : TCanvas; Rect : TRect; Image : TGraphic) Function ZoomImage( ImageW, ImageH, MaxW, MaxH : Int; Stretch : Boolean) : TPoint // SIRegister_TJvGradient(CL); {**************************************** files routines} procedure SetDelimitedText(List: TStrings; const Text: string; Delimiter: Char); const {$IFDEF MSWINDOWS} DefaultCaseSensitivity = False; {$ENDIF MSWINDOWS} {$IFDEF UNIX} DefaultCaseSensitivity = True; {$ENDIF UNIX} { GenTempFileName returns temporary file name on drive, there FileName is placed } function GenTempFileName(FileName: string): string; { GenTempFileNameExt same to previous function, but returning filename has given extension, FileExt } function GenTempFileNameExt(FileName: string; const FileExt: string): string; { ClearDir clears folder Dir } function ClearDir(const Dir: string): Boolean; { DeleteDir clears and than delete folder Dir } function DeleteDir(const Dir: string): Boolean; { FileEquMask returns True if file, FileName, is compatible with given dos file mask, Mask } function FileEquMask(FileName, Mask: TFileName; CaseSensitive: Boolean=DefaultCaseSensitivity): Boolean; { FileEquMasks returns True if file, FileName, is compatible with given Masks. Masks must be separated with SepPath (MSW: ';' / UNIX: ':') } function FileEquMasks(FileName, Masks: TFileName; CaseSensitive: Boolean = DefaultCaseSensitivity): Boolean; function DeleteFiles(const Folder: TFileName; const Masks: string): Boolean; {$IFDEF MSWINDOWS} { LZFileExpand expand file, FileSource, into FileDest. Given file must be compressed, using MS Compress program } function LZFileExpand(const FileSource, FileDest: string): Boolean; {$ENDIF MSWINDOWS} { FileGetInfo fills SearchRec record for specified file attributes} function FileGetInfo(FileName: TFileName; var SearchRec: TSearchRec): Boolean; { HasSubFolder returns True, if folder APath contains other folders } function HasSubFolder(APath: TFileName): Boolean; { IsEmptyFolder returns True, if there are no files or folders in given folder, APath} function IsEmptyFolder(APath: TFileName): Boolean; { AddSlash returns string with added slash Char to Dir parameter, if needed } function AddSlash(const Dir: TFileName): string; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} { AddPath returns FileName with Path, if FileName not contain any path } function AddPath(const FileName, Path: TFileName): TFileName; function AddPaths(const PathList, Path: string): string; function ParentPath(const Path: TFileName): TFileName; function FindInPath(const FileName, PathList: string): TFileName; { DeleteReadOnlyFile clears R/O file attribute and delete file } function DeleteReadOnlyFile(const FileName: TFileName): Boolean; { HasParam returns True, if program running with specified parameter, Param } function HasParam(const Param: string): Boolean; function HasSwitch(const Param: string): Boolean; function Switch(const Param: string): string; { ExePath returns ExtractFilePath(ParamStr(0)) } function ExePath: TFileName; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} function CopyDir(const SourceDir, DestDir: TFileName): Boolean; //function FileTimeToDateTime(const FT: TFileTime): TDateTime; procedure FileTimeToDosDateTimeDWord(const FT: TFileTime; out Dft: DWORD); function MakeValidFileName(const FileName: TFileName; ReplaceBadChar: Char): TFileName; {**** Graphic routines } { IsTTFontSelected returns True, if True Type font is selected in specified device context } function IsTTFontSelected(const DC: HDC): Boolean; function KeyPressed(VK: Int): Boolean; Function isKeypressed: boolean; //true if key on memo2 (shell output) is pressed { TrueInflateRect inflates rect in other method, than InflateRect API function } function TrueInflateRect(const R: TRect; const I: Int): TRect; {**** Color routines } procedure RGBToHSV(R, G, B: Int; var H, S, V: Int); function RGBToBGR(Value: Cardinal): Cardinal; //function ColorToPrettyName(Value: TColor): string; //function PrettyNameToColor(const Value: string): TColor; {**** other routines } procedure SwapInt(var Int1, Int2: Int); {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} function IntPower(Base, Exponent: Int): Int; function ChangeTopException(E: TObject): TObject; // Linux version writes error message to ErrOutput function StrToBool(const S: string): Boolean; function Var2Type(V: Variant; const DestVarType: Int): Variant; function VarToInt(V: Variant): Int; function VarToFloat(V: Variant): Double; { following functions are not documented because they not work properly sometimes, so do not use them } // (rom) ReplaceStrings1, GetSubStr removed function GetLongFileName(const FileName: string): string; function FileNewExt(const FileName, NewExt: TFileName): TFileName; function GetParameter: string; function GetComputerID: string; function GetComputerName: string; {**** string routines } { ReplaceAllStrings searches for all substrings, Words, in a string, S, and replaces them with Frases with the same Index. } function ReplaceAllStrings(const S: string; Words, Frases: TStrings): string; { ReplaceStrings searches the Word in a string, S, on PosBeg position, in the list, Words, and if founds, replaces this Word with string from another list,Frases, with the same Index, and then update NewSelStart variable } function ReplaceStrings(const S:string;PosBeg,Len:Int;Words,Frases:TStrings;var NewSelStart:Int):string; { CountOfLines calculates the lines count in a string, S, each line must be separated from another with CrLf sequence } function CountOfLines(const S: string): Int; { DeleteLines deletes all lines from strings which in the words, words. The word of will be deleted from strings. } procedure DeleteOfLines(Ss: TStrings; const Words: array of string); { DeleteEmptyLines deletes all empty lines from strings, Ss. Lines contained only spaces also deletes. } procedure DeleteEmptyLines(Ss: TStrings); { SQLAddWhere addes or modifies existing where-statement, where, to the strings, SQL. Note: If strings SQL allready contains where-statement, it must be started on the begining of any line } procedure SQLAddWhere(SQL: TStrings; const Where: string); {**** files routines - } {$IFDEF MSWINDOWS} { ResSaveToFile save resource named as Name with Typ type into file FileName. Resource can be compressed using MS Compress program} function ResSaveToFile(const Typ,Name:string; const Compressed: Boolean; const FileName: string): Boolean; function ResSaveToFileEx(Instance:HINST;Typ,Name:PChar;const Compressed:Boolean;const FileName:string): Boolean; function ResSaveToString(Instance: HINST; const Typ, Name: string; var S: string): Boolean; {$ENDIF MSWINDOWS} { IniReadSection read section, Section, from ini-file, IniFileName, into strings, Ss.This function reads ALL strings from specified section. Note: TIninFile.ReadSection function reads only strings with '=' symbol.} function IniReadSection(const IniFileName: TFileName; const Section: string; Ss: TStrings): Boolean; { LoadTextFile load text file, FileName, into string } function LoadTextFile(const FileName: TFileName): string; procedure SaveTextFile(const FileName: TFileName; const Source: string); { ReadFolder reads files list from disk folder,Folder,that are equal to mask, Mask,into strings, FileList} function ReadFolder(const Folder, Mask: TFileName; FileList: TStrings): Int; function ReadFolders(const Folder: TFileName; FolderList: TStrings): Int; { RATextOut same with TCanvas.TextOut procedure, but can clipping drawing with rectangle, RClip. } procedure RATextOut(Canvas: TCanvas; const R, RClip: TRect; const S: string); { RATextOutEx same with RATextOut function, but can calculate needed height for correct output } function RATextOutEx(Canvas:TCanvas;const R,RClip:TRect; const S:string;const CalcHeight:Boolean):Int; { RATextCalcHeight calculate needed height for correct output, using RATextOut or RATextOutEx functions } function RATextCalcHeight(Canvas: TCanvas; const R: TRect; const S: string): Int; { Cinema draws some visual effect } procedure Cinema(Canvas: TCanvas; rS {Source}, rD {Dest}: TRect); { Roughed fills rect with special 3D pattern } procedure Roughed(ACanvas: TCanvas; const ARect: TRect; const AVert: Boolean); { BitmapFromBitmap creates new small bitmap from part of source bitmap, SrcBitmap, with specified width and height, AWidth, AHeight and placed on a specified Index, Index in the source bitmap } function BitmapFromBitmap(SrcBitmap: TBitmap; const AWidth, AHeight, Index: Int): TBitmap; { TextWidth calculate text with for writing using standard desktop font } function TextWidth(const AStr: string): Int; { TextHeight calculate text height for writing using standard desktop font } function TextHeight(const AStr: string): Int; procedure SetChildPropOrd(Owner: TComponent; const PropName: string; Value: Longint); procedure Error(const Msg: string); procedure ItemHtDrawEx(Canvas: TCanvas; Rect: TRect; const State: TOwnerDrawState; const Text: string; const HideSelColor: Boolean; var PlainItem: string; var Width: Int; CalcWidth: Boolean); {example Text parameter:'Item 1bolditalic ITALIC redgreenblue' } function ItemHtDraw(Canvas: TCanvas; Rect: TRect; const State: TOwnerDrawState; const Text: string; const HideSelColor: Boolean): string; function ItemHtWidth(Canvas: TCanvas; Rect: TRect; const State: TOwnerDrawState; const Text: string; const HideSelColor: Boolean): Int; function ItemHtPlain(const Text: string): string; { ClearList - clears list of TObject } procedure ClearList(List: TList); procedure MemStreamToClipBoard(MemStream: TMemoryStream; const Format: Word); procedure ClipBoardToMemStream(MemStream: TMemoryStream; const Format: Word); { RTTI support } function GetPropType(Obj: TObject; const PropName: string): TTypeKind; function GetPropStr(Obj: TObject; const PropName: string): string; function GetPropOrd(Obj: TObject; const PropName: string): Int; function GetPropMethod(Obj: TObject; const PropName: string): TMethod; procedure PrepareIniSection(Ss: TStrings); { following functions are not documented because they are don't work properly, so don't use them } // (rom) from JvBandWindows to make it obsolete function PointL(const X, Y: Longint): TPointL; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} // (rom) from JvBandUtils to make it obsolete function iif(const Test: Boolean; const ATrue, AFalse: Variant): Variant; procedure CopyIconToClipboard(Icon: TIcon; BackColor: TColor); function CreateIconFromClipboard: TIcon; { begin JvIconClipboardUtils } { Icon clipboard routines } function CF_ICON: Word; procedure AssignClipboardIcon(Icon: TIcon); { Real-size icons support routines (32-bit only) } procedure GetIconSize(Icon: HICON; var W, H: Int); function CreateRealSizeIcon(Icon: TIcon): HICON; procedure DrawRealSizeIcon(Canvas: TCanvas; Icon: TIcon; X, Y: Int); {end JvIconClipboardUtils } function CreateScreenCompatibleDC: HDC; function InvalidateRect(hWnd: HWND; const lpRect:TRect; bErase:BOOL):BOOL; overload; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF} function InvalidateRect(hWnd: HWND; lpRect: PRect; bErase: BOOL): BOOL; overload; { begin JvRLE } // (rom) changed API for inclusion in JCL procedure RleCompressTo(InStream, OutStream: TStream); procedure RleDecompressTo(InStream, OutStream: TStream); procedure RleCompress(Stream: TStream); procedure RleDecompress(Stream: TStream); { end JvRLE } { begin JvDateUtil } function CurrentYear: Word; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} function IsLeapYear(AYear: Int): Boolean; function DaysInAMonth(const AYear, AMonth: Word): Word; function DaysPerMonth(AYear, AMonth: Int): Int; function FirstDayOfPrevMonth: TDateTime; function LastDayOfPrevMonth: TDateTime; function FirstDayOfNextMonth: TDateTime; function ExtractDay(ADate: TDateTime): Word; function ExtractMonth(ADate: TDateTime): Word; function ExtractYear(ADate: TDateTime): Word; function IncDate(ADate: TDateTime; Days, Months, Years: Int): TDateTime; function IncDay(ADate: TDateTime;Delta:Int):TDateTime; inline; {$ENDIF SUPPORTS_INLINE} function IncMonth(ADate: TDateTime; Delta: Int): TDateTime; function IncYear(ADate: TDateTime; Delta: Int): TDateTime; function ValidDate(ADate: TDateTime): Boolean; procedure DateDiff(Date1, Date2: TDateTime; var Days, Months, Years: Word); function MonthsBetween(Date1, Date2: TDateTime): Double; function DaysInPeriod(Date1, Date2: TDateTime): Longint; { Count days between Date1 and Date2 + 1, so if Date1 = Date2 result = 1 } function DaysBetween(Date1, Date2: TDateTime): Longint; { The same as previous but if Date2 < Date1 result = 0 } function IncTime(ATime: TDateTime; Hours, Minutes, Seconds, MSecs: Int): TDateTime; function IncHour(ATime: TDateTime; Delta: Int): TDateTime; function IncMinute(ATime: TDateTime; Delta: Int): TDateTime; function IncSecond(ATime: TDateTime; Delta: Int): TDateTime; function IncMSec(ATime: TDateTime; Delta: Int): TDateTime; function CutTime(ADate: TDateTime): TDateTime; { Set time to 00:00:00:00 } { String to date conversions } function GetDateOrder(const DateFormat: string): TDateOrder; function MonthFromName(const S: string; MaxLen: Byte): Byte; function StrToDateDef(const S: string; Default: TDateTime): TDateTime; function StrToDateFmt(const DateFormat, S: string): TDateTime; function StrToDateFmtDef(const DateFormat, S: string; Default: TDateTime): TDateTime; //function DefDateFormat(AFourDigitYear: Boolean): string; //function DefDateMask(BlanksChar: Char; AFourDigitYear: Boolean): string; function FormatLongDate(Value: TDateTime): string; function FormatLongDateTime(Value: TDateTime): string; { end JvDateUtil } function BufToBinStr(Buf: Pointer; BufSize: Int): string; function BinStrToBuf(Value: string; Buf: Pointer; BufSize: Int): Int; { begin JvStrUtils } { ** Common string handling routines ** } {$IFDEF UNIX} function iconversion(InP: PAnsiChar; OutP: Pointer; InBytes, OutBytes: Cardinal; const ToCode, FromCode: AnsiString): Boolean; function iconvString(const S, ToCode, FromCode: AnsiString): string; function iconvWideString(const S: WideString; const ToCode, FromCode: AnsiString): WideString; function OemStrToAnsi(const S: AnsiString): AnsiString; function AnsiStrToOem(const S: AnsiString): AnsiString; {$ENDIF UNIX} function StrToOem(const AnsiStr: AnsiString): AnsiString; { StrToOem translates a string from the Windows character set into the OEM character set. } function OemToAnsiStr(const OemStr: AnsiString): AnsiString; { OemToAnsiStr translates a string from the OEM character set into the Windows character set. } function IsEmptyStr(const S: string; const EmptyChars: TSysCharSet): Boolean; { EmptyStr returns True if the given string contains only character from the EmptyChars. } function ReplaceStr(const S, Srch, Replace: string): string; { Returns string with every occurrence of Srch string replaced with Replace string. } function DelSpace(const S: string): string; { DelSpace return a string with all white spaces removed. } function DelChars(const S: string; Chr: Char): string; { DelChars return a string with all Chr characters removed. } function DelBSpace(const S: string): string; { DelBSpace trims leading spaces from the given string. } function DelESpace(const S: string): string; { DelESpace trims trailing spaces from the given string. } function DelRSpace(const S: string): string; { DelRSpace trims leading and trailing spaces from the given string. } function DelSpace1(const S: string): string; { DelSpace1 return a string with all non-single white spaces removed. } function Tab2Space(const S: string; Numb: Byte): string; { Tab2Space converts any tabulation character in the given string to the Numb spaces characters. } function NPos(const C: string; S: string; N: Int): Int; { NPos searches for a N-th position of substring C in a given string. } function MakeStr(C: Char; N: Int): string; overload; {$IFNDEF COMPILER12_UP} function MakeStr(C: WideChar; N: Int): WideString; overload; {$ENDIF !COMPILER12_UP} function MS(C: Char; N: Int): string; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} { MakeStr return a string of length N filled with character C. } function AddChar(C: Char; const S: string; N: Int): string; { AddChar return a string left-padded to length N with characters C. } function AddCharR(C: Char; const S: string; N: Int): string; { AddCharR return a string right-padded to length N with characters C. } function LeftStr(const S: string; N: Int): string; { LeftStr return a string right-padded to length N with blanks. } function RightStr(const S: string; N: Int): string; { RightStr return a string left-padded to length N with blanks. } function CenterStr(const S: string; Len: Int): string; { CenterStr centers the characters in the string based upon the Len specified. } function CompStr(const S1, S2: string): Int; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} { CompStr compares S1 to S2, with case-sensitivity. The return value is -1 if S1 < S2, 0 if S1 = S2, or 1 if S1 > S2. } function CompText(const S1, S2: string):Int; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} { CompText compares S1 to S2, without case-sensitivity. The return value is the same as for CompStr. } function Copy2Symb(const S: string; Symb: Char): string; { Copy2Symb returns a substring of a string S from begining to first character Symb. } function Copy2SymbDel(var S: string; Symb: Char): string; { Copy2SymbDel returns a substring of a string S from begining to first character Symb and removes this substring from S. } function Copy2Space(const S: string): string; { Copy2Symb returns a substring of a string S from begining to first white space. } function Copy2SpaceDel(var S: string): string; { Copy2SpaceDel returns a substring of a string S from begining to first white space and removes this substring from S. } function AnsiProperCase(const S: string; const WordDelims: TSysCharSet): string; { Returns string, with the first letter of each word in uppercase, all other letters in lowercase. Words are delimited by WordDelims. } function WordCount(const S: string; const WordDelims: TSysCharSet): Int; { WordCount given a set of word delimiters, returns number of words in S. } function WordPosition(const N: Int; const S: string; const WordDelims: TSysCharSet): Int; { Given a set of word delimiters, returns start position of N'th word in S. } function ExtractWord(N: Int; const S: string; const WordDelims: TSysCharSet): string; function ExtractWordPos(N: Int;const S: string;const WordDelims:TSysCharSet;var Pos: Int): string; function ExtractDelimited(N: Int; const S: string;const Delims: TSysCharSet): string; { ExtractWord, ExtractWordPos and ExtractDelimited given a set of word delimiters, return the N'th word in S. } function ExtractSubstr(const S: string; var Pos: Int;const Delims: TSysCharSet): string; { ExtractSubstr given a set of word delimiters, returns the substring from S, that started from position Pos. } function IsWordPresent(const W, S: string; const WordDelims: TSysCharSet): Boolean; {IsWordPresent given a set of word delimiters, returns True if word W is present in string S. } function QuotedString(const S: string; Quote: Char): string; {QuotedString returns the given string as a quoted string, using provided Quote character. } function ExtractQuotedString(const S: string; Quote: Char): string; { ExtractQuotedString removes the Quote characters from the beginning and end of a quoted string, and reduces pairs of Quote characters within quoted string to single character.} function FindPart(const HelpWilds, InputStr: string): Int; { FindPart compares a string with '?' and another, returns the position of HelpWilds in InputStr. } function IsWild(InputStr, Wilds: string; IgnoreCase: Boolean): Boolean; { IsWild compares InputString with WildCard string and returns True if corresponds. } function XorString(const Key, Src: ShortString): ShortString; function XorEncode(const Key, Source: string): string; function XorDecode(const Key, Source: string): string; { ** Command line routines ** } function GetCmdLineArg(const Switch: string; ASwitchChars: TSysCharSet): string; { ** Numeric string handling routines ** } function Numb2USA(const S: string): string; { Numb2USA converts numeric string S to USA-format. } function Dec2Hex(N: Longint; A: Byte): string; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} { Dec2Hex converts the given value to a hexadecimal string representation with the minimum number of digits (A) specified. } function Hex2Dec(const S: string): Longint; { Hex2Dec converts the given hexadecimal string to the corresponding Int value. } function Dec2Numb(N: Int64; A, B: Byte): string; { Dec2Numb converts the given value to a string representation with the base equal to B and with the minimum number of digits (A) specified. } function Numb2Dec(S: string; B: Byte): Int64; { Numb2Dec converts the given B-based numeric string to the corresponding Int value. } function IntToBin(Value: Longint; Digits, Spaces: Int): string; { IntToBin converts the given value to a binary string representation with the minimum number of digits specified. } function IntToRoman(Value: Longint): string; { IntToRoman converts the given value to a roman numeric string representation. } function RomanToInt(const S: string): Longint; { RomanToInt converts the given string to an Int value. If the string doesn't contain a valid roman numeric value, the 0 value is returned. } function FindNotBlankCharPos(const S: string): Int; function FindNotBlankCharPosW(const S: WideString): Int; function AnsiChangeCase(const S: string): string; function WideChangeCase(const S: string): string; function StartsText(const SubStr, S: string): Boolean; function EndsText(const SubStr, S: string): Boolean; function DequotedStr(const S: string; QuoteChar: Char = ''''): string; function AnsiDequotedStr(const S: string; AQuote: Char): string; //follow Delphi 2009's "Ansi" prefix {end JvStrUtils} {$IFDEF UNIX} function GetTempFileName(const Prefix: AnsiString): AnsiString; {$ENDIF UNIX} { begin JvFileUtil } function FileDateTime(const FileName: string): TDateTime; function HasAttr(const FileName: string; Attr: Int): Boolean; function DeleteFilesEx(const FileMasks: array of string): Boolean; function NormalDir(const DirName: string): string; function RemoveBackSlash(const DirName: string): string; // only for Windows/DOS Paths function ValidFileName(const FileName: string): Boolean; {$IFDEF MSWINDOWS} function FileLock(Handle: Int; Offset, LockSize: Longint): Int; overload; function FileLock(Handle: Int; Offset, LockSize: Int64): Int; overload; function FileUnlock(Handle: Int; Offset, LockSize: Longint): Int; overload; function FileUnlock(Handle: Int; Offset, LockSize: Int64): Int; overload; {$ENDIF MSWINDOWS} function GetWindowsDir: string; function GetSystemDir: string; function ShortToLongFileName(const ShortName: string): string; function LongToShortFileName(const LongName: string): string; function ShortToLongPath(const ShortName: string): string; function LongToShortPath(const LongName: string): string; {$IFDEF MSWINDOWS} procedure CreateFileLink(const FileName, DisplayName: string; Folder: Int); procedure DeleteFileLink(const DisplayName: string; Folder: Int); {$ENDIF MSWINDOWS} { end JvFileUtil } // Works like PtInRect but includes all edges in comparision function PtInRectInclusive(R: TRect; Pt: TPoint): Boolean; // Works like PtInRect but excludes all edges from comparision function PtInRectExclusive(R: TRect; Pt: TPoint): Boolean; function FourDigitYear: Boolean; {$IFDEF SUPPORTS_DEPRECATED} deprecated; {$ENDIF} function IsFourDigitYear: Boolean; { moved from JvJVCLUTils } //Open an object with the shell (url or something like that) function OpenObject(const Value: string): Boolean; overload; function OpenObject(Value: PChar): Boolean; overload; {$IFDEF MSWINDOWS} //Raise the last Exception procedure RaiseLastWin32; overload; procedure RaiseLastWin32(const Text: string); overload; //Raise last Exception with a small comment from your part {GetFileVersion returns most significant 32 bits of a file's binary version number. Typically, this includes major / minor version placed together in one 32-bit Int. function GetFileVersion(const AFileName: string): Cardinal; {$EXTERNALSYM GetFileVersion} //Get version of Shell.dll function GetShellVersion: Cardinal; {$EXTERNALSYM GetShellVersion} // CD functions on HW procedure OpenCdDrive; procedure CloseCdDrive; // returns True if Drive is accessible function DiskInDrive(Drive: Char): Boolean; {$ENDIF MSWINDOWS} //Same as linux function ;) procedure PError(const Text: string); // execute a program without waiting procedure Exec(const FileName, Parameters, Directory: string); // execute a program and wait for it to finish function ExecuteAndWait(CmdLine:string;const WorkingDirectory:string;Visibility:Int=SW_SHOW): Int; // returns True if this is the first instance of the program that is running function FirstInstance(const ATitle: string): Boolean; // restores a window based on it's classname and Caption. Either can be left empty // to widen the search procedure RestoreOtherInstance(const MainFormClassName, MainFormCaption: string); // manipulate the traybar and start button procedure HideTraybar; procedure ShowTraybar; procedure ShowStartButton(Visible: Boolean = True); // (rom) SC_MONITORPOWER is documented as Win 95 only(rom) better do some testing set monitor functions procedure MonitorOn; procedure MonitorOff; procedure LowPower; // send a key to the window named AppName function SendKey(const AppName: string; Key: Char): Boolean; {$IFDEF MSWINDOWS} // returns a list of all win currently visible, the Objects property is filled with their window handle procedure GetVisibleWindows(List: TStrings); Function GetVisibleWindowsF( List : TStrings):TStrings; // associates an extension to a specific program procedure AssociateExtension(const IconPath, ProgramName, Path, Extension: string); procedure AddToRecentDocs(const FileName: string); function GetRecentDocs: TStringList; {$ENDIF MSWINDOWS} function CharIsMoney(const Ch: Char): Boolean; //function StrToCurrDef(const Str: string; Def: Currency): Currency; function IntToExtended(I: Int): Extended; { GetChangedText works out the new text given the current cursor pos & the key pressed It is not very useful in other contexts, but in this unit as it is needed in both MemoEx and TypedEdit } function GetChangedText(const Text: string; SelStart, SelLength: Int; Key: Char): string; function MakeYear4Digit(Year, Pivot: Int): Int; //function StrIsInt(const S: string): Boolean; function StrIsFloatMoney(const Ps: string): Boolean; function StrIsDateTime(const Ps: string): Boolean; function PreformatDateString(Ps: string): string; function BooleanToInt(const B: Boolean): Int; function StringToBoolean(const Ps: string): Boolean; function SafeStrToDateTime(const Ps: string): TDateTime; function SafeStrToDate(const Ps: string): TDateTime; function SafeStrToTime(const Ps: string): TDateTime; function StrDelete(const psSub, psMain: string): string; { returns the fractional value of pcValue} function TimeOnly(pcValue: TDateTime): TTime; { returns the integral value of pcValue } function DateOnly(pcValue: TDateTime): TDate; type TdtKind = (dtkDateOnly, dtkTimeOnly, dtkDateTime); const { TDateTime value used to signify Null value} NullEquivalentDate: TDateTime = 0.0; function DateIsNull(const pdtValue: TDateTime; const pdtKind: TdtKind): Boolean; // Replacement for Win32Check to avoid platform specific warnings in D6 function OSCheck(RetVal: Boolean): Boolean; { Shortens a fully qualified Path name so that it can be drawn with a specified length limit. Same as FileCtrl.MinimizeName in functionality (but not implementation). Included here to not be forced to use FileCtrl unnecessarily } function MinimizeFileName(const FileName: string; Canvas: TCanvas; MaxLen: Int): string; function MinimizeText(const Text: string; Canvas: TCanvas; MaxWidth: Int): string; { MinimizeString trunactes long string, S, and appends'...'symbols,if Length of S is more than MaxLen } function MinimizeString(const S: string; const MaxLen: Int): string; procedure RunDll32Internal(Wnd:THandle; const DLLName,FuncName,CmdLine:string;CmdShow:Int= SW_SHOWDEFAULT); { GetDLLVersion loads DLLName, gets a pointer to DLLVersion function and calls it, returning major and minor version values from the function. Returns False if DLL not loaded or if GetDLLVersion couldn't be found.} function GetDLLVersion(const DLLName: string; var pdwMajor, pdwMinor: Int): Boolean; {$ENDIF MSWINDOWS} procedure ResourceNotFound(ResID: PChar); function EmptyRect: TRect; function RectWidth(R: TRect): Int; function RectHeight(R: TRect): Int; function CompareRect(const R1, R2: TRect): Boolean; procedure RectNormalize(var R: TRect); function RectIsSquare(const R: TRect): Boolean; function RectSquare(var ARect: TRect; AMaxSize: Int = -1): Boolean; //If AMaxSize = -1 ,then auto calc Square's max size {$IFDEF MSWINDOWS} procedure FreeUnusedOle; function GetWindowsVersion: string; function LoadDLL(const LibName: string): THandle; function RegisterServer(const ModuleName: string): Boolean; function UnregisterServer(const ModuleName: string): Boolean; {$ENDIF MSWINDOWS} { String routines } function GetEnvVar(const VarName: string): string; function AnsiUpperFirstChar(const S: string): string; //follow Delphi 2009's example with "Ansi" prefix function StringToPChar(var S: string): PChar; function StrPAlloc(const S: string): PChar; procedure SplitCommandLine(const CmdLine: string; var ExeName, Params: string); function DropT(const S: string): string; { Memory routines } function AllocMemo(Size: Longint): Pointer; function ReallocMemo(fpBlock: Pointer; Size: Longint): Pointer; procedure FreeMemo(var fpBlock: Pointer); function GetMemoSize(fpBlock: Pointer): Longint; function CompareMem(fpBlock1, fpBlock2: Pointer; Size: Cardinal): Boolean; { Manipulate huge pointers routines } procedure HugeInc(var HugePtr: Pointer; Amount: Longint); procedure HugeDec(var HugePtr: Pointer; Amount: Longint); function HugeOffset(HugePtr: Pointer; Amount: Longint): Pointer; procedure HugeMove(Base: Pointer; Dst, Src, Size: Longint); procedure HMemCpy(DstPtr, SrcPtr: Pointer; Amount: Longint); function WindowClassName(Wnd: THandle): string; procedure SwitchToWindow(Wnd: THandle; Restore: Boolean); procedure ActivateWindow(Wnd: THandle); procedure ShowWinNoAnimate(Handle: THandle; CmdShow: Int); procedure KillMessage(Wnd: THandle; Msg: Cardinal); { SetWindowTop put window to top without recreating window } procedure SetWindowTop(const Handle: THandle; const Top: Boolean); procedure CenterWindow(Wnd: THandle); function MakeVariant(const Values: array of Variant): Variant; { Convert dialog units to pixels and backwards } {$IFDEF MSWINDOWS} function DialogUnitsToPixelsX(DlgUnits: Word): Word; function DialogUnitsToPixelsY(DlgUnits: Word): Word; function PixelsToDialogUnitsX(PixUnits: Word): Word; function PixelsToDialogUnitsY(PixUnits: Word): Word; {$ENDIF MSWINDOWS} function GetUniqueFileNameInDir(const Path, FileNameMask: string): string; {$IFDEF BCB} function FindPrevInstance(const MainFormClass: ShortString;const ATitle: string): THandle; function ActivatePrevInstance(const MainFormClass: ShortString;const ATitle: string): Boolean; {$ELSE} function FindPrevInstance(const MainFormClass, ATitle: string): THandle; function ActivatePrevInstance(const MainFormClass, ATitle: string): Boolean; {$ENDIF BCB} {$IFDEF MSWINDOWS} { BrowseForFolderNative displays Browse For Folder dialog } function BrowseForFolderNative(const Handle: THandle; const Title: string; var Folder: string): Boolean; {$ENDIF MSWINDOWS} procedure AntiAlias(Clip: TBitmap); procedure AntiAliasRect(Clip: TBitmap; XOrigin, YOrigin,XFinal, YFinal: Int); procedure CopyRectDIBits(ACanvas: TCanvas; const DestRect: TRect; ABitmap: TBitmap; const SourceRect: TRect); function IsTrueType(const FontName: string): Boolean; // Removes all non-numeric characters from AValue and returns the resulting string function TextToValText(const AValue: string): string; Function ExecRegExpr( const ARegExpr, AInputStr : RegExprString) : boolean Procedure SplitRegExpr( const ARegExpr, AInputStr : RegExprString; APieces : TStrings) Function ReplaceRegExpr(const ARegExpr,AInputStr,AReplaceStr:RegExprString;AUseSubstitution:bool):RegExprString; Function QuoteRegExprMetaChars( const AStr : RegExprString) : RegExprString Function RegExprSubExpressions(const ARegExpr:string;ASubExprs:TStrings;AExtendedSyntax:bool): *********************************************************unit uPSI_JvTFUtils; Function JExtractYear( ADate : TDateTime) : Word Function JExtractMonth( ADate : TDateTime) : Word Function JExtractDay( ADate : TDateTime) : Word Function ExtractHours( ATime : TDateTime) : Word Function ExtractMins( ATime : TDateTime) : Word Function ExtractSecs( ATime : TDateTime) : Word Function ExtractMSecs( ATime : TDateTime) : Word Function FirstOfMonth( ADate : TDateTime) : TDateTime Function GetDayOfNthDOW( Year, Month, DOW, N : Word) : Word Function GetWeeksInMonth( Year, Month : Word; StartOfWeek : Int) : Word Procedure IncBorlDOW( var BorlDOW : Int; N : Int) Procedure IncDOW( var DOW : TTFDayOfWeek; N : Int) Procedure IncDays( var ADate : TDateTime; N : Int) Procedure IncWeeks( var ADate : TDateTime; N : Int) Procedure IncMonths( var ADate : TDateTime; N : Int) Procedure IncYears( var ADate : TDateTime; N : Int) Function EndOfMonth( ADate : TDateTime) : TDateTime Function IsFirstOfMonth( ADate : TDateTime) : Boolean Function IsEndOfMonth( ADate : TDateTime) : Boolean Procedure EnsureMonth( Month : Word) Procedure EnsureDOW( DOW : Word) Function EqualDates( D1, D2 : TDateTime) : Boolean Function Lesser( N1, N2 : Int) : Int Function Greater( N1, N2 : Int) : Int Function GetDivLength( TotalLength, DivCount, DivNum : Int) : Int Function GetDivNum( TotalLength, DivCount, X : Int) : Int Function GetDivStart( TotalLength, DivCount, DivNum : Int) : Int Function DOWToBorl( ADOW : TTFDayOfWeek) : Int Function BorlToDOW( BorlDOW : Int) : TTFDayOfWeek Function DateToDOW( ADate : TDateTime) : TTFDayOfWeek Procedure CalcTextPos(HostRect:TRect;var TextLeft,TextTop:Int;var TextBounds:TRect;AFont:TFont;AAngle:Int;HAlign:TAlignment;VAlign:TJvTFVAlignment;ATxt:string) Procedure DrawAngleText(ACanvas:TCanvas;HostRect:TRect;var TextBounds:TRect;AAngle:Int;HAlign: TAlignment;VAlign:TJvTFVAlignment;ATxt:string) Function JRectWidth( ARect : TRect) : Int Function JRectHeight( ARect : TRect): Int Function JEmptyRect : TRect Function IsClassByName( Obj : TObject; ClassName : string): Boolean procedure SIRegister_MSysUtils(CL: TPSPascalCompiler); begin Procedure HideTaskBarButton( hWindow : HWND) Function msLoadStr( ID : Int) : String Function msFormat( fmt : String; params : array of const) : String Function msFileExists( const FileName : String) : Boolean Function msIntToStr( Int : Int64) : String Function msStrPas( const Str : PChar) : String Function msRenameFile( const OldName, NewName : String) : Boolean Function CutFileName( s : String) : String Function GetVersionInfo( var VersionString : String) : DWORD Function FormatTime( t : Cardinal) : String Function msCreateDir( const Dir : string) : Boolean Function SetAutoRun( NeedAutoRun : Boolean; AppName : String) : Boolean Function SetTreeViewStyle( const hTV : HWND; dwNewStyle : dword) : DWORD Function msStrLen( Str : PChar) : Int Function msDirectoryExists( const Directory : String) : Boolean Function GetFolder( hWnd : hWnd; RootDir : Int; Caption : String) : String Function SetBlendWindow( hWnd : HWND; AlphaBlend : Byte) : LongBool Function EditWindowProc( hWnd : HWND; Msg : UINT; wParam : WPARAM; lParam : LPARAM): LRESULT Procedure SetEditWndProc( hWnd : HWND; ptr : TObject) Function GetTextFromFile( Filename : String) : string Function IsTopMost( hWnd : HWND) : Bool // 'LWA_ALPHA','LongWord').SetUInt( $00000002); Function msStrToIntDef( const s : String; const i : Int) : Int Function msStrToInt( s : String) : Int Function GetItemText( hDlg : THandle; ID : DWORD) : String end; procedure SIRegister_ESBMaths2(CL: TPSPascalCompiler); begin //TDynFloatArray', 'array of Extended TDynLWordArray', 'array of LongWord TDynLIntArray', 'array of LongInt TDynFloatMatrix', 'array of TDynFloatArray TDynLWordMatrix', 'array of TDynLWordArray TDynLIntMatrix', 'array of TDynLIntArray Function SquareAll( const X : TDynFloatArray) : TDynFloatArray Function InverseAll( const X : TDynFloatArray) : TDynFloatArray Function LnAll( const X : TDynFloatArray) : TDynFloatArray Function Log10All( const X : TDynFloatArray) : TDynFloatArray Function LinearTransform( const X : TDynFloatArray; Offset, Scale : Extended) : TDynFloatArray Function AddVectors( const X, Y : TDynFloatArray) : TDynFloatArray Function SubVectors( const X, Y : TDynFloatArray) : TDynFloatArray Function MultVectors( const X, Y : TDynFloatArray) : TDynFloatArray Function DotProduct( const X, Y : TDynFloatArray) : Extended Function MNorm( const X : TDynFloatArray) : Extended Function MatrixIsRectangular( const X : TDynFloatMatrix) : Boolean Procedure MatrixDimensions(const X:TDynFloatMatrix;var Rows,Columns:LongWord;var Rectangular:Boolean; Function MatrixIsSquare( const X : TDynFloatMatrix) : Boolean Function MatricesSameDimensions( const X, Y : TDynFloatMatrix) : Boolean Function AddMatrices( const X, Y : TDynFloatMatrix) : TDynFloatMatrix Procedure AddToMatrix( var X : TDynFloatMatrix; const Y : TDynFloatMatrix) Function SubtractMatrices( const X, Y : TDynFloatMatrix) : TDynFloatMatrix Procedure SubtractFromMatrix( var X : TDynFloatMatrix; const Y : TDynFloatMatrix) Function MultiplyMatrixByConst( const X : TDynFloatMatrix; const K : Extended) : TDynFloatMatrix Procedure MultiplyMatrixByConst2( var X : TDynFloatMatrix; const K : Extended); Function MultiplyMatrices( const X, Y : TDynFloatMatrix) : TDynFloatMatrix; Function TransposeMatrix( const X : TDynFloatMatrix) : TDynFloatMatrix; Function GrandMean( const X : TDynFloatMatrix; var N : LongWord) : Extended end; procedure SIRegister_ESBMaths(CL: TPSPascalCompiler); begin 'ESBMinSingle','Single').setExtended( 1.5e-45); 'ESBMaxSingle','Single').setExtended( 3.4e+38); 'ESBMinDouble','Double').setExtended( 5.0e-324); 'ESBMaxDouble','Double').setExtended( 1.7e+308); 'ESBMinExtended','Extended').setExtended( 3.6e-4951); 'ESBMaxExtended','Extended').setExtended( 1.1e+4932); 'ESBMinCurrency','Currency').SetExtended( - 922337203685477.5807); 'ESBMaxCurrency','Currency').SetExtended( 922337203685477.5807); 'ESBSqrt2','Extended').setExtended( 1.4142135623730950488); 'ESBSqrt3','Extended').setExtended( 1.7320508075688772935); 'ESBSqrt5','Extended').setExtended( 2.2360679774997896964); 'ESBSqrt10','Extended').setExtended( 3.1622776601683793320); 'ESBSqrtPi','Extended').setExtended( 1.77245385090551602729); 'ESBCbrt2','Extended').setExtended( 1.2599210498948731648); 'ESBCbrt3','Extended').setExtended( 1.4422495703074083823); 'ESBCbrt10','Extended').setExtended( 2.1544346900318837219); 'ESBCbrt100','Extended').setExtended( 4.6415888336127788924); 'ESBCbrtPi','Extended').setExtended( 1.4645918875615232630); 'ESBInvSqrt2','Extended').setExtended( 0.70710678118654752440); 'ESBInvSqrt3','Extended').setExtended( 0.57735026918962576451); 'ESBInvSqrt5','Extended').setExtended( 0.44721359549995793928); 'ESBInvSqrtPi','Extended').setExtended( 0.56418958354775628695); 'ESBInvCbrtPi','Extended').setExtended( 0.68278406325529568147); 'ESBe','Extended').setExtended( 2.7182818284590452354); 'ESBe2','Extended').setExtended( 7.3890560989306502272); 'ESBePi','Extended').setExtended( 23.140692632779269006); 'ESBePiOn2','Extended').setExtended( 4.8104773809653516555); 'ESBePiOn4','Extended').setExtended( 2.1932800507380154566); 'ESBLn2','Extended').setExtended( 0.69314718055994530942); 'ESBLn10','Extended').setExtended( 2.30258509299404568402); 'ESBLnPi','Extended').setExtended( 1.14472988584940017414); 'ESBLog10Base2','Extended').setExtended( 3.3219280948873623478); 'ESBLog2Base10','Extended').setExtended( 0.30102999566398119521); 'ESBLog3Base10','Extended').setExtended( 0.47712125471966243730); 'ESBLogPiBase10','Extended').setExtended( 0.4971498726941339); 'ESBLogEBase10','Extended').setExtended( 0.43429448190325182765); 'ESBPi','Extended').setExtended( 3.1415926535897932385); 'ESBInvPi','Extended').setExtended( 3.1830988618379067154e-1); 'ESBTwoPi','Extended').setExtended( 6.2831853071795864769); 'ESBThreePi','Extended').setExtended( 9.4247779607693797153); 'ESBPi2','Extended').setExtended( 9.8696044010893586188); 'ESBPiToE','Extended').setExtended( 22.459157718361045473); 'ESBPiOn2','Extended').setExtended( 1.5707963267948966192); 'ESBPiOn3','Extended').setExtended( 1.0471975511965977462); 'ESBPiOn4','Extended').setExtended( 0.7853981633974483096); 'ESBThreePiOn2','Extended').setExtended( 4.7123889803846898577); 'ESBFourPiOn3','Extended').setExtended( 4.1887902047863909846); 'ESBTwoToPower63','Extended').setExtended( 9223372036854775808.0); 'ESBOneRadian','Extended').setExtended( 57.295779513082320877); 'ESBOneDegree','Extended').setExtended( 1.7453292519943295769E-2); 'ESBOneMinute','Extended').setExtended( 2.9088820866572159615E-4); 'ESBOneSecond','Extended').setExtended( 4.8481368110953599359E-6); 'ESBGamma','Extended').setExtended( 0.57721566490153286061); 'ESBLnRt2Pi','Extended').setExtended( 9.189385332046727E-1); //LongWord', 'Cardinal TBitList', 'Word Function UMul( const Num1, Num2 : LongWord) : LongWord Function UMulDiv2p32( const Num1, Num2 : LongWord) : LongWord Function UMulDiv( const Num1, Num2, Divisor : LongWord) : LongWord Function UMulMod( const Num1, Num2, Modulus : LongWord) : LongWord Function SameFloat( const X1, X2 : Extended) : Boolean Function FloatIsZero( const X : Extended) : Boolean Function FloatIsPositive( const X : Extended) : Boolean Function FloatIsNegative( const X : Extended) : Boolean Procedure IncLim( var B : Byte; const Limit : Byte) Procedure IncLimSI( var B : ShortInt; const Limit : ShortInt) Procedure IncLimW( var B : Word; const Limit : Word) Procedure IncLimI( var B : Int; const Limit : Int) Procedure IncLimL( var B : LongInt; const Limit : LongInt) Procedure DecLim( var B : Byte; const Limit : Byte) Procedure DecLimSI( var B : ShortInt; const Limit : ShortInt) Procedure DecLimW( var B : Word; const Limit : Word) Procedure DecLimI( var B : Int; const Limit : Int) Procedure DecLimL( var B : LongInt; const Limit : LongInt) Function MaxB( const B1, B2 : Byte) : Byte Function MinB( const B1, B2 : Byte) : Byte Function MaxSI( const B1, B2 : ShortInt) : ShortInt Function MinSI( const B1, B2 : ShortInt) : ShortInt Function MaxW( const B1, B2 : Word) : Word Function MinW( const B1, B2 : Word) : Word Function esbMaxI( const B1, B2 : Int) : Int Function esbMinI( const B1, B2 : Int) : Int Function MaxL( const B1, B2 : LongInt) : LongInt Function MinL( const B1, B2 : LongInt) : LongInt Procedure SwapB( var B1, B2 : Byte) Procedure SwapSI( var B1, B2 : ShortInt) Procedure SwapW( var B1, B2 : Word) Procedure SwapI( var B1, B2 : SmallInt) Procedure SwapL( var B1, B2 : LongInt) Procedure SwapI32( var B1, B2 : Int) Procedure SwapC( var B1, B2 : LongWord) Procedure SwapInt64( var X, Y : Int64) Function esbSign( const B : LongInt) : ShortInt Function Max4Word( const X1, X2, X3, X4 : Word) : Word Function Min4Word( const X1, X2, X3, X4 : Word) : Word Function Max3Word( const X1, X2, X3 : Word) : Word Function Min3Word( const X1, X2, X3 : Word) : Word Function MaxBArray( const B : array of Byte) : Byte Function MaxWArray( const B : array of Word) : Word Function MaxSIArray( const B : array of ShortInt) : ShortInt Function MaxIArray( const B : array of Int) : Int Function MaxLArray( const B : array of LongInt) : LongInt Function MinBArray( const B : array of Byte) : Byte Function MinWArray( const B : array of Word) : Word Function MinSIArray( const B : array of ShortInt) : ShortInt Function MinIArray( const B : array of Int) : Int Function MinLArray( const B : array of LongInt) : LongInt Function SumBArray( const B : array of Byte) : Byte Function SumBArray2( const B : array of Byte) : Word Function SumSIArray( const B : array of ShortInt) : ShortInt Function SumSIArray2( const B : array of ShortInt) : Int Function SumWArray( const B : array of Word) : Word Function SumWArray2( const B : array of Word) : LongInt Function SumIArray( const B : array of Int) : Int Function SumLArray( const B : array of LongInt) : LongInt Function SumLWArray( const B : array of LongWord) : LongWord Function ESBDigits( const X : LongWord) : Byte Function BitsHighest( const X : LongWord) : Int Function ESBBitsNeeded( const X : LongWord) : Int Function esbGCD( const X, Y : LongWord) : LongWord Function esbLCM( const X, Y : LongInt) : Int64 //Function esbLCM( const X, Y : LongInt) : LongInt Function RelativePrime( const X, Y : LongWord) : Boolean Function Get87ControlWord : TBitList Procedure Set87ControlWord( const CWord : TBitList) Procedure SwapExt( var X, Y : Extended) Procedure SwapDbl( var X, Y : Double) Procedure SwapSing( var X, Y : Single) Function esbSgn( const X : Extended) : ShortInt Function Distance( const X1, Y1, X2, Y2 : Extended) : Extended Function ExtMod( const X, Y : Extended) : Extended Function ExtRem( const X, Y : Extended) : Extended Function CompMOD( const X, Y : Comp) : Comp Procedure Polar2XY( const Rho, Theta : Extended; var X, Y : Extended) Procedure XY2Polar( const X, Y : Extended; var Rho, Theta : Extended) Function DMS2Extended( const Degs, Mins, Secs : Extended) : Extended Procedure Extended2DMS( const X : Extended; var Degs, Mins, Secs : Extended) Function MaxExt( const X, Y : Extended) : Extended Function MinExt( const X, Y : Extended) : Extended Function MaxEArray( const B : array of Extended) : Extended Function MinEArray( const B : array of Extended) : Extended Function MaxSArray( const B : array of Single) : Single Function MinSArray( const B : array of Single) : Single Function MaxCArray( const B : array of Comp) : Comp Function MinCArray( const B : array of Comp) : Comp Function SumSArray( const B : array of Single) : Single Function SumEArray( const B : array of Extended) : Extended Function SumSqEArray( const B : array of Extended) : Extended Function SumSqDiffEArray( const B : array of Extended; Diff : Extended): Extended Function SumXYEArray( const X, Y : array of Extended) : Extended Function SumCArray( const B : array of Comp) : Comp Function FactorialX( A : LongWord) : Extended Function PermutationX( N, R : LongWord) : Extended Function esbBinomialCoeff( N, R : LongWord) : Extended Function IsPositiveEArray( const X : array of Extended) : Boolean Function esbGeometricMean( const X : array of Extended) : Extended Function esbHarmonicMean( const X : array of Extended) : Extended Function ESBMean( const X : array of Extended) : Extended Function esbSampleVariance( const X : array of Extended) : Extended Function esbPopulationVariance( const X : array of Extended) : Extended Procedure esbSampleVarianceAndMean(const X: array of Extended; var Variance, Mean : Extended) Procedure esbPopulationVarianceAndMean( const X : array of Extended; var Variance, Mean: Extended) Function GetMedian( const SortedX : array of Extended) : Extended Function GetMode( const SortedX : array of Extended; var Mode : Extended) : Boolean Procedure GetQuartiles( const SortedX : array of Extended; var Q1, Q3 : Extended) Function ESBMagnitude( const X : Extended) : Int Function ESBTan( Angle : Extended) : Extended Function ESBCot( Angle : Extended) : Extended Function ESBCosec( const Angle : Extended) : Extended Function ESBSec( const Angle : Extended) : Extended Function ESBArcTan( X, Y : Extended) : Extended Procedure ESBSinCos( Angle : Extended; var SinX, CosX : Extended) Function ESBArcCos( const X : Extended) : Extended Function ESBArcSin( const X : Extended) : Extended Function ESBArcSec( const X : Extended) : Extended Function ESBArcCosec( const X : Extended) : Extended Function ESBLog10( const X : Extended) : Extended Function ESBLog2( const X : Extended) : Extended Function ESBLogBase( const X, Base : Extended) : Extended Function Pow2( const X : Extended) : Extended Function IntPow( const Base : Extended; const Exponent : LongWord) : Extended Function ESBIntPower( const X : Extended; const N : LongInt) : Extended Function XtoY( const X, Y : Extended) : Extended Function esbTenToY( const Y : Extended) : Extended Function esbTwoToY( const Y : Extended) : Extended Function LogXtoBaseY( const X, Y : Extended) : Extended Function esbISqrt( const I : LongWord) : Longword Function ILog2( const I : LongWord) : LongWord Function IGreatestPowerOf2( const N : LongWord) : LongWord Function ESBArCosh( X : Extended) : Extended Function ESBArSinh( X : Extended) : Extended Function ESBArTanh( X : Extended) : Extended Function ESBCosh( X : Extended) : Extended Function ESBSinh( X : Extended) : Extended Function ESBTanh( X : Extended) : Extended Function InverseGamma( const X : Extended) : Extended Function esbGamma( const X : Extended) : Extended Function esbLnGamma( const X : Extended) : Extended Function esbBeta( const X, Y : Extended) : Extended Function IncompleteBeta( X : Extended; P, Q : Extended) : Extended end; ********************************Int Huge Cardinal Utils*************************** Function Add_uint64_WithCarry( x, y : uint64; var Carry : Boolean) : uint64 Function Add_uint32_WithCarry( x, y : uint32; var Carry : Boolean) : uint32 Function Subtract_uint64_WithBorrow( x, y : uint64; var Borrow : Boolean) : uint64 Function Subtract_uint32_WithBorrow( x, y : uint32; var Borrow : Boolean) : uint32 Function BitCount_8( Value : byte) : Int Function BitCount_16( Value : uint16) : Int Function BitCount_32( Value : uint32) : Int Function BitCount_64( Value : uint64) : Int Function CountSetBits_64( Value : uint64) : Int TPrimalityTestNoticeProc', Procedure ( CountPrimalityTests : Int) Function gcdhuge( a, b : THugeCardinal) : THugeCardinal Function lcmhuge( a, b : THugeCardinal) : THugeCardinal Function isCoPrime( a, b : THugeCardinal) : boolean Function isProbablyPrime(p: THugeCardinal;OnProgress: TProgress; var wasAborted: boolean): boolean Function hasSmallFactor( p : THugeCardinal) : boolean Function GeneratePrime( NumBits : Int; OnProgress : TProgress; OnPrimalityTest: TPrimalityTestNoticeProc; PassCount: Int; Pool1:TMemoryStreamPool;var Prime: THugeCardinal; var NumbersTested: Int) : boolean Function Inverse( Prime, Modulus : THugeCardinal) : THugeCardinal Const('StandardExponent','LongInt'( 65537); Procedure Compute_RSA_Fundamentals_2Factors(RequiredBitLengthOfN:Int;Fixed_e:uint64;var N,e,d,Totient:TProgress;OnPrimalityTest:TPrimalityTestNoticeProc;GeneratePrimePassCount:int;Pool1:TMemoryStreamPool;var Numbers Function Validate_RSA_Fundamentals( var N, e, d, Totient : THugeCardinal) : boolean') function AnsiBytesOf(const S: string): TBytes;'); function GetBytes(value: string): TBytes;'); function GetBytesInt(value: Smallint): TBytes;'); function HugeToBase10(const AHuge: THugeCardinal): string; (*----------------------------------------------------------------------------*) procedure SIRegister_uTPLb_StreamUtils(CL: TPSPascalCompiler); begin SIRegister_TDesalinationWriteStream(CL); // CL.AddTypeS('TByteDynArray', 'array of Byte'); Function CloneMemoryStream( Original : TMemoryStream) : TMemoryStream'); Procedure CopyMemoryStream( Source, Destination : TMemoryStream)'); Procedure BurnMemoryStream( Destructo : TMemoryStream)'); Procedure BurnMemory( var Buff, BuffLen : integer)'); Procedure BurnMemoryString( var Buff: string; BuffLen : integer)'); Procedure BurnMemoryInteger( var Buff: Integer; BuffLen : integer)'); Procedure BurnMemoryString2( Buff: string; BuffLen : integer)'); Procedure BurnMemoryInteger2( Buff: Integer; BuffLen : integer)'); ('Procedure BurnMemoryByteArray( var array of Byte; BuffLen : integer)'); Procedure BurnMemoryByteArray2( var buff: TByteDynArray; BuffLen : integer)'); Procedure BurnMemoryByteArray3( buff: TByteDynArray; BuffLen : integer)'); Procedure ZeroFillStream( Stream : TMemoryStream)'); Procedure RandomFillStream( Stream : TMemoryStream)'); Procedure XOR_Streams2( Dest, Srce : TMemoryStream)'); Procedure XOR_Streams3( Dest, SrceA, SrceB : TMemoryStream)'); Function CompareMemoryStreams( S1, S2 : TMemoryStream) : boolean'); Function Stream_to_Base64( Source : TStream) : ansistring'); Function Stream_to_Base642( Source : TStream) : ansistring'); Procedure Base64_to_stream2( const Base64 : ansistring; Destin : TStream)'); Function Stream_to_AnsiString( Source : TStream) : ansistring'); Function StreamtoAnsiString( Source : TStream) : ansistring'); Function StreamToString( Source : TStream) : string'); Function StreamToString2( Source : TStream) : string'); Function StreamToString3( Source : TStream) : string'); Function StreamToString4( Source : TStream) : string'); AnsiString_to_stream( const Value : ansistring; Destin : TStream)'); Function CompareFiles( const FN1, FN2 : string; Breathe : TNotifyEvent; BreathingSender : TObject) : boolean'); Function FileSize( const FileName : string) : int64'); Function Stream_to_decimalbytes( Source : TStream) : string'); Function StreamToDecimalbytes( Source : TStream) : string'); Function StreamtoOrd( Source : TStream) : string'); Function StreamToByte( Source : TStream) : string'); Function DisplayStream( Stream : TStream) : string'); procedure Base64_to_streamBytes( const Base64: TBytes; Destin: TStream);'); function Stream_to_Base64Bytes(ASource: TStream; const ATransform: TBytes): TBytes;'); function Stream_To_Hex(ASource: TStream): Ansistring;'); // from unit uPSI_uTPLb_PointerArithmetic; Procedure ClearMemory( Stream : TMemoryStream; Offset, CountBytes : integer)'); Function ReadMem( Source : TStream; Destin : TMemoryStream; DestinOffset, CountBytes : integer) : integer'); Function WriteMem(Source:TMemoryStream; SourceOffset:integer;Destin:TStream; CountBytes: integer):integer'); end; procedure SIRegister_EwbCoreTools(CL: TPSPascalCompiler); begin //CL.AddDelphiFunction('Function IsWinXPSP2OrLater( ) : Boolean'); Function ColorToHTML2( const Color : TColor) : string'); //CL.AddDelphiFunction('Function WideStringToLPOLESTR( const Source : Widestring) : POleStr'); //CL.AddDelphiFunction('Function XPath4Node( node : IHTMLElement) : string'); //CL.AddDelphiFunction('Function TaskAllocWideString( const S : string) : PWChar'); Function AnsiIndexStr2( const AText : string; const AValues : array of string) : Integer'); Function GetPos( const SubSt, Text : string; StartPos : Integer) : Integer'); Function _CharPos( const C : Char; const S : string) : Integer'); Function CutString( var Text : string; const Delimiter : string; const Remove : Boolean) : string'); Procedure FormatPath( Path : string)'); Function GetWinText( WinHandle : THandle) : string'); Function GetWinClass( Handle : Hwnd) : WideString'); Function GetParentWinByClass( ChildHandle : HWND; const ClassName : string) : HWND'); Function DirectoryExists2( const Directory : string) : Boolean'); //CL.AddDelphiFunction('Function VarSupports( const V : Variant; const IID : TGUID; out Intf) : Boolean'); Function CharInSet3( C : Char; const CharSet : TSysCharSet) : Boolean'); Function AddBackSlash2( const S : string) : string'); CL.AddConstantN('WM_SETWBFOCUS','LongWord').SetUInt( $0400 + $44); end; procedure SIRegister_EwbUrl(CL: TPSPascalCompiler); begin 'TEMP_SIZE_EWB','LongInt').SetInt( 1024); 'MAX_BUFFER_EWB','LongInt').SetInt( 256); 'WebDelim_EWB','String').SetString( '/'); 'ProtocolDelim_EWB','String').SetString( '://'); 'QueryDelim_EWB','String').SetString( '?'); 'BookmarkDelim_EWB','String').SetString( '#'); 'EqualDelim_EWB','String').SetString( '='); 'DriveDelim_EWB','String').SetString( ':'); CL.AddTypeS('TQueryOption_EWB', 'ULONG'); CL.AddTypeS('TOnError_EWB', 'Procedure ( Sender : TObject; ErrorCode : integer; ErrMessage : string)'); SIRegister_TUrl(CL); end; function IS_INTRESOURCE(lpszType: PChar): BOOL; //as of windows.pas begin Result := ULONG_PTR(lpszType) shr 16 = 0; end; function ResourceNameToString(lpszName: PChar): string; function ResourceTypeToString(lpszType: PChar): string; procedure storeRCDATAResourcetofile(aresname, afilename: string); Function InternalfindNextUrlToDownload(aNode: TPageNotYetDownloadedBinTreeNode; '+ alowDeepLevel: Integer): TPageNotYetDownloadedBinTreeNode;'); //ALWebSpider procedure SIRegister_xrtl_math_Int(CL: TPSPascalCompiler); begin AddTypeS('TXRTLInt', 'array of Int AddClassN(FindClass('TOBJECT'),'EXRTLMathException (FindClass('TOBJECT'),'EXRTLExtendInvalidArgument AddClassN(FindClass('TOBJECT'),'EXRTLDivisionByZero AddClassN(FindClass('TOBJECT'),'EXRTLExpInvalidArgument AddClassN(FindClass('TOBJECT'),'EXRTLInvalidRadix AddClassN(FindClass('TOBJECT'),'EXRTLInvalidRadixDigit AddClassN(FindClass('TOBJECT'),'EXRTLRootInvalidArgument 'BitsPerByte','LongInt'( 8); BitsPerDigit','LongInt'( 32); SignBitMask','LongWord( $80000000); Function XRTLAdjustBits( const ABits : Int) : Int Function XRTLLength( const AInt : TXRTLInt) : Int Function XRTLDataBits( const AInt : TXRTLInt) : Int Procedure XRTLBitPosition( const BitIndex : Int; var Index, Mask : Int) Procedure XRTLBitSet( var AInt : TXRTLInt; const BitIndex : Int) Procedure XRTLBitReset( var AInt : TXRTLInt; const BitIndex : Int) Function XRTLBitGet( const AInt : TXRTLInt; const BitIndex : Int) : Int Function XRTLBitGetBool( const AInt : TXRTLInt; const BitIndex : Int) : Boolean Function XRTLExtend(const AInt:TXRTLInt;ADataBits:Int;Sign:Int;var AResult:TXRTLInt):Int; Function XRTLZeroExtend(const AInt:TXRTLInt;ADataBits:Int; var AResult:TXRTLInt):Int; Function XRTLSignExtend(const AInt:TXRTLInt; ADataBits:Int;var AResult:TXRTLInt):Int; Function XRTLSignStrip(const AInt:TXRTLInt;var AResult:TXRTLInt;const AMinDataBits:Int):Int; Procedure XRTLNot( const AInt : TXRTLInt; var AResult : TXRTLInt) Procedure XRTLOr( const AInt1, AInt2 : TXRTLInt; var AResult : TXRTLInt) Procedure XRTLAnd( const AInt1, AInt2 : TXRTLInt; var AResult : TXRTLInt) Procedure XRTLXor( const AInt1, AInt2 : TXRTLInt; var AResult : TXRTLInt) Function XRTLSign( const AInt : TXRTLInt) : Int Procedure XRTLZero( var AInt : TXRTLInt) Procedure XRTLOne( var AInt : TXRTLInt) Procedure XRTLMOne( var AInt : TXRTLInt) Procedure XRTLTwo( var AInt : TXRTLInt) Function XRTLNeg( const AInt : TXRTLInt; var AResult : TXRTLInt) : Int Function XRTLAbs( const AInt : TXRTLInt; var AResult : TXRTLInt) : Int Procedure XRTLFullSum( const A, B, C : Int; var Sum, Carry : Int) Function XRTLAdd( const AInt1, AInt2 : TXRTLInt; var AResult : TXRTLInt) : Int; Function XRTLAdd1(const AInt1:TXRTLInt;const AInt2:Int64;var AResult:TXRTLInt):Int; Function XRTLSub( const AInt1, AInt2 : TXRTLInt; var AResult : TXRTLInt) : Int; Function XRTLSub1( const AInt1:TXRTLInt;const AInt2:Int64;var AResult:TXRTLInt):Int; Function XRTLCompare( const AInt1, AInt2 : TXRTLInt) : Int; Function XRTLCompare1( const AInt1 : TXRTLInt; const AInt2 : Int64) : Int; Function XRTLUMul( const AInt1, AInt2 : TXRTLInt; var AResult : TXRTLInt) : Int Function XRTLMulAdd(const AInt1,AInt2,AInt3:TXRTLInt; var AResult:TXRTLInt):Int Function XRTLMul( const AInt1, AInt2 : TXRTLInt; var AResult : TXRTLInt) : Int Procedure XRTLDivMod( const AInt1, AInt2 : TXRTLInt; var QResult, RResult : TXRTLInt) Procedure XRTLSqr( const AInt : TXRTLInt; var AResult : TXRTLInt) Procedure XRTLSqrt( const AInt : TXRTLInt; var AResult : TXRTLInt) Procedure XRTLRoot( const AInt1, AInt2 : TXRTLInt; var AResult : TXRTLInt) Procedure XRTLRootApprox(const AInt1,AInt2:TXRTLInt;var ALowApproxResult,AHighApproxResult:TXRTLInt) Procedure XRTLURootApprox(const AInt1,AInt2:TXRTLInt;var ALowApproxResult,AHighApproxResult:TXRTLInt); Procedure XRTLExp( const AInt1, AInt2 : TXRTLInt; var AResult : TXRTLInt) Procedure XRTLExpMod( const AInt1, AInt2, AInt3 : TXRTLInt;var AResult: TXRTLInt) Procedure XRTLSLBL(const AInt: TXRTLInt; const BitCount:Int; var AResult: TXRTLInt) Procedure XRTLSABL(const AInt: TXRTLInt; const BitCount:Int; var AResult: TXRTLInt) Procedure XRTLRCBL(const AInt: TXRTLInt; const BitCount:Int; var AResult: TXRTLInt) Procedure XRTLSLDL(const AInt:TXRTLInt;const DigitCount:Int; var AResult:TXRTLInt) Procedure XRTLSADL(const AInt: TXRTLInt; const DigitCount:Int;var AResult: TXRTLInt) Procedure XRTLRCDL(const AInt:TXRTLInt; const DigitCount:Int; var AResult: TXRTLInt) Procedure XRTLSLBR(const AInt: TXRTLInt; const BitCount:Int; var AResult: TXRTLInt) Procedure XRTLSABR(const AInt: TXRTLInt; const BitCount:Int; var AResult: TXRTLInt) Procedure XRTLRCBR(const AInt: TXRTLInt; const BitCount:Int; var AResult: TXRTLInt) Procedure XRTLSLDR(const AInt:TXRTLInt; const DigitCount:Int; var AResult: TXRTLInt) Procedure XRTLSADR(const AInt: TXRTLInt; const DigitCount:Int;var AResult: TXRTLInt) Procedure XRTLRCDR(const AInt: TXRTLInt;const DigitCount:Int;var AResult: TXRTLInt) Function XRTLToHex( const AInt : TXRTLInt; Digits : Int) : string Function XRTLToBin( const AInt : TXRTLInt; Digits : Int) : string Function XRTLToString( const AInt : TXRTLInt; Radix : Int; Digits : Int) : string Procedure XRTLFromHex( const Value : string; var AResult : TXRTLInt) Procedure XRTLFromBin( const Value : string; var AResult : TXRTLInt) Procedure XRTLFromString( const Value : string; var AResult : TXRTLInt; Radix : Int) Procedure XRTLAssign( const AInt : TXRTLInt; var AResult : TXRTLInt); Procedure XRTLAssign1( const Value : Int; var AResult : TXRTLInt); Procedure XRTLAssign2( const Value : Int64; var AResult : TXRTLInt); Procedure XRTLAppend( const ALow, AHigh : TXRTLInt; var AResult : TXRTLInt) Procedure XRTLSplit(const AInt: TXRTLInt; var ALow,AHigh: TXRTLInt;LowDigits: Int) Function XRTLGetMSBitIndex( const AInt : TXRTLInt) : Int Procedure XRTLMinMax(const AInt1, AInt2:TXRTLInt;var AMinResult,AMaxResult: TXRTLInt) Procedure XRTLMin( const AInt1, AInt2 : TXRTLInt; var AResult : TXRTLInt); Procedure XRTLMin1(const AInt1: TXRTLInt;const AInt2:Int;var AResult : TXRTLInt); Procedure XRTLMax( const AInt1, AInt2 : TXRTLInt; var AResult : TXRTLInt); Procedure XRTLMax1(const AInt1:TXRTLInt; const AInt2:Int; var AResult:TXRTLInt); Procedure XRTLGCD( const AInt1, AInt2 : TXRTLInt; var AResult : TXRTLInt) Procedure XRTLSwap( var AInt1, AInt2 : TXRTLInt) Procedure XRTLFactorial( const AInt : TXRTLInt; var AResult : TXRTLInt) Procedure XRTLFactorialMod( const AInt1, AInt2 : TXRTLInt; var AResult : TXRTLInt) end; procedure SIRegister_JvXPCoreUtils(CL: TPSPascalCompiler); begin Function JvXPMethodsEqual( const Method1, Method2 : TMethod) : Boolean Procedure JvXPDrawLine( const ACanvas : TCanvas; const X1, Y1, X2, Y2 : Int) Procedure JvXPCreateGradientRect( const AWidth, AHeight : Int; const StartColor, EndColor : TColor; const Colors:TJvXPGradientColors;const Style:TJvXPGradientStyle;const Dithered:Boolean;var Bitmap:TBitmap); Procedure JvXPAdjustBoundRect(const BorderWidth:Byte;const ShowBoundLines:Boolean; const BoundLines:TJvXPBoundLines; var Rect: TRect) Procedure JvXPDrawBoundLines(const ACan:TCanvas;const BoundLns:TJvXPBoundLins;const AColor:TColor;Rect:TRect; Procedure JvXPConvertToGray2( Bitmap : TBitmap) Procedure JvXPRenderText( const AParent : TControl; const ACanvas : TCanvas; ACaption : TCaption; const AFont : TFont; const AEnabled, AShowAccelChar : Boolean; var ARect : TRect; AFlags : Int) Procedure JvXPFrame3D(const ACanvas:TCanvas;const Rect:TRect; TopColor,BottomColor:TColor;const Swapped:Bool; Procedure JvXPColorizeBitmap( Bitmap : TBitmap; const AColor : TColor) Procedure JvXPSetDrawFlags(const AAlignment: TAlignment;const AWordWrap: Boolean; var Flags : Int) Procedure JvXPPlaceText( const AParent: TControl; const ACanvas : TCanvas; const AText : TCaption; const AFont : TFont; const AEnabled,AShowAccelChar:Boolean;const AAlignment:TAlignment;const AWordWrap:Boolean;var Rect:TRect) end; procedure SIRegister_uwinstr(CL: TPSPascalCompiler); begin Function StrDec( S : String) : String Function uIsNumeric( var S : String; var X : Float) : Boolean Function ReadNumFromEdit( Edit : TEdit) : Float Procedure WriteNumToFile( var F : Text; X : Float) end; procedure SIRegister_utexplot(CL: TPSPascalCompiler); begin Function TeX_InitGraphics( FileName : String; PgWidth, PgHeight : Int; Header : Boolean) : Boolean Procedure TeX_SetWindow( X1, X2, Y1, Y2 : Int; GraphBorder : Boolean) Procedure TeX_LeaveGraphics( Footer : Boolean) Procedure TeX_SetOxScale( Scale : TScale; OxMin, OxMax, OxStep : Float) Procedure TeX_SetOyScale( Scale : TScale; OyMin, OyMax, OyStep : Float) Procedure TeX_SetGraphTitle( Title : String) Procedure TeX_SetOxTitle( Title : String) Procedure TeX_SetOyTitle( Title : String) Procedure TeX_PlotOxAxis Procedure TeX_PlotOyAxis Procedure TeX_PlotGrid( Grid : TGrid) Procedure TeX_WriteGraphTitle Function TeX_SetMaxCurv( NCurv : Byte) : Boolean Procedure TeX_SetPointParam( CurvIndex, Symbol, Size : Int) Procedure TeX_SetLineParam( CurvIndex, Style : Int; Width : Float; Smooth : Boolean) Procedure TeX_SetCurvLegend( CurvIndex : Int; Legend : String) Procedure TeX_SetCurvStep( CurvIndex, Step : Int) Procedure TeX_PlotCurve( X, Y : TVector; Lb, Ub, CurvIndex : Int) Procedure TeX_PlotCurveWithErrorBars( X, Y, S : TVector; Ns, Lb, Ub, CurvIndex : Int) Procedure TeX_PlotFunc( Func : TFunc; X1, X2 : Float; Npt : Int; CurvIndex : Int) Procedure TeX_WriteLegend( NCurv : Int; ShowPoints, ShowLines : Boolean) Procedure TeX_ConRec( Nx, Ny, Nc : Int; X, Y, Z : TVector; F : TMatrix) Function Xcm( X : Float) : Float Function Ycm( Y : Float) : Float end; *----------------------------------------------------------------------------*) procedure SIRegister_VarRecUtils(CL: TPSPascalCompiler); begin TConstArray', 'array of TVarRec Function CopyVarRec( const Item : TVarRec) : TVarRec Function CreateConstArray( const Elements : array of const) : TConstArray Procedure FinalizeVarRec( var Item : TVarRec) Procedure FinalizeConstArray( var Arr : TConstArray) end; procedure SIRegister_StStrS(CL: TPSPascalCompiler); begin Function HexBS( B : Byte) : ShortString Function HexWS( W : Word) : ShortString Function HexLS( L : LongInt) : ShortString Function HexPtrS( P : Pointer) : ShortString Function BinaryBS( B : Byte) : ShortString Function BinaryWS( W : Word) : ShortString Function BinaryLS( L : LongInt) : ShortString Function OctalBS( B : Byte) : ShortString Function OctalWS( W : Word) : ShortString Function OctalLS( L : LongInt) : ShortString Function Str2Int16S( const S : ShortString; var I : SmallInt) : Boolean Function Str2WordS( const S : ShortString; var I : Word) : Boolean Function Str2LongS( const S : ShortString; var I : LongInt) : Boolean Function Str2RealS( const S : ShortString; var R : Double) : Boolean Function Str2RealS( const S : ShortString; var R : Real) : Boolean Function Str2ExtS( const S : ShortString; var R : Extended) : Boolean Function Long2StrS( L : LongInt) : ShortString Function Real2StrS( R : Double; Width : Byte; Places : ShortInt) : ShortString Function Ext2StrS( R : Extended; Width : Byte; Places : ShortInt) : ShortString Function ValPrepS( const S : ShortString) : ShortString Function CharStrS( C : AnsiChar; Len : Cardinal) : ShortString Function PadChS( const S : ShortString; C : AnsiChar; Len : Cardinal) : ShortString Function PadS( const S : ShortString; Len : Cardinal) : ShortString Function LeftPadChS( const S : ShortString; C : AnsiChar; Len : Cardinal) : ShortString Function LeftPadS( const S : ShortString; Len : Cardinal) : ShortString Function TrimLeadS( const S : ShortString) : ShortString Function TrimTrailS( const S : ShortString) : ShortString Function TrimS( const S : ShortString) : ShortString Function TrimSpacesS( const S : ShortString) : ShortString Function CenterChS( const S : ShortString; C : AnsiChar; Len : Cardinal) : ShortString Function CenterS( const S : ShortString; Len : Cardinal) : ShortString Function EntabS( const S : ShortString; TabSize : Byte) : ShortString Function DetabS( const S : ShortString; TabSize : Byte) : ShortString Function ScrambleS( const S, Key : ShortString) : ShortString Function SubstituteS( const S, FromStr, ToStr : ShortString) : ShortString Function FilterS( const S, Filters : ShortString) : ShortString Function CharExistsS( const S : ShortString; C : AnsiChar) : Boolean Function CharCountS( const S : ShortString; C : AnsiChar) : Byte Function WordCountS( const S, WordDelims : ShortString) : Cardinal Function WordPositionS( N : Cardinal; const S, WordDelims : ShortString; var Pos : Cardinal) : Boolean Function ExtractWordS( N : Cardinal; const S, WordDelims : ShortString) : ShortString Function AsciiCountS( const S, WordDelims : ShortString; Quote : AnsiChar) : Cardinal Function AsciiPositionS(N:Cardinal;const S,WordDelims:ShortString;Quote:AnsiChar;var Pos:Cardinal):Boolean Function ExtractAsciiS(N:Cardinal;const S,WordDelims:ShortString;Quote:AnsiChar): ShortString Procedure WordWrapS(const InSt:ShortString;var OutSt,Overlap:ShortString; Margin:Cardinal;PadToMargin:Boolean) Function CompStringS( const S1, S2 : ShortString) : Int Function CompUCStringS( const S1, S2 : ShortString) : Int Function SoundexS( const S : ShortString) : ShortString Function MakeLetterSetS( const S : ShortString) : Longint Procedure BMMakeTableS( const MatchString : ShortString; var BT : BTable) Function BMSearchS(var Buffer,BufLength:Card;var BT:BTable;const MatchString:ShortString;var Pos:Cardinal):Bool; Function BMSearchUCS(var Buffer,BufLength:Card;var BT:BTable;const MatchStr:ShortString;var Pos:Cardinal):Bool; Function DefaultExtensionS( const Name, Ext : ShortString) : ShortString Function ForceExtensionS( const Name, Ext : ShortString) : ShortString Function JustFilenameS( const PathName : ShortString) : ShortString Function JustNameS( const PathName : ShortString) : ShortString Function JustExtensionS( const Name : ShortString) : ShortString Function JustPathnameS( const PathName : ShortString) : ShortString Function AddBackSlashS( const DirName : ShortString) : ShortString Function CleanPathNameS( const PathName : ShortString) : ShortString Function HasExtensionS( const Name : ShortString; var DotPos : Cardinal) : Boolean Function CommaizeS( L : LongInt) : ShortString Function CommaizeChS( L : Longint; Ch : AnsiChar) : ShortString Function FloatFormS(const Mask:ShortString;R:TstFloat;const LtCurr,RtCurr:SString;Sep,DecPt:Char):ShortString; Function LongIntFormS(const Mask:ShortString;L:LongInt;const LtCurr,RtCurr:ShortString;Sep:AnsiChar):ShortString; Function StrChPosS( const P : ShortString; C : AnsiChar; var Pos : Cardinal) : Boolean Function StrStPosS( const P, S : ShortString; var Pos : Cardinal) : Boolean Function StrStCopyS( const S : ShortString; Pos, Count : Cardinal) : ShortString Function StrChInsertS( const S : ShortString; C : AnsiChar; Pos : Cardinal) : ShortString Function StrStInsertS( const S1, S2 : ShortString; Pos : Cardinal) : ShortString Function StrChDeleteS( const S : ShortString; Pos : Cardinal) : ShortString Function StrStDeleteS( const S : ShortString; Pos, Count : Cardinal) : ShortString Function ContainsOnlyS( const S, Chars : ShortString; var BadPos : Cardinal) : Boolean Function ContainsOtherThanS( const S, Chars : ShortString; var BadPos : Cardinal) : Boolean Function CopyLeftS( const S : ShortString; Len : Cardinal) : ShortString Function CopyMidS( const S : ShortString; First, Len : Cardinal) : ShortString Function CopyRightS( const S : ShortString; First : Cardinal) : ShortString Function CopyRightAbsS( const S : ShortString; NumChars : Cardinal) : ShortString Function CopyFromNthWordS(const S,WordDelims:string;const AWord:String;N:Card;var SubString:ShortString):Bool; Function DeleteFromNthWordS(const S,WordDelims:String;AWord:ShortString;N:Card;var SubStr:ShortString):Bool; Function CopyFromToWordS(const S,WordDelims,Word1,Word2:ShortString;N1,N2:Card;var SubString:ShortString):Bool; Function DeleteFromToWordS(const S,WordDelims,Wrd1,Wrd2:ShortString;N1,N2:Card;var SubString:ShortString):Bool; Function CopyWithinS( const S, Delimiter : ShortString; Strip : Boolean) : ShortString Function DeleteWithinS( const S, Delimiter : ShortString) : ShortString Function ExtractTokensS(const S,Delims:ShortString;QuoteChar:AnsiChar;AllowNulls:Boolean;Tokens:TStrings):Cardinal Function IsChAlphaS( C : Char) : Boolean Function IsChNumericS( C : Char; const Numbers : ShortString) : Boolean Function IsChAlphaNumericS( C : Char; const Numbers : ShortString) : Boolean Function IsStrAlphaS( const S : Shortstring) : Boolean Function IsStrNumericS( const S, Numbers : ShortString) : Boolean Function IsStrAlphaNumericS( const S, Numbers : ShortString) : Boolean Function LastWordS(const S,WordDelims, AWord:ShortString; var Position : Cardinal) : Boolean Function LastWordAbsS( const S, WordDelims : ShortString; var Position : Cardinal) : Boolean Function LastStringS( const S, AString : ShortString; var Position : Cardinal) : Boolean Function LeftTrimCharsS( const S, Chars : ShortString) : ShortString Function KeepCharsS( const S, Chars : ShortString) : ShortString Function RepeatStringS(const RepeatString:ShortString;var Repetitions: Cardinal; MaxLen : Cardinal):ShortString; Function ReplaceStringS(const S,OldStr,NewStr:ShortString;N:Cardinal;var Replacements:Cardinal):ShortString; Function ReplaceStringAllS(const S,OldString,NewString:ShortString;var Replacements:Cardinal):ShortString; Function ReplaceWordS(const S,WordDelims,OldWord,NewW:SString;N:Cardinal;var Replacements:Cardinal):ShortString Function ReplaceWordAllS(const S,WordDelims,OldWord,NewWord:ShortString;var Replacements:Cardinal):ShortString Function RightTrimCharsS( const S, Chars : ShortString) : ShortString Function StrWithinS(const S,SearchStr: ShortString;Start:Cardinal;var Position:Cardinal):bool Function TrimCharsS( const S, Chars : ShortString) : ShortString Function WordPosS(const S,WordDelims,AWord:ShortString;N:Cardinal; var Position: Cardinal):Boolean end; ********unit uPSI_StUtils; from Systools4********************************************************* Function SignL( L : LongInt) : Int Function SignF( F : Extended) : Int Function MinWord( A, B : Word) : Word Function MidWord( W1, W2, W3 : Word) : Word Function MaxWord( A, B : Word) : Word Function MinLong( A, B : LongInt) : LongInt Function MidLong( L1, L2, L3 : LongInt) : LongInt Function MaxLong( A, B : LongInt) : LongInt Function MinFloat( F1, F2 : Extended) : Extended Function MidFloat( F1, F2, F3 : Extended) : Extended Function MaxFloat( F1, F2 : Extended) : Extended Function MakeInt16( H, L : Byte) : SmallInt Function MakeWordS( H, L : Byte) : Word Function SwapNibble( B : Byte) : Byte Function SwapWord( L : LongInt) : LongInt Procedure SetFlag( var Flags : Word; FlagMask : Word) Procedure ClearFlag( var Flags : Word; FlagMask : Word) Function FlagIsSet( Flags, FlagMask : Word) : Boolean Procedure SetByteFlag( var Flags : Byte; FlagMask : Byte) Procedure ClearByteFlag( var Flags : Byte; FlagMask : Byte) Function ByteFlagIsSet( Flags, FlagMask : Byte) : Boolean Procedure SetLongFlag( var Flags : LongInt; FlagMask : LongInt) Procedure ClearLongFlag( var Flags : LongInt; FlagMask : LongInt) Function LongFlagIsSet( Flags, FlagMask : LongInt) : Boolean Procedure ExchangeBytes( var I, J : Byte) Procedure ExchangeWords( var I, J : Word) Procedure ExchangeLongInts( var I, J : LongInt) Procedure ExchangeStructs( var I, J, Size : Cardinal) Procedure FillWord( var Dest, Count : Cardinal; Filler : Word) Procedure FillStruct( var Dest, Count : Cardinal; var Filler, FillerSize : Cardinal) Function AddWordToPtr( P : ___Pointer; W : Word) : ___Pointer //******************uPSI_StFIN;********************************************************** Function AccruedInterestMaturity(Issue,Maturity:TStDate;Rate,Par:Extended;Basis: TStBasis): Extended Function AccruedInterestPeriodic(Issue,Settlement,Maturity:TStDate;Rate,Par:Extended;Frequency:TStFrequency; Basis : TStBasis): Extended Function BondDuration( Settlement,Maturity:TStDate;Rate,Yield:Ext;Frequency:TStFrequency;Basis:TStBasis):Extended; Function BondPrice(Settlement,Maturity:TStDate;Rate,Yield,Redempt:Ext;Freq:TStFrequency;Basis:TStBasis): Extended Function CumulativeInterest(Rate:Extended;NPeriods:Int;PV:Extended;StartPeriod,EndPeriod:Int;Frequency:TStFrequency; Timing:TStPaymentTime):Extended Function CumulativePrincipal(Rate: Extended;NPeriods:Int;PV:Extended;StartPeriod,EndPeriod:Int;Frequency:TStFrequency;Timing:TStPaymentTime):Extended Function DayCount( Day1, Day2 : TStDate; Basis : TStBasis) : LongInt Function DecliningBalance( Cost, Salvage : Extended; Life, Period, Month : Int) : Extended Function DiscountRate(Settlement,Maturity:TStDate; Price,Redemption:Extended;Basis:TStBasis): Extended; Function DollarToDecimal( FracDollar : Extended; Fraction : Int) : Extended Function DollarToDecimalText( DecDollar : Extended) : string Function DollarToFraction( DecDollar : Extended; Fraction : Int) : Extended Function DollarToFractionStr( FracDollar : Extended; Fraction : Int) : string Function EffectiveInterestRate( NominalRate : Extended; Frequency : TStFrequency) : Extended Function FutureValueS(Rate:Extended;NPeriods:Int;Pmt,PV:Extended;Freq:TStFreq;Timing:TStPaymentTime):Extended; Function FutureValueSchedule( Principal : Extended; const Schedule : array of Double) : Extended Function FutureValueSchedule16( Principal : Extended; const Schedule, NRates : Int) : Extended Function InterestRateS(NPeriods:Int;Pmt,PV,FV:Extended;Freq:TStFrequency;Timing:TStPaymentTime;Guess:Extended):Extend; Function InternalRateOfReturn( const Values : array of Double; Guess : Extended) : Extended Function InternalRateOfReturn16( const Values, NValues : Int; Guess : Extended) : Extended Function IsCardValid( const S : string) : Boolean Function ModifiedDuration(Settlement,Maturity:TStDate;Rate,Yield:Extend;Freq:TStFrequency;Basis:TStBasis):Extended; Function ModifiedIRR(const Values: array of Double; FinanceRate,ReinvestRate: Extended) : Extended Function ModifiedIRR16(const Values,NValues:Int; FinanceRate,ReinvestRate: Extended) : Extended Function NetPresentValueS( Rate : Extended; const Values : array of Double) : Extended Function NetPresentValue16( Rate : Extended; const Values, NValues : Int) : Extended Function NominalInterestRate( EffectRate : Extended; Frequency : TStFrequency) : Extended Function NonperiodicIRR(const Values:array of Double;const Dates:array of TStDate;Guess:Extended):Extended; Function NonperiodicNPV(Rate:Extended;const Values: array of Double;const Dates:array of TStDate):Extended; Function Payment(Rate:Extended;NPeriods:Int;PV FV:Extended;Frequency:TStFrequency;Timing:TStPaymentTime):Extended Function Periods(Rate:Extended;Pmt,PV,FV:Extended;Frequency:TStFrequency;Timing:TStPaymentTime):Int; Function PresentValueS(Rate:Extended;NPeriods:Int;Pmt,FV:Extended;Frequency:TStFrequency;Timing:TStPaymentTime):Extended Function ReceivedAtMaturity(Settlement,Maturity:TStDate;Invest,Discount:Extended;Basis:TStBasis):Extended; Function RoundToDecimal( Value : Extended; Places : Int; Bankers : Boolean) : Extended Function TBillEquivYield( Settlement, Maturity : TStDate; Discount : Extended) : Extended Function TBillPrice( Settlement, Maturity : TStDate; Discount : Extended) : Extended Function TBillYield( Settlement, Maturity : TStDate; Price : Extended) : Extended Function VariableDecliningBalance(Cost,Salvage:Extended;Life:Int;StartPeriod,EndPeriod,Factor:Extended;NoSwitch:bool):Extended Function YieldDiscounted(Settlement,Maturity:TStDate;Price,Redemption:Exted;Basis:TStBasis):Extended; Function YieldPeriodic(Settlement,Maturity:TStDate;Rate,Price,Redemption:Extended;Freq:TStFrequency;Basis:TStBasis):Extended Function YieldMaturity(Issue,Settlement,Maturity:TStDate;Rate,Price:Extended;Basis:TStBasis):Extended; //********************************************unit uPSI_StAstroP; Procedure PlanetsPos( JD : Double; var PA : TStPlanetsArray) //*****unit unit uPSI_StStat; Statistic Package of SysTools****************************************** Function AveDev( const Data : array of Double) : Double Function AveDev16( const Data, NData : Int) : Double Function Confidence( Alpha, StandardDev : Double; Size : LongInt) : Double Function Correlation( const Data1, Data2 : array of Double) : Double Function Correlation16( const Data1, Data2, NData : Int) : Double Function Covariance( const Data1, Data2 : array of Double) : Double Function Covariance16( const Data1, Data2, NData : Int) : Double Function DevSq( const Data : array of Double) : Double Function DevSq16( const Data, NData : Int) : Double Procedure Frequency(const Data:array of Double;const Bins:array of Double;var Counts: array of LongInt); //Procedure Frequency16( const Data, NData : Int; const Bins, NBins : Int; var Counts) Function GeometricMeanS( const Data : array of Double) : Double Function GeometricMean16( const Data, NData : Int) : Double Function HarmonicMeanS( const Data : array of Double) : Double Function HarmonicMean16( const Data, NData : Int) : Double Function Largest( const Data : array of Double; K : Int) : Double Function Largest16( const Data, NData : Int; K : Int) : Double Function MedianS( const Data : array of Double) : Double Function Median16( const Data, NData : Int) : Double Function Mode( const Data : array of Double) : Double Function Mode16( const Data, NData : Int) : Double Function Percentile( const Data : array of Double; K : Double) : Double Function Percentile16( const Data, NData : Int; K : Double) : Double Function PercentRank( const Data : array of Double; X : Double) : Double Function PercentRank16( const Data, NData : Int; X : Double) : Double Function Permutations( Number, NumberChosen : Int) : Extended Function Combinations( Number, NumberChosen : Int) : Extended Function FactorialS( N : Int) : Extended Function Rank( Number : Double; const Data : array of Double; Ascending : Boolean) : Int Function Rank16( Number : Double; const Data, NData : Int; Ascending : Boolean) : Int Function Smallest( const Data : array of Double; K : Int) : Double Function Smallest16( const Data, NData : Int; K : Int) : Double Function TrimMean( const Data : array of Double; Percent : Double) : Double Function TrimMean16( const Data, NData : Int; Percent : Double) : Double AddTypeS('TStLinEst', 'record B0 : Double; B1 : double; seB0 : double; seB' +1 : Double; R2: Double;sigma :Double;SSr: double;SSe: Double; F0 : Double; df : Int;end Procedure LinEst(const KnownY:array of Double;const KnownX:array of Double;var LF:TStLinEst;ErrorStats:Bool; Procedure LogEst(const KnownY:array of Double;const KnownX:array of Double;var LF:TStLinEst;ErrorStats:Bool; Function Forecast(X: Double; const KnownY: array of Double; const KnownX: array of Double) : Double Function ForecastExponential(X:Double;const KnownY:array of Double;const KnownX:array of Double):Double Function Intercept( const KnownY : array of Double; const KnownX : array of Double) : Double Function RSquared( const KnownY : array of Double; const KnownX : array of Double) : Double Function Slope( const KnownY : array of Double; const KnownX : array of Double) : Double Function StandardErrorY( const KnownY : array of Double; const KnownX : array of Double) : Double Function BetaDist( X, Alpha, Beta, A, B : Single) : Single Function BetaInv( Probability, Alpha, Beta, A, B : Single) : Single Function BinomDist(NumberS,Trials: Int; ProbabilityS : Single;Cumulative: Boolean):Single Function CritBinom( Trials : Int; ProbabilityS, Alpha : Single) : Int Function ChiDist( X : Single; DegreesFreedom : Int) : Single Function ChiInv( Probability : Single; DegreesFreedom : Int) : Single Function ExponDist( X, Lambda : Single; Cumulative : Boolean) : Single Function FDist( X : Single; DegreesFreedom1, DegreesFreedom2 : Int) : Single Function FInv( Probability : Single; DegreesFreedom1, DegreesFreedom2 : Int) : Single Function LogNormDist( X, Mean, StandardDev : Single) : Single Function LogInv( Probability, Mean, StandardDev : Single) : Single Function NormDist( X, Mean, StandardDev : Single; Cumulative : Boolean) : Single Function NormInv( Probability, Mean, StandardDev : Single) : Single Function NormSDist( Z : Single) : Single Function NormSInv( Probability : Single) : Single Function Poisson( X : Int; Mean : Single; Cumulative : Boolean) : Single Function TDist( X : Single; DegreesFreedom : Int; TwoTails : Boolean) : Single Function TInv( Probability : Single; DegreesFreedom : Int) : Single Function Erfc( X : Single) : Single Function GammaLn( X : Single) : Single Function LargestSort( const Data : array of Double; K : Int) : Double Function SmallestSort( const Data : array of double; K : Int) : Double procedure SIRegister_TStSorter(CL: TPSPascalCompiler); Function OptimumHeapToUse( RecLen : Cardinal; NumRecs : LongInt) : LongInt Function MinimumHeapToUse( RecLen : Cardinal) : LongInt Function MergeInfo( MaxHeap : LongInt; RecLen : Cardinal; NumRecs : LongInt) : TMergeInfo Function DefaultMergeName( MergeNum : Int) : string Procedure ArraySort( var A, RecLen, NumRecs : Cardinal; Compare : TUntypedCompareFunc) procedure SIRegister_StAstro(CL: TPSPascalCompiler); Function AmountOfSunlight( LD : TStDate; Longitude, Latitude : Double) : TStTime Function FixedRiseSet( LD : TStDate; RA, DC, Longitude, Latitude : Double) : TStRiseSetRec Function SunPos( UT : TStDateTimeRec) : TStPosRec Function SunPosPrim( UT : TStDateTimeRec) : TStSunXYZRec Function SunRiseSet( LD : TStDate; Longitude, Latitude : Double) : TStRiseSetRec Function Twilight( LD : TStDate; Longitude, Latitude : Double; TwiType:TStTwilight):TStRiseSetRec Function LunarPhase( UT : TStDateTimeRec) : Double Function MoonPos( UT : TStDateTimeRec) : TStMoonPosRec Function MoonRiseSet( LD : TStDate; Longitude, Latitude : Double) : TStRiseSetRec Function FirstQuarter( D : TStDate) : TStLunarRecord Function FullMoon( D : TStDate) : TStLunarRecord Function LastQuarter( D : TStDate) : TStLunarRecord Function NewMoon( D : TStDate) : TStLunarRecord Function NextFirstQuarter( D : TStDate) : TStDateTimeRec Function NextFullMoon( D : TStDate) : TStDateTimeRec Function NextLastQuarter( D : TStDate) : TStDateTimeRec Function NextNewMoon( D : TStDate) : TStDateTimeRec Function PrevFirstQuarter( D : TStDate) : TStDateTimeRec Function PrevFullMoon( D : TStDate) : TStDateTimeRec Function PrevLastQuarter( D : TStDate) : TStDateTimeRec Function PrevNewMoon( D : TStDate) : TStDateTimeRec Function SiderealTime( UT : TStDateTimeRec) : Double Function Solstice( Y, Epoch : Int; Summer : Boolean) : TStDateTimeRec Function Equinox( Y, Epoch : Int; Vernal : Boolean) : TStDateTimeRec Function SEaster( Y, Epoch : Int) : TStDate Function DateTimeToAJD( D : TDateTime) : Double Function HoursMin( RA : Double) : ShortString Function DegsMin( DC : Double) : ShortString Function AJDToDateTime( D : Double) : TDateTime Procedure SIRegister_StDate(CL: TPSPascalCompiler); Function CurrentDate : TStDate Function StValidDate( Day, Month, Year, Epoch : Int) : Boolean Function DMYtoStDate( Day, Month, Year, Epoch : Int) : TStDate Procedure StDateToDMY( Julian : TStDate; var Day, Month, Year : Int) Function StIncDate( Julian : TStDate; Days, Months, Years : Int) : TStDate Function IncDateTrunc( Julian : TStDate; Months, Years : Int) : TStDate Procedure StDateDiff( Date1, Date2 : TStDate; var Days, Months, Years : Int) Function BondDateDiff( Date1, Date2 : TStDate; DayBasis : TStBondDateType) : TStDate Function WeekOfYear( Julian : TStDate) : Byte Function AstJulianDate( Julian : TStDate) : Double Function AstJulianDatetoStDate( AstJulian : Double; Truncate : Boolean) : TStDate Function AstJulianDatePrim( Year, Month, Date : Int; UT : TStTime) : Double Function StDayOfWeek( Julian : TStDate) : TStDayType Function DayOfWeekDMY( Day, Month, Year, Epoch : Int) : TStDayType Function StIsLeapYear( Year : Int) : Boolean Function StDaysInMonth( Month : Int; Year, Epoch : Int) : Int Function ResolveEpoch( Year, Epoch : Int) : Int Function ValidTime( Hours, Minutes, Seconds : Int) : Boolean Procedure StTimeToHMS( T : TStTime; var Hours, Minutes, Seconds : Byte) Function HMStoStTime( Hours, Minutes, Seconds : Byte) : TStTime Function CurrentTime : TStTime Procedure TimeDiff( Time1, Time2 : TStTime; var Hours, Minutes, Seconds : Byte) Function StIncTime( T : TStTime; Hours, Minutes, Seconds : Byte) : TStTime Function DecTime( T : TStTime; Hours, Minutes, Seconds : Byte) : TStTime Function RoundToNearestHour( T : TStTime; Truncate : Boolean) : TStTime Function RoundToNearestMinute( const T : TStTime; Truncate : Boolean) : TStTime Procedure DateTimeDiff(const DT1:TStDateTimeRec;var DT2:TStDateTimeRec;var Days:LongInt;var Secs:LongInt Procedure IncDateTime(const DT1:TStDateTimeRec;var DT2:TStDateTimeRec;Days:Int;Secs:LongInt) Function DateTimeToStDate( DT : TDateTime) : TStDate Function DateTimeToStTime( DT : TDateTime) : TStTime Function StDateToDateTime( D : TStDate) : TDateTime Function StTimeToDateTime( T : TStTime) : TDateTime Function Convert2ByteDate( TwoByteDate : Word) : TStDate Function Convert4ByteDate( FourByteDate : TStDate) : Word Procedure SIRegister_StDateSt(CL: TPSPascalCompiler); Function DateStringHMStoAstJD( const Picture, DS : string; H, M, S, Epoch : Int) : Double Function MonthToString( const Month : Int) : string Function DateStringToStDate( const Picture, S : string; Epoch : Int) : TStDate Function DateStringToDMY(const Picture,S:string; Epoch:Int; var D, M, Y : Int):Boolean Function StDateToDateString( const Picture : string; const Julian : TStDate; Pack : Boolean):string Function DayOfWeekToString( const WeekDay : TStDayType) : string Function DMYtoDateString(const Picture:string;Day,Month,Year,Epoch:Int;Pack:Boolean):string); Function CurrentDateString( const Picture : string; Pack : Boolean) : string Function CurrentTimeString( const Picture : string; Pack : Boolean) : string Function TimeStringToHMS( const Picture, St : string; var H, M, S : Int) : Boolean Function TimeStringToStTime( const Picture, S : string) : TStTime Function StTimeToAmPmString( const Picture : string; const T : TStTime; Pack : Boolean) : string Function StTimeToTimeString( const Picture : string; const T : TStTime; Pack : Boolean) : string Function DateStringIsBlank( const Picture, S : string) : Boolean Function InternationalDate( ForceCentury : Boolean) : string Function InternationalLongDate( ShortNames : Boolean; ExcludeDOW : Boolean) : string Function InternationalTime( ShowSeconds : Boolean) : string Procedure ResetInternationalInfo procedure SIRegister_StBase(CL: TPSPascalCompiler); Function DestroyNode( Container : TStContainer; Node : TStNode; OtherData : Pointer) : Boolean Function AnsiUpperCaseShort32( const S : string) : string Function AnsiCompareTextShort32( const S1, S2 : string) : Int Function AnsiCompareStrShort32( const S1, S2 : string) : Int Function HugeCompressRLE( const InBuffer, InLen : Longint; var OutBuffer) : Longint Function HugeDecompressRLE( const InBuffer, InLen : Longint; var OutBuffer,OutLen:LongInt): Longint Procedure HugeFillChar( var Dest, Count : Longint; Value : Byte) Procedure HugeFillStruc( var Dest, Count : Longint; const Value, ValSize : Cardinal) Function Upcase( C : AnsiChar) : AnsiChar Function LoCase( C : AnsiChar) : AnsiChar Function CompareLetterSets( Set1, Set2 : LongInt) : Cardinal Function CompStruct( const S1, S2, Size : Cardinal) : Int Function Search(const Buffer,BufLength:Cardinal;const Match,MatLength:Cardinal;var Pos:Cardinal):Bool; Function StSearch(const Buffer,BufLength:Cardinal;const Match,MatLength:Cardinal;var Pos:Cardi):Bool Function SearchUC(const Buffer,BufLength:Cardinal;const Match,MatLength:Cardinal;var Pos:Cardi):Bool Function IsOrInheritsFrom( Root, Candidate : TClass) : boolean Procedure RaiseContainerError( Code : longint) Procedure RaiseContainerErrorFmt( Code : Longint; Data : array of const) Function ProductOverflow( A, B : LongInt) : Boolean Function StNewStr( S : string) : PShortString Procedure StDisposeStr( PS : PShortString) Procedure ValLongInt( S : ShortString; var LI : Longint; var ErrorCode : Int) Procedure ValSmallint( const S : ShortString; var SI : smallint; var ErrorCode : Int) Procedure ValWord( const S : ShortString; var Wd : word; var ErrorCode : Int) Procedure RaiseStError( ExceptionClass : EStExceptionClass; Code : LongInt) Procedure RaiseStWin32Error( ExceptionClass : EStExceptionClass; Code : LongInt) Procedure RaiseStWin32ErrorEx( ExceptionClass : EStExceptionClass; Code : LongInt; Info : string) procedure SIRegister_usvd(CL: TPSPascalCompiler); begin Procedure SV_Decomp( A : TMatrix; Lb, Ub1, Ub2 : Int; S : TVector; V : TMatrix) Procedure SV_SetZero( S : TVector; Lb, Ub : Int; Tol : Float) Procedure SV_Solve(U:TMatrix; S:TVector;V:TMatrix;B:TVector;Lb,Ub1,Ub2:Int;X:TVector); Procedure SV_Approx( U : TMatrix; S : TVector; V : TMatrix; Lb, Ub1, Ub2 : Int; A : TMatrix) Procedure RKF45(F:TDiffEqs;Neqn:Int;Y,Yp:TVector;var T:Float;Tout,RelErr,AbsErr:Float;var Flag:Int; end; //**********unit unit ; StMath Package of SysTools****************************************** Function IntPowerS( Base : Extended; Exponent : Int) : Extended Function PowerS( Base, Exponent : Extended) : Extended Function StInvCos( X : Double) : Double Function StInvSin( Y : Double) : Double Function StInvTan2( X, Y : Double) : Double Function StTan( A : Double) : Double Procedure DumpException; //unit StExpEng; Function HexifyBlock( var Buffer, BufferSize : Int) : string //**********unit unit ; StCRC Package of SysTools****************************************** Function Adler32Prim( var Data, DataSize : Cardinal; CurCrc : LongInt) : LongInt Function Adler32OfStream( Stream : TStream; CurCrc : LongInt) : LongInt Function Adler32OfFile( FileName : AnsiString) : LongInt Function Crc16Prim( var Data, DataSize, CurCrc : Cardinal) : Cardinal Function Crc16OfStream( Stream : TStream; CurCrc : Cardinal) : Cardinal Function Crc16OfFile( FileName : AnsiString) : Cardinal Function Crc32Prim( var Data, DataSize : Cardinal; CurCrc : LongInt) : LongInt Function Crc32OfStream( Stream : TStream; CurCrc : LongInt) : LongInt Function Crc32OfFile( FileName : AnsiString) : LongInt Function InternetSumPrim( var Data, DataSize, CurCrc : Cardinal) : Cardinal Function InternetSumOfStream( Stream : TStream; CurCrc : Cardinal) : Cardinal Function InternetSumOfFile( FileName : AnsiString) : Cardinal Function Kermit16Prim( var Data, DataSize, CurCrc : Cardinal) : Cardinal Function Kermit16OfStream( Stream : TStream; CurCrc : Cardinal) : Cardinal Function Kermit16OfFile( FileName : AnsiString) : Cardinal //**********unit unit ; StBCD Package of SysTools****************************************** Function AddBcd( const B1, B2 : TbcdS) : TbcdS Function SubBcd( const B1, B2 : TbcdS) : TbcdS Function MulBcd( const B1, B2 : TbcdS) : TbcdS Function DivBcd( const B1, B2 : TbcdS) : TbcdS Function ModBcd( const B1, B2 : TbcdS) : TbcdS Function NegBcd( const B : TbcdS) : TbcdS Function AbsBcd( const B : TbcdS) : TbcdS Function FracBcd( const B : TbcdS) : TbcdS Function IntBcd( const B : TbcdS) : TbcdS Function RoundDigitsBcd( const B : TbcdS; Digits : Cardinal) : TbcdS Function RoundPlacesBcd( const B : TbcdS; Places : Cardinal) : TbcdS Function ValBcd( const S : string) : TbcdS Function LongBcd( L : LongInt) : TbcdS Function ExtBcd( E : Extended) : TbcdS Function ExpBcd( const B : TbcdS) : TbcdS Function LnBcd( const B : TbcdS) : TbcdS Function IntPowBcd( const B : TbcdS; E : LongInt) : TbcdS Function PowBcd( const B, E : TbcdS) : TbcdS Function SqrtBcd( const B : TbcdS) : TbcdS Function CmpBcd( const B1, B2 : TbcdS) : Int Function EqDigitsBcd( const B1, B2 : TbcdS; Digits : Cardinal) : Boolean Function EqPlacesBcd( const B1, B2 : TbcdS; Digits : Cardinal) : Boolean Function IsIntBcd( const B : TbcdS) : Boolean Function TruncBcd( const B : TbcdS) : LongInt Function BcdExt( const B : TbcdS) : Extended Function RoundBcd( const B : TbcdS) : LongInt Function StrBcd( const B : TbcdS; Width, Places : Cardinal) : string Function StrExpBcd( const B : TbcdS; Width : Cardinal) : string Function FormatBcd( const Format : string; const B : TbcdS) : string Function StrGeneralBcd( const B : TbcdS) : string Function FloatFormBcd(const Mask:string;B:TbcdS;const LtCurr,RtCurr:string;Sep,DecPt:AnsiChar):string Procedure ConvertBcd( const SrcB, SrcSize : Byte; var DestB, DestSize : Byte) ////*******unit unit ; StTxtDat; TStTextDataRecordSet Package of SysTools*********************** Procedure StParseLine( const Data : AnsiString; Schema : TStTextDataSchema; Result : TStrings) Function StFieldTypeToStr( FieldType : TStSchemaFieldType) : AnsiString Function StStrToFieldType( const S : AnsiString) : TStSchemaFieldType Function StDeEscape( const EscStr : AnsiString) : Char Function StDoEscape( Delim : Char) : AnsiString Function StTrimTrailingChars( const S : AnsiString; Trailer : Char) : AnsiString Function AnsiHashText( const S : string; Size : Int) : Int Function AnsiHashStr( const S : string; Size : Int) : Int Function AnsiELFHashText( const S : string; Size : Int) : Int Function AnsiELFHashStr( const S : string; Size : Int) : Int //**********unit unit ; StNetCon Package of SysTools****************************************** with AddClassN(FindClass('TStComponent'),'TStNetConnection') do begin Constructor Create( AOwner : TComponent) Function Connect : DWord Function Disconnect : DWord RegisterProperty('Password', 'String', iptrw); Property('UserName', 'String', iptrw); Property('ConnectOptions', 'TStNetConnectOptionsSet', iptrw); Property('DisconnectOptions', 'TStNetDisconnectOptionsSet', iptrw); Property('LocalDevice', 'String', iptrw); Property('ServerName', 'String', iptrw); Property('ShareName', 'String', iptrw); Property('OnConnect', 'TNotifyEvent', iptrw); Property('OnConnectFail', 'TOnConnectFailEvent', iptrw); Property('OnConnectCancel', 'TOnConnectCancelEvent', iptrw); Property('OnDisconnect', 'TNotifyEvent', iptrw); Property('OnDisconnectFail', 'TOnDisconnectFailEvent', iptrw); Property('OnDisconnectCancel', 'TOnDisconnectCancelEvent', iptrw); end; //***********Thread Functions Context of Win API --- more objects in SyncObjs.pas / /153 unit uPSI_SyncObjs, unit uPSIParallelJobs; Procedure InitializeCriticalSection( var lpCriticalSection : TRTLCriticalSection) Procedure EnterCriticalSection( var lpCriticalSection : TRTLCriticalSection) Procedure LeaveCriticalSection( var lpCriticalSection : TRTLCriticalSection) Function InitializeCriticalSectionAndSpinCount(var lpCriticalSection:TRTLCriticalSection;dwSpinCount:DWORD):BOOL; Function SetCriticalSectionSpinCount(var lpCriticalSection:TRTLCriticalSection;dwSpinCount:DWORD):DWORD; Function TryEnterCriticalSection( var lpCriticalSection : TRTLCriticalSection) : BOOL Procedure DeleteCriticalSection( var lpCriticalSection : TRTLCriticalSection) Function GetThreadContext( hThread : THandle; var lpContext : TContext) : BOOL Function SetThreadContext( hThread : THandle; const lpContext : TContext) : BOOL Function SuspendThread( hThread : THandle) : DWORD Function ResumeThread( hThread : THandle) : DWORD Function CreateThread2(ThreadFunc: TThreadFunction2; thrid: DWord) : THandle Function GetCurrentThread : THandle Procedure ExitThread( dwExitCode : DWORD) Function TerminateThread( hThread : THandle; dwExitCode : DWORD) : BOOL Function GetExitCodeThread( hThread : THandle; var lpExitCode : DWORD) : BOOL Procedure EndThread(ExitCode: Int); Function WaitForSingleObject( hHandle : THandle; dwMilliseconds : DWORD) : DWORD Function MakeProcInstance( Proc : FARPROC; Instance : THandle) : FARPROC Procedure FreeProcInstance( Proc : FARPROC) Procedure FreeLibraryAndExitThread( hLibModule : HMODULE; dwExitCode : DWORD) Function DisableThreadLibraryCalls( hLibModule : HMODULE) : BOOL Procedure ParallelJob( ASelf : TObject; ATarget : Pointer; AParam : Pointer; ASafeSection : boolean); Procedure ParallelJob1( ATarget : Pointer; AParam : Pointer; ASafeSection : boolean); Procedure ParallelJob2(AJobGroup:TJobsGroup;ASelf:TObject;ATarget:Ptr;AParam:Pointer;ASafeSection:bool; Procedure ParallelJob3( AJobGroup:TJobsGroup;ATarget:Pointer;AParam:Pointer;ASafeSection: boolean); Function CreateParallelJob(ASelf:TObject;ATarget:Pointer;AParam:Ptr;ASafeSection:bool:TParallelJob; Function CreateParallelJob1(ATarget:Pointer; AParam:Pointer; ASafeSection : boolean) : TParallelJob; Function CurrentParallelJobInfo : TParallelJobInfo Function ObtainParallelJobInfo : TParallelJobInfo Procedure GetSystemInfo( var lpSystemInfo : TSystemInfo); Function IsProcessorFeaturePresent( ProcessorFeature : DWORD) : BOOL; Function SetStdHandle( nStdHandle : DWORD; hHandle : THandle) : BOOL; Function DeviceIoControl(hDevice:THandle;dwIoControlCode:DWORD;lpInBuffer:TObject;nInBufferSize:DWORD;lpOutBuffer: TObject; nOutBufferSize: DWORD; var lpBytesReturned: DWORD; lpOverlapped:TOverlapped):BOOL; Function SetFileTime(hFile:THandle;lpCreationTime,lpLastAccessTime,lpLastWriteTime:TFileTime): BOOL; Function DuplicateHandle(hSourceProcessHandle,hSourceHandle,hTargetProcessHandle:THandle; lpTargetHandle:THandle; dwDesiredAccess : DWORD; bInheritHandle:BOOL; dwOptions : DWORD) : BOOL; Function GetHandleInformation( hObject : THandle; var lpdwFlags : DWORD) : BOOL; Function SetHandleInformation( hObject : THandle; dwMask : DWORD; dwFlags : DWORD) : BOOL; ****************************************************unit uPSI_JclMime; Function MimeEncodeString( const S : AnsiString) : AnsiString Function MimeDecodeString( const S : AnsiString) : AnsiString Procedure MimeEncodeStream(const InputStream:TStream; const OutputStream : TStream) Procedure MimeDecodeStream(const InputStream:TStream; const OutputStream : TStream) Function MimeEncodedSize( const I : Cardinal) : Cardinal Function MimeDecodedSize( const I : Cardinal) : Cardinal Procedure MimeEncode( var InputBuffer : string; const InputByteCount : Cardinal; var OutputBuffer) Function MimeDecode(var InputBuffer:string;const InputBytesCount:Cardinal;var OutputBuffer):Cardinal; Function MimeDecodePartial(var InputBuffer:string;const InputBytesCount:Cardinal;var OutputBuffer:string;var ByteBuffer : Cardinal; var ByteBufferSpace : Cardinal) : Cardinal Function MimeDecodePartialEnd(var OutputBuf:string;const ByteBuf:Card;const ByteBufferSpace:Card): Cardinal; **************************************************unit uPSI_JclPrint; Procedure DirectPrint( const Printer, Data : string) Procedure SetPrinterPixelsPerInch Function GetPrinterResolution : TPoint Function CharFitsWithinDots( const Text : string; const Dots : Int) : Int Procedure PrintMemo( const Memo : TMemo; const Rect : TRect) //***************************************unit uPSI_ShLwApi;*************************************** Function StrChr( lpStart : PChar; wMatch : WORD) : PChar Function StrChrI( lpStart : PChar; wMatch : WORD) : PChar Function StrCmpN( lpStr1, lpStr2 : PChar; nChar : Int) : Int Function StrCmpNI( lpStr1, lpStr2 : PChar; nChar : Int) : Int Function StrCSpn( lpStr_, lpSet : PChar) : Int Function StrCSpnI( lpStr1, lpSet : PChar) : Int Function StrDup( lpSrch : PChar) : PChar Function StrFormatByteSize( dw : DWORD; szBuf : PChar; uiBufSize : UINT) : PChar Function StrFormatKBSize( qdw : Dword; szBuf : PChar; uiBufSize : UINT) : PChar Function StrFromTimeInterval(pszOut:PChar cchMax:UINT;dwTimeMS:DWORD;digits:Int):Int Function StrIsIntlEqual(fCaseSens: BOOL;lpString1,lpString2:PChar; nChar:Int): BOOL Function StrNCat( psz1 : PChar; psz2 : PChar; cchMax : Int) : PChar Function StrPBrk( psz, pszSet : PChar) : PChar Function StrRChr( lpStart, lpEnd : PChar; wMatch : WORD) : PChar Function StrRChrI( lpStart, lpEnd : PChar; wMatch : WORD) : PChar Function StrRStrI( lpSource, lpLast, lpSrch : PChar) : PChar Function StrSpn( psz, pszSet : PChar) : Int Function StrStr( lpFirst, lpSrch : PChar) : PChar Function StrStrI( lpFirst, lpSrch : PChar) : PChar Function StrToInt( lpSrch : PChar) : Int Function StrToIntEx( pszString : PChar; dwFlags : DWORD; var piRet : Int) : BOOL Function StrTrim( psz : PChar; pszTrimChars : PChar) : BOOL Function ChrCmpI( w1, w2 : WORD) : BOOL Function ChrCmpIA( w1, w2 : WORD) : BOOL Function ChrCmpIW( w1, w2 : WORD) : BOOL Function StrIntlEqN( s1, s2 : PChar; nChar : Int) : BOOL Function StrIntlEqNI( s1, s2 : PChar; nChar : Int) : BOOL Function StrCatBuff( pszDest, pszSrc : PChar; cchDestBuffSize : Int) : PChar Function StrCpyNX( psz1 : PChar; psz2 : PChar; cchMax : Int) : PChar Function IntlStrEqWorker(fCaseSens:BOOL;lpString1,lpString2:PChar;nChar:Int):BOOL Function IntlStrEqN( s1, s2 : PChar; nChar : Int) : BOOL SZ_CONTENTTYPE_HTMLA','String 'text/html SZ_CONTENTTYPE_HTMLW','String 'text/html SZ_CONTENTTYPE_HTML','string SZ_CONTENTTYPE_HTMLA); SZ_CONTENTTYPE_CDFA','String 'application/x-cdf SZ_CONTENTTYPE_CDFW','String 'application/x-cdf SZ_CONTENTTYPE_CDF','string SZ_CONTENTTYPE_CDFA); Function PathIsHTMLFile( pszPath : PChar) : BOOL STIF_DEFAULT','LongWord( $00000000); STIF_SUPPORT_HEX','LongWord( $00000001); Function StrNCmpI( lpStr1, lpStr2 : PChar; nChar : Int) : Int Function StrNCpy( psz1, psz2 : PChar; cchMax : Int) : PChar Function StrCatN( psz1 : PChar; psz2 : PChar; cchMax : Int) : PChar Function PathAddBackslash( pszPath : PChar) : PChar Function PathAddExtension( pszPath : PChar; pszExt : PChar) : BOOL Function PathAppend( pszPath : PChar; pMore : PChar) : BOOL Function PathBuildRoot( szRoot : PChar; iDrive : Int) : PChar Function PathCanonicalize( pszBuf : PChar; pszPath : PChar) : BOOL Function PathCombine( szDest : PChar; lpszDir, lpszFile : PChar) : PChar Function PathCompactPath( hDC : HDC; pszPath : PChar; dx : UINT) : BOOL Function PathCompactPathEx(pszOut:PChar;pszSrc:PChar;cchMax:UINT;dwFlags:DWORD):BOOL Function PathCommonPrefix( pszFile1, pszFile2 : PChar; achPath : PChar) : Int Function PathFileExists( pszPath : PChar) : BOOL Function PathFindExtension( pszPath : PChar) : PChar Function PathFindFileName( pszPath : PChar) : PChar Function PathFindNextComponent( pszPath : PChar) : PChar Function PathFindOnPath( pszPath : PChar; var ppszOtherDirs : PChar) : BOOL Function PathGetArgs( pszPath : PChar) : PChar Function PathFindSuffixArray(pszPath:PChar;const apszSuffix:PChar;iArraySize:Int): PChar Function PathIsLFNFileSpec( lpName : PChar) : BOOL Function PathGetCharType( ch : Char) : UINT GCT_INVALID','LongWord( $0000); GCT_LFNCHAR','LongWord( $0001); GCT_SHORTCHAR','LongWord( $0002); GCT_WILD','LongWord( $0004); GCT_SEPARATOR','LongWord( $0008); Function PathGetDriveNumber( pszPath : PChar) : Int Function PathIsDirectory( pszPath : PChar) : BOOL Function PathIsDirectoryEmpty( pszPath : PChar) : BOOL Function PathIsFileSpec( pszPath : PChar) : BOOL Function PathIsPrefix( pszPrefix, pszPath : PChar) : BOOL Function PathIsRelative( pszPath : PChar) : BOOL Function PathIsRoot( pszPath : PChar) : BOOL Function PathIsSameRoot( pszPath1, pszPath2 : PChar) : BOOL Function PathIsUNC( pszPath : PChar) : BOOL Function PathIsNetworkPath( pszPath : PChar) : BOOL Function PathIsUNCServer( pszPath : PChar) : BOOL Function PathIsUNCServerShare( pszPath : PChar) : BOOL Function PathIsContentType( pszPath, pszContentType : PChar) : BOOL Function PathIsURL( pszPath : PChar) : BOOL Function PathMakePretty( pszPath : PChar) : BOOL Function PathMatchSpec( pszFile, pszSpec : PChar) : BOOL Function PathParseIconLocation( pszIconFile : PChar) : Int Procedure PathQuoteSpaces( lpsz : PChar) Function PathRelativePathTo(pszPath:PChar;pszFrom:PChar;dwAttrFrom:DWORD;pszTo:PChar;dwAttrTo:DWORD):BOOL; Procedure PathRemoveArgs( pszPath : PChar) Function PathRemoveBackslash( pszPath : PChar) : PChar Procedure PathRemoveBlanks( pszPath : PChar) Procedure PathRemoveExtension( pszPath : PChar) Function PathRemoveFileSpec( pszPath : PChar) : BOOL Function PathRenameExtension( pszPath : PChar; pszExt : PChar) : BOOL Function PathSearchAndQualify( pszPath : PChar; pszBuf : PChar; cchBuf : UINT) : BOOL Procedure PathSetDlgItemPath( hDlg : HWND; id : Int; pszPath : PChar) Function PathSkipRoot( pszPath : PChar) : PChar Procedure PathStripPath( pszPath : PChar) Function PathStripToRoot( pszPath : PChar) : BOOL Procedure PathUnquoteSpaces( lpsz : PChar) Function PathMakeSystemFolder( pszPath : PChar) : BOOL Function PathUnmakeSystemFolder( pszPath : PChar) : BOOL Function PathIsSystemFolder( pszPath : PChar; dwAttrb : DWORD) : BOOL Procedure PathUndecorate( pszPath : PChar) Function PathUnExpandEnvStrings( pszPath : PChar; pszBuf : PChar; cchBuf : UINT) : BOOL URL_SCHEME_INVALID','LongInt'( - 1); URL_SCHEME_UNKNOWN','LongInt'( 0); URL_SCHEME_FTP','LongInt'( 1); URL_SCHEME_HTTP','LongInt'( 2); URL_SCHEME_GOPHER','LongInt'( 3); URL_SCHEME_MAILTO','LongInt'( 4); URL_SCHEME_NEWS','LongInt'( 5); URL_SCHEME_NNTP','LongInt'( 6); URL_SCHEME_TELNET','LongInt'( 7); URL_SCHEME_WAIS','LongInt'( 8); URL_SCHEME_FILE','LongInt'( 9); URL_SCHEME_MK','LongInt'( 10); URL_SCHEME_HTTPS','LongInt'( 11); URL_SCHEME_SHELL','LongInt'( 12); URL_SCHEME_SNEWS','LongInt'( 13); URL_SCHEME_LOCAL','LongInt'( 14); URL_SCHEME_JAVASCRIPT','LongInt'( 15); URL_SCHEME_VBSCRIPT','LongInt'( 16); URL_SCHEME_ABOUT','LongInt'( 17); URL_SCHEME_RES','LongInt'( 18); URL_SCHEME_MAXVALUE','LongInt'( 19); URL_SCHEME', 'Int URL_PART_NONE','LongInt'( 0); URL_PART_SCHEME','LongInt'( 1); URL_PART_HOSTNAME','LongInt'( 2); URL_PART_USERNAME','LongInt'( 3); URL_PART_PASSWORD','LongInt'( 4); URL_PART_PORT','LongInt'( 5); URL_PART_QUERY','LongInt'( 6); URL_PART', 'DWORD URLIS_URL','LongInt'( 0); URLIS_OPAQUE','LongInt'( 1); URLIS_NOHISTORY','LongInt'( 2); URLIS_FILEURL','LongInt'( 3); URLIS_APPLIABLE','LongInt'( 4); URLIS_DIRECTORY','LongInt'( 5); URLIS_HASQUERY','LongInt'( 6); TUrlIs', 'DWORD URL_UNESCAPE','LongWord( $10000000); URL_ESCAPE_UNSAFE','LongWord( $20000000); URL_PLUGGABLE_PROTOCOL','LongWord( $40000000); URL_WININET_COMPATIBILITY','LongWord( DWORD ( $80000000 )); URL_DONT_ESCAPE_EXTRA_INFO','LongWord( $02000000); URL_ESCAPE_SPACES_ONLY','LongWord( $04000000); URL_DONT_SIMPLIFY','LongWord( $08000000); URL_NO_META','longword( URL_DONT_SIMPLIFY); URL_UNESCAPE_INPLACE','LongWord( $00100000); URL_CONVERT_IF_DOSPATH','LongWord( $00200000); URL_UNESCAPE_HIGH_ANSI_ONLY','LongWord( $00400000); URL_INTERNAL_PATH','LongWord( $00800000); URL_FILE_USE_PATHURL','LongWord( $00010000); URL_ESCAPE_PERCENT','LongWord( $00001000); URL_ESCAPE_SEGMENT_ONLY','LongWord( $00002000); URL_PARTFLAG_KEEPSCHEME','LongWord( $00000001); URL_APPLY_DEFAULT','LongWord( $00000001); URL_APPLY_GUESSSCHEME','LongWord( $00000002); URL_APPLY_GUESSFILE','LongWord( $00000004); URL_APPLY_FORCEAPPLY','LongWord( $00000008); Function UrlCompare( psz1, psz2 : PChar; fIgnoreSlash : BOOL) : Int Function UrlCombine(pszBase,pszRelative:PChar;pszCombin:PChar;out pcchCombin:DWORD;dwFlags:DWORD):HRESULT; Function UrlCanonicalize(pszUrl:PChar;pszCanonicalized:PChar;pcchCanonic:DWORD;dwFlags:DWORD):HRESULT; Function UrlIsOpaque( pszURL : PChar) : BOOL Function UrlIsNoHistory( pszURL : PChar) : BOOL Function UrlIsFileUrl( pszURL : PChar) : BOOL Function UrlIs( pszUrl : PChar; UrlIs : TUrlIs) : BOOL Function UrlGetLocation( psz1 : PChar) : PChar Function UrlUnescape( pszUrl, pszUnescaped : PChar;pcchUnescaped:DWORD; dwFlags : DWORD) : HRESULT Function UrlEscape(pszUrl: PChar; pszEscaped: PChar; pcchEscaped:DWORD; dwFlags : DWORD) : HRESULT Function UrlCreateFromPath(pszPath:PChar; pszUrl: PChar;pcchUrl: DWORD; dwFlags : DWORD) : HRESULT Function PathCreateFromUrl(pszUrl:PChar; pszPath:PChar; pcchPath:DWORD; dwFlags : DWORD) : HRESULT Function UrlHash( pszUrl : PChar; pbHash : BYTE; cbHash : DWORD) : HRESULT Function UrlGetPart(pszIn: PChar; pszOut: PChar; pcchOut: DWORD; dwPart,dwFlags: DWORD) : HRESULT Function UrlApplyScheme( pszIn : PChar; pszOut : PChar; pcchOut : DWORD; dwFlags : DWORD) : HRESULT Function HashData(pbData:BYTE;cbData:DWORD; pbHash:BYTE; cbHash: DWORD) : HRESULT Function UrlEscapeSpaces(pszUrl:PChar;pszEscaped:PChar;pcchEscaped: WORD): HRESULT Function UrlUnescapeInPlace( pszUrl : PChar; dwFlags : DWORD) : HRESULT Function SHDeleteEmptyKey( hKey : HKEY; pszSubKey : PChar) : DWORD Function SHDeleteKey( hKey : HKEY; pszSubKey : PChar) : DWORD Function SHDeleteValue( hKey : HKEY; pszSubKey, pszValue : PChar) : DWORD Function SHEnumKeyEx( hKey : HKEY; dwIndex : DWORD; pszName : PChar; var pcchName : DWORD) : Longint Function SHEnumValue(hKey:HKEY;dwIndex:DWORD;pszValueName:PChar;var pcchValueName:DWORD;pdwType:DWORD;pvData: ___Pointer; pcbData:DWORD):Longint Function SHQueryInfoKey(hKey:HKEY;pcSubKeys,pcchMaxSubKeyLen,pcVal,pcchMaxValueNameLen:DWORD):Longint; Function SHCopyKey( hkeySrc : HKEY; szSrcSubKey : PChar; hkeyDest : HKEY; fReserved : DWORD) : DWORD Function SHRegGetPath(hKey:HKEY; pcszSubKey,pcszValue: PChar; pszPath: PChar; dwFlags: DWORD): DWORD Function SHRegSetPath( hKey:HKEY; pcszSubKey, pcszValue, pcszPath : PChar; dwFlags : DWORD): DWORD SHREGDEL_DEFAULT','LongWord( $00000000); SHREGDEL_HKCU','LongWord( $00000001); SHREGDEL_HKLM','LongWord( $00000010); SHREGDEL_BOTH','LongWord( $00000011); SHREGENUM_DEFAULT','LongWord( $00000000); SHREGENUM_HKCU','LongWord( $00000001); SHREGENUM_HKLM','LongWord( $00000010); SHREGENUM_BOTH','LongWord( $00000011); SHREGSET_HKCU','LongWord( $00000001); SHREGSET_FORCE_HKCU','LongWord( $00000002); SHREGSET_HKLM','LongWord( $00000004); SHREGSET_FORCE_HKLM','LongWord( $00000008); TSHRegDelFlags', 'DWORD TSHRegEnumFlags', 'DWORD HUSKEY', 'THandle ASSOCF_INIT_NOREMAPCLSID','LongWord( $00000001); ASSOCF_INIT_BYEXENAME','LongWord( $00000002); ASSOCF_OPEN_BYEXENAME','LongWord( $00000002); ASSOCF_INIT_DEFAULTTOSTAR','LongWord( $00000004); ASSOCF_INIT_DEFAULTTOFOLDER','LongWord( $00000008); ASSOCF_NOUSERSETTINGS','LongWord( $00000010); ASSOCF_NOTRUNCATE','LongWord( $00000020); ASSOCF_VERIFY','LongWord( $00000040); ASSOCF_REMAPRUNDLL','LongWord( $00000080); ASSOCF_NOFIXUPS','LongWord( $00000100); ASSOCF_IGNOREBASECLASS','LongWord( $00000200); ASSOCF', 'DWORD ASSOCSTR_COMMAND','LongInt'( 1); ASSOCSTR_EXECUTABLE','LongInt'( 2); ASSOCSTR_FRIENDLYDOCNAME','LongInt'( 3); ASSOCSTR_FRIENDLYAPPNAME','LongInt'( 4); ASSOCSTR_NOOPEN','LongInt'( 5); ASSOCSTR_SHELLNEWVALUE','LongInt'( 6); ASSOCSTR_DDECOMMAND','LongInt'( 7); ASSOCSTR_DDEIFEXEC','LongInt'( 8); ASSOCSTR_DDEAPPLICATION','LongInt'( 9); ASSOCSTR_DDETOPIC','LongInt'( 10); ASSOCSTR_INFOTIP','LongInt'( 11); ASSOCSTR_MAX','LongInt'( 12); ASSOCSTR', 'DWORD ASSOCKEY_SHELLEXECCLASS','LongInt'( 1); ASSOCKEY_APP','LongInt'( 2); ASSOCKEY_CLASS','LongInt'( 3); ASSOCKEY_BASECLASS','LongInt'( 4); ASSOCKEY_MAX','LongInt'( 5); ASSOCKEY', 'DWORD ASSOCDATA_MSIDESCRIPTOR','LongInt'( 1); ASSOCDATA_NOACTIVATEHANDLER','LongInt'( 2); ASSOCDATA_QUERYCLASSSTORE','LongInt'( 3); ASSOCDATA_HASPERUSERASSOC','LongInt'( 4); ASSOCDATA_MAX','LongInt'( 5); ASSOCDATA', 'DWORD ASSOCENUM_NONE','LongInt'( 0); ASSOCENUM', 'DWORD SID_IQueryAssociations','String '{c46ca590-3c3f-11d2-bee6-0000f805ca57} SHACF_DEFAULT $00000000); SHACF_FILESYSTEM','LongWord( $00000001); SHACF_URLHISTORY','LongWord( $00000002); SHACF_URLMRU','LongWord( $00000004); SHACF_USETAB','LongWord( $00000008); SHACF_FILESYS_ONLY','LongWord( $00000010); SHACF_AUTOSUGGEST_FORCE_ON','LongWord( $10000000); SHACF_AUTOSUGGEST_FORCE_OFF','LongWord( $20000000); SHACF_AUTOAPPEND_FORCE_ON','LongWord( $40000000); SHACF_AUTOAPPEND_FORCE_OFF','LongWord( DWORD ( $80000000 )); Function SHAutoComplete( hwndEdit : HWND; dwFlags : DWORD) : HRESULT Procedure SHSetThreadRef( punk : IUnknown) Procedure SHGetThreadRef( out ppunk : IUnknown) CTF_INSIST','LongWord( $00000001); CTF_THREAD_REF','LongWord( $00000002); CTF_PROCESS_REF','LongWord( $00000004); CTF_COINIT','LongWord( $00000008); Function SHCreateShellPalette( hdc : HDC) : HPALETTE Procedure ColorRGBToHLS( clrRGB : TColorRef; out pwHue, pwLuminance, pwSaturation : WORD) Function ColorHLSToRGB( wHue, wLuminance, wSaturation : WORD) : TColorRef Function ColorAdjustLuma( clrRGB : TColorRef; n : Int; fScale : Boolean) : TColorRef Function GetSysColorBrush( nIndex : Int) : HBRUSH Function DrawFocusRect( hDC : HDC; const lprc : TRect) : BOOL Function FillRect( hDC : HDC; const lprc : TRect; hbr : HBRUSH) : Int Function FrameRect( hDC : HDC; const lprc : TRect; hbr : HBRUSH) : Int Function InvertRect( hDC : HDC; const lprc : TRect) : BOOL Function SetRect( var lprc : TRect; xLeft, yTop, xRight, yBottom : Int) : BOOL Function SetRectEmpty( var lprc : TRect) : BOOL Function CopyRect( var lprcDst : TRect; const lprcSrc : TRect) : BOOL Function InflateRect( var lprc : TRect; dx, dy : Int) : BOOL Function IntersectRect2(var lprcDst: TRect; const lprcSrc1, lprcSrc2 : TRect): BOOL Function SubtractRect( var lprcDst : TRect; const lprcSrc1, lprcSrc2 : TRect): BOOL Function InitializeFlatSB( hWnd : HWND) : Bool Procedure UninitializeFlatSB( hWnd : HWND) Function FlatSB_GetScrollProp( p1 : HWND; propIndex : Int; p3 : PInt) : Bool Function FlatSB_SetScrollProp(p1: HWND; index: Int; newValue: Int; p4 : Bool) : Bool Function GET_APPCOMMAND_LPARAM( lParam : Int) : Word //of JvWin32 Function GET_DEVICE_LPARAM( lParam : Int) : Word Function GET_MOUSEORKEY_LPARAM( lParam : Int) : Int Function GET_FLAGS_LPARAM( lParam : Int) : Word Function GET_KEYSTATE_LPARAM( lParam : Int) : Word // ******************************************** 204 unit uPSI_ShellAPI; Function DragQueryFile(Drop:HDROP;FileIndex:UINT; FileName: PChar; cb UINT): UINT Function DragQueryPoint( Drop : HDROP; var Point : TPoint): BOOL Procedure DragFinish( Drop : HDROP) Procedure DragAcceptFiles( Wnd : HWND; Accept : BOOL) Function ShellExecute(hWnd:HWND;Operation,FileName,Parameters,Directory:PChar;ShowCmd:Int):HINST Function FindExecutable( FileName, Directory : PChar; Result : PChar) : HINST Function ShellAbout( Wnd : HWND; szApp, szOtherStuff : PChar; Icon : HICON) : Int Function DuplicateIcon( hInst : HINST; Icon : HICON) : HICON Function ExtractAssociatedIcon(hInst:HINST;lpIconPath:PChar;var lpiIcon:Word):HICON Function ExtractIcon(hInst:HINST; lpszExeFileName:PChar; nIconIndex:UINT): HICON Function SHAppBarMessage( dwMessage : DWORD; var pData : TAppBarData) : UINT Function DoEnvironmentSubst( szString : PChar; cbString : UINT) : DWORD Function ExtractIconEx(lpszFile:PChar;nIconIndex:Int;var phiconLarge,phiconSmall:HICON;nIcons:UINT):UINT; Procedure SHFreeNameMappings( hNameMappings : THandle) DLLVER_PLATFORM_WINDOWS','LongWord( $00000001); DLLVER_PLATFORM_NT','LongWord( $00000002); DLLVER_MAJOR_MASK','LongWord( Int64 ( $FFFF000000000000 )); DLLVER_MINOR_MASK','LongWord( Int64 ( $0000FFFF00000000 )); DLLVER_BUILD_MASK','LongWord( Int64 ( $00000000FFFF0000 )); DLLVER_QFE_MASK','LongWord( Int64 ( $000000000000FFFF )); Function MAKEDLLVERULL( Major, Minor, Build, Qfe : Word) : Int64 Function SimpleXMLEncode( const S : string) : string Procedure SimpleXMLDecode( var S : string; TrimBlanks : Boolean) Function XMLEncode( const S : string) : string Function XMLDecode( const S : string) : string Function EntityEncode( const S : string) : string Function EntityDecode( const S : string) : string procedure RIRegister_CPort_Routines(S: TPSExec); Procedure EnumComPorts( Ports : TStrings) Procedure ListComPorts( Ports : TStrings) Procedure ComPorts( Ports : TStrings) //Alias to Arduino Function GetComPorts: TStringlist; Function StrToBaudRate( Str : string) : TBaudRate Function StrToStopBits( Str : string) : TStopBits Function StrToDataBits( Str : string) : TDataBits Function StrToParity( Str : string) : TParityBits Function StrToFlowControl( Str : string) : TFlowControl Function BaudRateToStr( BaudRate : TBaudRate) : string Function StopBitsToStr( StopBits : TStopBits) : string Function DataBitsToStr( DataBits : TDataBits) : string Function ParityToStr( Parity : TParityBits) : string Function FlowControlToStr( FlowControl : TFlowControl) : string Function ComErrorsToStr( Errors : TComErrors) : String Function GetMessage( var lpMsg : TMsg; hWnd : HWND; wMsgFilterMin, wMsgFilterMax : UINT) : BOOL Function DispatchMessage( const lpMsg : TMsg) : Longint Function TranslateMessage( const lpMsg : TMsg) : BOOL Function SetMessageQueue( cMessagesMax : Int) : BOOL Function PeekMessage(var lpMsg:TMsg; hWnd:HWND;wMsgFilterMin,wMsgFilterMax,wRemoveMsg:UINT):BOOL Function GetMessagePos : DWORD Function GetMessageTime : Longint Function GetMessageExtraInfo : Longint Function GetSpecialFolderPath( const FolderName : string; CanCreate : Boolean) : string Procedure JAddToRecentDocs( const Filename : string) Procedure ClearRecentDocs Function ExtractIconFromFile( FileName : string; Index : Int) : HICON Function CreateShellLink( const AppName, Desc : string; Dest : string) : string Procedure GetShellLinkInfo( const LinkFile : WideString; var SLI : TShellLinkInfo) Procedure SetShellLinkInfo( const LinkFile : WideString; const SLI : TShellLinkInfo) Function RecycleFile( FileToRecycle : string) : Boolean Function JCopyFile( FromFile, ToDir : string) : Boolean Function ShellObjectTypeEnumToConst( ShellObjectType : TShellObjectType) : UINT Function ShellObjectTypeConstToEnum( ShellObjectType : UINT) : TShellObjectType Function QueryServiceConfig2A( hService : SC_HANDLE; dwInfoLevel : DWORD; lpBuffer : LPBYTE; cbBufSize : DWORD; var pcbBytesNeeded : DWORD) : BOOL Function QueryServiceConfig2W( hService : SC_HANDLE; dwInfoLevel : DWORD; lpBuffer : LPBYTE; cbBufSize : DWORD; var pcbBytesNeeded : DWORD) : BOOL Function QueryServiceConfig2( hService : SC_HANDLE; dwInfoLevel : DWORD; lpBuffer : LPBYTE; cbBufSize : DWORD; var pcbBytesNeeded : DWORD) : BOOL Function EnumServicesStatusExA(hSCManager:SC_HANDLE;InfoLevel: SC_ENUM_TYPE; dwServiceType: DWORD; dwServiceState: DWORD;lpServices:LPBYTE;cbBufSize:DWORD;var pcbBytesNeeded,lpServicesReturned,lpResumeHandle:DWORD;pszGroupName: LP Function EnumServicesStatusExW( hSCManager : SC_HANDLE; InfoLevel : SC_ENUM_TYPE; dwServiceType : DWORD; dwServiceState : DWORD; lpServices:LPBYTE;cbBufSize:DWORD;var pcbBytesNeeded,lpServicesReturned,lpResumeHandle:DWORD; pszGroupNam Function EnumServicesStatusEx( hSCManager : SC_HANDLE; InfoLevel : SC_ENUM_TYPE; dwServiceType : DWORD; dwServiceState:DWORD;lpServices:LPBYTE;cbBufSize:DWORD;var pcbBytesNeeded,lpServicesReturned,lpResumeHandle:DWORD; pszGroupName Function ConvertSidToStringSid( sid : PSID; var stringSid : LPWSTR) : BOOL ******************************************* unit uPSI_JclPeImage; Function IsValidPeFile( const FileName : TFileName) : Boolean // Function PeGetNtHeaders( const FileName : TFileName; var NtHeaders : TImageNtHeaders) : Boolean Function PeCreateNameHintTable( const FileName : TFileName) : Boolean Function PeRebaseImage(const ImageName:TFileName; NewBase:DWORD; TimeStamp : DWORD; MaxNewSize:DWORD): TJclRebaseImageInfo Function PeVerifyCheckSum( const FileName : TFileName) : Boolean Function PeClearCheckSum( const FileName : TFileName) : Boolean Function PeUpdateCheckSum( const FileName : TFileName) : Boolean Function PeDoesExportFunction(const FileName:TFileName;const FuncName:string;Options:TJclSmartCompOptions):Bool; Function PeIsExportFunctionForwardedEx( const FileName : TFileName; const FunctionName:string; var ForwardedName:string;Options:TJclSmartCompOptions):Boolean Function PeIsExportFunctionForwarded(const FileName:TFileName;const FunctionName:string;Options:TJclSmartCompOptions):Bool Function PeDoesImportFunction(const FileName:TFileName;const FunctionName:string;const LibraryName:string;Options: TJclSmartCompOptions):Bool Function PeDoesImportLibrary(const FileName:TFileName;const LibraryName:string;Recursive:Boolean):Boolean); Function PeImportedLibraries( const FileName : TFileName; const LibrariesList : TStrings; Recursive : Boolean; FullPathName : Boolean) : Boolean Function PeImportedFunctions(const FileName:TFileName;const FunctionsList:TStrings;const LibraryName:string; IncludeLibNames : Boolean): Boolean Function PeExportedFunctions( const FileName : TFileName; const FunctionsList : TStrings) : Boolean Function PeExportedNames(const FileName:TFileName;const FunctionsList:TStrings):Bool Function PeExportedVariables( const FileName : TFileName; const FunctionsList : TStrings) : Boolean Function PeResourceKindNames(const FileN:TFileName;ResourceType:TJclPeResourceKind;const NamesList:TStrings):Bool Function PeBorFormNames(const FileName:TFileName;const NamesList:TStrings :Boolean Function PeBorDependedPackages(const FileName:TFileName;PackagesList:TStrings;FullPathName,Descript:Bool):Bool; Function PeFindMissingImports( const FileName : TFileName; MissingImportsList : TStrings) : Boolean; Function PeFindMissingImports1(RequiredImportsList,MissingImportsList:TStrings):Bool; Function PeCreateRequiredImportList(const FileName: TFileName; RequiredImportsList: TStrings): Boolean; //Function PeMapImgNtHeaders( const BaseAddress : Pointer) : PImageNtHeaders //Function PeMapImgLibraryName( const BaseAddress : Pointer) : string //Function PeMapImgSections( const NtHeaders : PImageNtHeaders) : PImageSectionHeader //Function PeMapImgFindSection( const NtHeaders : PImageNtHeaders; const SectionName : string) : PImageSectionHeader //Function PeMapImgExportedVariables(const Module: HMODULE; const VariablesList:TStrings):Boolean //Function PeMapImgResolvePackageThunk( Address : Pointer) : Pointer Function PeMapFindResource(const Module:HMODULE;const ResourceType:PChar;const ResourceName:string): ___Pointer; SIRegister_TJclPeSectionStream(CL); SIRegister_TJclPeMapImgHookItem(CL); SIRegister_TJclPeMapImgHooks(CL); //Function PeDbgImgNtHeaders(ProcessHandle:THandle;BaseAddress:Pointer;var NtHeaders:TImageNtHeaders):Boolean //Function PeDbgImgLibraryName(ProcessHandle:THandle; BaseAddress:Pointer; var Name:string):Boolean Type TJclBorUmSymbolKind','(skData,skFunction,skConstructor,skDestructor,skRTTI,skVTable) TJclBorUmSymbolModifier', '( smQualified, smLinkProc ) TJclBorUmSymbolModifiers', 'set of TJclBorUmSymbolModifier TJclBorUmDescription', 'record Kind : TJclBorUmSymbolKind; Modifiers : TJclBorUmSymbolModifiers; end TJclBorUmResult', '( urOk, urNotMangled, urMicrosoft, urError ) TJclPeUmResult', '( umNotMangled, umBorland, umMicrosoft ) Function PeBorUnmangleName( const Name : string; var Unmangled : string; var Description : TJclBorUmDescription; var BasePos : Int) : TJclBorUmResult; Function PeBorUnmangleName1(const Name:string;var Unmangled:string;var Descript:TJclBorUmDescription):TJclBorUmResult; Function PeBorUnmangleName2( const Name : string; var Unmangled : string) : TJclBorUmResult; Function PeBorUnmangleName3( const Name : string) : string; Function PeIsNameMangled( const Name : string) : TJclPeUmResult Function PeUnmangleName( const Name : string; var Unmangled : string) : TJclPeUmResult //****************** SysTools uPSI_StSystem; **************************************** Function StCopyFile( const SrcPath, DestPath : AnsiString) : Cardinal Function CreateTempFile( const aFolder : AnsiString; const aPrefix : AnsiString) : AnsiString Function DeleteVolumeLabel( Drive : Char) : Cardinal //Procedure EnumerateDirectories(const StartDir:AnsiStr;FL:TStrings;SubDirs:Bool;IncludeItem:TIncludeItemFunc); //Procedure EnumerateFiles(const StartDir:AnsiString;FL:TStrings;SubDirs:Bool IncludeItem:TIncludeItemFunc); Function FileHandlesLeft( MaxHandles : Cardinal) : Cardinal Function FileMatchesMask( const FileName, FileMask : AnsiString) : Boolean Function FileTimeToStDateTime( FileTime : LongInt) : TStDateTimeRec Function FindNthSlash( const Path : AnsiString; n : Int) : Int Function FlushOsBuffers( Handle : Int) : Boolean Function GetCurrentUser : AnsiString Function GetDiskClass( Drive : Char) : DiskClass Function GetDiskInfo(Drive:Char;var ClustersAvail,TotalClusters,BytesPerSector,SectorsPerCluster:Cardinal):Bool; Function GetDiskSpace(Drive:Char;var UserSpaceAvail:Double;var TotalSpaceAvail:Double;var DiskSize:Double):Bool; Function GetDiskSpace(Drive:Char;var UserSpaceAvail:Comp;var TotalSpaceAvail:Comp;var DiskSize:Comp):Boolean; { index 0 - FreeBytesAvailable, 1 - TotalNumberOfBytes, 2 - TotalNumberOfFreeBytes } Function getDiskSpace2(const path: String; index: Int): int64; Function GetFileCreateDate( const FileName : AnsiString) : TDateTime Function StGetFileLastAccess( const FileName : AnsiString) : TDateTime Function GetFileLastModify( const FileName : AnsiString) : TDateTime Function GetHomeFolder( aForceSlash : Boolean) : AnsiString Function GetLongPath( const APath : AnsiString) : AnsiString Function GetMachineName : AnsiString Function GetMediaID( Drive : Char; var MediaIDRec : MediaIDType) : Cardinal Function GetParentFolder( const APath : AnsiString; aForceSlash : Boolean) : AnsiString Function GetShortPath( const APath : AnsiString) : AnsiString Function GetSystemFolder( aForceSlash : Boolean) : AnsiString Function GetTempFolder( aForceSlash : boolean) : AnsiString Function StGetWindowsFolder( aForceSlash : boolean) : AnsiString Function GetWorkingFolder( aForceSlash : boolean) : AnsiString Function GlobalDateTimeToLocal( const UTC : TStDateTimeRec; MinOffset : Int) : TStDateTimeRec Function StIsDirectory( const DirName : AnsiString) : Boolean Function IsDirectoryEmpty( const S : AnsiString) : Int Function IsDriveReady( Drive : Char) : Boolean Function IsFile( const FileName : AnsiString) : Boolean Function IsFileArchive( const S : AnsiString) : Int Function IsFileHidden( const S : AnsiString) : Int Function IsFileReadOnly( const S : AnsiString) : Int Function IsFileSystem( const S : AnsiString) : Int Function LocalDateTimeToGlobal( const DT1 : TStDateTimeRec; MinOffset : Int) : TStDateTimeRec Function ReadVolumeLabel( var VolName : AnsiString; Drive : Char) : Cardinal Function SameFile( const FilePath1, FilePath2 : AnsiString; var ErrorCode : Int) : Boolean Function SetMediaID( Drive : Char; var MediaIDRec : MediaIDType) : Cardinal Procedure SplitPath( const APath : AnsiString; Parts : TStrings) Function StDateTimeToFileTime( const FileTime : TStDateTimeRec) : LongInt Function StDateTimeToUnixTime( const DT1 : TStDateTimeRec) : Longint Function UnixTimeToStDateTime( UnixTime : Longint) : TStDateTimeRec Function ValidDrive( Drive : Char) : Boolean Function WriteVolumeLabel( const VolName : AnsiString; Drive : Char) : Cardinal //*****************************unit uPSI_JclLANMan;******************************************* Function CreateAccount( const Server, Username, Fullname, Password, Description, Homedir, Script : string; const PasswordNeverExpires : Boolean) : Boolean Function CreateLocalAccount( const Username, Fullname, Password, Description, Homedir, Script : string; const PasswordNeverExpires : Boolean) : Boolean Function DeleteAccount( const Servername, Username : string) : Boolean Function DeleteLocalAccount( Username : string) : Boolean Function CreateLocalGroup( const Server, Groupname, Description : string) : Boolean Function CreateGlobalGroup( const Server, Groupname, Description : string) : Boolean Function DeleteLocalGroup( const Server, Groupname : string) : Boolean Function GetLocalGroups( const Server : string; const Groups : TStrings) : Boolean Function GetGlobalGroups( const Server : string; const Groups : TStrings) : Boolean Function LocalGroupExists( const Group : string) : Boolean Function GlobalGroupExists( const Server, Group : string) : Boolean Function AddAccountToLocalGroup( const Accountname, Groupname : string) : Boolean Function LookupGroupName( const Server : string; const RID : TNetWellKnownRID) : string Procedure ParseAccountName( const QualifiedName : string; var Domain, UserName : string) Function IsLocalAccount( const AccountName : string) : Boolean Function TimeStampInterval( StartStamp, EndStamp : TDateTime) : Int Function GetRandomString( NumChar : cardinal) : string //*****************************unit uPSI_cUtils;******************************************* TypeS('TUnitType', '( utSrc, utHead, utRes, utPrj, utOther ) Function cIsWinNT : boolean Procedure cFilesFromWildcard(Directory,Mask: string;var Files:TStringList;Subdirs,ShowDirs,Multitasking:Boolean; Function cExecuteFile( const FileName, Params, DefaultDir : string; ShowCmd : Int) : THandle Function cRunAndGetOutput(Cmd,WorkDir:string; ErrFunc:TErrFunc;LineOutputFunc:TLineOutputFunc; CheckAbortFunc:TCheckAbortFunc;ShowReturnValue:Bool):string Function cGetShortName( FileName : string) : string Procedure cShowError( Msg : String) Function cCommaStrToStr( s : string; formatstr : string) : string Function cIncludeQuoteIfSpaces( s : string) : string Function cIncludeQuoteIfNeeded( s : string) : string Procedure cLoadFilefromResource( const FileName : string; ms : TMemoryStream) Function cValidateFile(const FileName:string; const WorkPath:string;const CheckDirs:boolean):string; Function cBuildFilter( var value : string; const FLTStyle : TFILTERSET) : boolean; Function cBuildFilter1( var value : string; const _filters : array of string) : boolean; Function cCodeInstoStr( s : string) : string Function cStrtoCodeIns( s : string) : string Procedure cStrtoAttr( var Attr : TSynHighlighterAttributes; Value : string) Function cAttrtoStr( const Attr : TSynHighlighterAttributes) : string Procedure cStrtoPoint( var pt : TPoint; value : string) Function cPointtoStr( const pt : TPoint) : string Function cListtoStr( const List : TStrings) : string Function ListtoStr( const List : TStrings) : string Procedure StrtoList( s : string; const List : TStrings; const delimiter : char) Procedure cStrtoList( s : string; const List : TStrings; const delimiter : char) Function cGetFileTyp( const FileName : string) : TUnitType Function cGetExTyp( const FileName : string) : TExUnitType Procedure cSetPath( Add : string; const UseOriginal : boolean) Function cExpandFileto( const FileName : string; const BasePath : string) : string Function cFileSamePath( const FileName : string; const TestPath : string) : boolean Procedure cCloneMenu( const FromMenu : TMenuItem; ToMenu : TMenuItem) Function cGetLastPos( const SubStr : string; const S : string) : Int Function cGenMakePath( FileName : String) : String; Function cGenMakePath2( FileName : String) : String Function cGenMakePath1(FileName: String; EscapeSpaces,EncloseInQuotes:Bool):String; Function cGetRealPath( BrokenFileName : String; Directory : String) : String Function cCalcMod( Count : Int) : Int Function cGetVersionString( FileName : string) : string Function cCheckChangeDir( var Dir : string) : boolean Function cGetAssociatedProgram(const Extension:string; var Filename,Description: string):boolean Function cIsNumeric( s : string) : boolean Procedure StrtoAttr( var Attr : TSynHighlighterAttributes; Value : string) Function AttrtoStr( const Attr : TSynHighlighterAttributes) : string Function GetFileTyp( const FileName : string) : TUnitType Function Atoi(const aStr: string): Int Function Itoa(const aint: Int): string Function Atof(const aStr: string): double; Function Atol(const aStr: string): longint; procedure SIRegister_cHTTPUtils(CL: TPSPascalCompiler); begin FindClass('TOBJECT'),'EHTTP FindClass('TOBJECT'),'EHTTPParser //AnsiCharSet', 'set of AnsiChar AnsiStringArray', 'array of AnsiString THTTPProtocolEnum', '( hpNone, hpCustom, hpHTTP, hpHTTPS ) THTTPVersionEnum', '( hvNone, hvCustom, hvHTTP10, hvHTTP11 ) THTTPVersion', 'record Version : THTTPVersionEnum; Protocol : TH' +'TTPProtocolEnum; CustomProtocol : AnsiString; CustomMajVersion : Int; ' +'CustomMinVersion : Int; end THTTPHeaderNameEnum', '( hntCustom, hntHost, hntContentType, hnt' +'ContentLength, hntContentTransferEncoding, hntContentLocation, hntContentL' +'anguage, hntContentEncoding, hntTransferEncoding, hntDate, hntServer, hntU' +'serAgent, hntLocation, hntConnection, hntExpires, hntCacheControl, hntSetC' +'ookie, hntCookie, hntAuthorization, hntVia, hntWarning, hntContentRange, h' +'ntXForwardedFor, hntPragma, hntXPoweredBy, hntWWWAuthenticate, hntLastModi' +'fied, hntETag, hntProxyAuthorization, hntReferer, hntAge, hntAcceptRanges,' +' hntAcceptEncoding, hntAcceptLanguage, hntAcceptCharset, hntIfModifiedSinc' +'e, hntIfUnmodifiedSince, hntRetryAfter, hntUpgrade, hntStatus, hntProxyCon' +'nection, hntOrigin, hntKeepAlive ) THTTPHeaderName', 'record Value : THTTPHeaderNameEnum; Custom: AnsiString; end THTTPCustomHeader', 'record FieldName : AnsiString; FieldValue :' +' AnsiString; end //PHTTPCustomHeader', '^THTTPCustomHeader // will not work THTTPContentLengthEnum', '( hcltNone, hcltByteCount ) THTTPContentLength', 'record Value : THTTPContentLengthEnum; ByteCount:Int64; end //PHTTPContentLength', '^THTTPContentLength // will not work THTTPContentTypeMajor', '( hctmCustom, hctmText, hctmImage ) THTTPContentTypeEnum', '( hctNone, hctCustomParts, hctCustomStri' +'ng, hctTextHtml, hctTextAscii, hctTextCss, hctTextPlain, hctTextXml, hctTe' +'xtCustom, hctImageJpeg, hctImagePng, hctImageGif, hctImageCustom, hctAppli' +'cationJSON, hctApplicationOctetStream, hctApplicationJavaScript, hctApplic' +'ationCustom, hctAudioCustom, hctVideoCustom ) THTTPContentType', 'record Value : THTTPContentTypeEnum; CustomM' +'ajor : AnsiString; CustomMinor : AnsiString; Parameters : AnsiStringArray;' +' CustomStr : AnsiString; end THTTPDateFieldEnum', '( hdNone, hdCustom, hdParts, hdDateTime ) THTTPDateField', 'record Value : THTTPDateFieldEnum; DayOfWeek :' +' Int; Day : Int; Month : Int; Year : Int; Hour : Int; ' +'Min : Int; Sec : Int; TimeZoneGMT : Boolean; CustomTimeZone : Ansi' +'String; DateTime : TDateTime; Custom : AnsiString; end THTTPTransferEncodingEnum', '( hteNone, hteCustom, hteChunked ) THTTPTransferEncoding', 'record Value : THTTPTransferEncodingEnu' +'m; Custom : AnsiString; end THTTPConnectionFieldEnum', '( hcfNone, hcfCustom, hcfClose, hcfKeepAlive ) THTTPConnectionField', 'record Value : THTTPConnectionFieldEnum;' +' Custom : AnsiString; end THTTPAgeFieldEnum', '( hafNone, hafCustom, hafAge ) THTTPAgeField', 'record Value: THTTPAgeFieldEnum; Age : Int64;Custom:AnsiString; end THTTPCacheControlFieldEnum', '( hccfNone, hccfDecoded, hccfCustom ) THTTPCacheControlRequestSubField', '( hccsfNoCache, hccsfNoStore' +', hccsfMaxAge, hccsfMaxStale, hccsfMinFresh, hccsfNoTransform, hccsfOnlyIfCached ) THTTPCacheControlResponseSubField', '( hccrfPublic, hccrfPrivate' +', hccrfNoCache, hccrfNoStore, hccrfNoTransform, hccrfMustRevalidate, hccrf' +'ProxyRevalidate, hccrfMaxAge, hccrfSMaxAge ) THTTPCacheControlField', 'record Value : THTTPCacheControlFieldEnum; end THTTPContentEncodingEnum', '( hceNone, hceCustom, hceIdentity, h' +'ceCompress, hceDeflate, hceExi, hceGzip, hcePack200Gzip ) THTTPContentEncoding','record Value:THTTPContentEncodingEnum;Custom:AnsiString;end; THTTPContentEncodingFieldEnum', '( hcefNone, hcefList ) THTTPContentEncodingField', 'record Value : THTTPContentEncoding' +'FieldEnum; List : array of THTTPContentEncoding; end THTTPRetryAfterFieldEnum', '( hrafNone, hrafCustom, harfDate, harfSeconds ) THTTPRetryAfterField', 'record Value : THTTPRetryAfterFieldEnum;' +' Custom : AnsiString; Date : TDateTime; Seconds : Int64; end THTTPContentRangeFieldEnum', '( hcrfNone, hcrfCustom, hcrfByteRange ) THTTPContentRangeField', 'record Value : THTTPContentRangeFieldE' +'num; ByteFirst : Int64; ByteLast : Int64; ByteSize : Int64; Custom : AnsiString; end THTTPSetCookieFieldEnum', '( hscoNone, hscoDecoded, hscoCustom ) THTTPSetCookieCustomField', 'record Name : AnsiString; Value : AnsiString; end THTTPSetCookieCustomFieldArray', 'array of THTTPSetCookieCustomField THTTPSetCookieField', 'record Value : THTTPSetCookieFieldEnum; D' +'omain : AnsiString; Path : AnsiString; Expires : THTTPDateField; MaxAge : ' +'Int64; HttpOnly : Boolean; Secure : Boolean; CustomFields : THTTPSetCookie' +'CustomFieldArray; Custom : AnsiString; end //PHTTPSetCookieField', '^THTTPSetCookieField // will not work THTTPSetCookieFieldArray', 'array of THTTPSetCookieField THTTPCookieFieldEnum', '( hcoNone, hcoDecoded, hcoCustom ) THTTPCookieFieldEntry', 'record Name : AnsiString; Value : AnsiString; end //PHTTPCookieFieldEntry', '^THTTPCookieFieldEntry // will not work THTTPCookieFieldEntryArray', 'array of THTTPCookieFieldEntry THTTPCookieField', 'record Value : THTTPCookieFieldEnum; Entries' +' : THTTPCookieFieldEntryArray; Custom : AnsiString; end THTTPCommonHeaders', 'record TransferEncoding : THTTPTransferEnc' +'oding; ContentType : THTTPContentType; ContentLength : THTTPContentLength;' +' Connection : THTTPConnectionField; ProxyConnection : THTTPConnectionField' +'; Date : THTTPDateField; ContentEncoding : THTTPContentEncodingField; end THTTPCustomHeaders', 'array of THTTPCustomHeader //THTTPFixedHeaders','array[THTTPHeaderNameEnum] of AnsiString THTTPFixedHeaders','array[0..42] of AnsiString THTTPMethodEnum', '( hmNone, hmCustom, hmGET, hmPUT, hmPOST, hmC' +'ONNECT, hmHEAD, hmDELETE, hmOPTIONS, hmTRACE ) THTTPMethod', 'record Value : THTTPMethodEnum; Custom : AnsiString; end THTTPRequestStartLine','record Method: THTTPMethod;URI: AnsiString;Version:THTTPVersion; end THTTPRequestHeader', 'record CommonHeaders : THTTPCommonHeaders;' +' FixedHeaders : THTTPFixedHeaders; CustomHeaders : THTTPCustomHeaders; Coo' +'kie:THTTPCookieField; IfModifiedSince:THTTPDateField;IfUnmodifiedSince:THTTPDateField;end //PHTTPRequestHeader', '^THTTPRequestHeader // will not work THTTPRequest', 'record StartLine : THTTPRequestStartLine; Header' +' : THTTPRequestHeader; HeaderComplete : Boolean; HasContent : Boolean; end THTTPResponseStartLineMessage', '( hslmNone, hslmCustom, hslmOK) THTTPResponseStartLine', 'record Version : THTTPVersion; Code : ' +'Int; Msg : THTTPResponseStartLineMessage; CustomMsg : AnsiString; end THTTPResponseHeader', 'record CommonHeaders : THTTPCommonHeaders' +'; FixedHeaders : THTTPFixedHeaders; CustomHeaders : THTTPCustomHeaders; Co' +'okies : THTTPSetCookieFieldArray; Expires : THTTPDateField; LastModified :' +' THTTPDateField; Age : THTTPAgeField; end //PHTTPResponseHeader', '^THTTPResponseHeader // will not work THTTPResponse', 'record StartLine : THTTPResponseStartLine; Head' +'er : THTTPResponseHeader; HeaderComplete : Boolean; HasContent : Boolean; end Function HTTPMessageHasContent( const H : THTTPCommonHeaders) : Boolean Procedure InitHTTPRequest( var A : THTTPRequest) Procedure InitHTTPResponse( var A : THTTPResponse) Procedure ClearHTTPVersion( var A : THTTPVersion) Procedure ClearHTTPContentLength( var A : THTTPContentLength) Procedure ClearHTTPContentType( var A : THTTPContentType) Procedure ClearHTTPDateField( var A : THTTPDateField) Procedure ClearHTTPTransferEncoding( var A : THTTPTransferEncoding) Procedure ClearHTTPConnectionField( var A : THTTPConnectionField) Procedure ClearHTTPAgeField( var A : THTTPAgeField) Procedure ClearHTTPContentEncoding( var A : THTTPContentEncoding) Procedure ClearHTTPContentEncodingField( var A : THTTPContentEncodingField) Procedure ClearHTTPContentRangeField( var A : THTTPContentRangeField) Procedure ClearHTTPSetCookieField( var A : THTTPSetCookieField) Procedure ClearHTTPCommonHeaders( var A : THTTPCommonHeaders) //Procedure ClearHTTPFixedHeaders( var A : THTTPFixedHeaders) Procedure ClearHTTPCustomHeaders( var A : THTTPCustomHeaders) Procedure ClearHTTPCookieField( var A : THTTPCookieField) Procedure ClearHTTPMethod( var A : THTTPMethod) Procedure ClearHTTPRequestStartLine( var A : THTTPRequestStartLine) Procedure ClearHTTPRequestHeader( var A : THTTPRequestHeader) Procedure ClearHTTPRequest( var A : THTTPRequest) Procedure ClearHTTPResponseStartLine( var A : THTTPResponseStartLine) Procedure ClearHTTPResponseHeader( var A : THTTPResponseHeader) Procedure ClearHTTPResponse( var A : THTTPResponse) THTTPStringOption', '( hsoNone ) THTTPStringOptions', 'set of THTTPStringOption FindClass('TOBJECT'),'TAnsiStringBuilder Procedure BuildStrHTTPVersion(const A:THTTPVersion;const B:TAnsiStringBuilder; P:THTTPStringOptions; Procedure BuildStrHTTPContentLengthValue(const A:THTTPContentLength;B:TAnsiStringBuilder;P:THTTPStringOptions) Procedure BuildStrHTTPContentLength(const A : THTTPContentLength; B:TAnsiStringBuilder;P:THTTPStringOptions) Procedure BuildStrHTTPContentTypeValue(const A:THTTPContentType;B:TAnsiStringBuilder;const P:THTTPStringOptions) Procedure BuildStrHTTPContentType(const A:THTTPContType;const B:TAnsiStringBuilder; const P:THTTPStringOptions) Procedure BuildStrRFCDateTime(const DOW,Da,Mo,Ye,Ho,Mi,Se:Int;const TZ:AnsiString;const B:TAnsiStringBuilder;const P:THTTPStringOptions) Procedure BuildStrHTTPDateFieldValue( const A : THTTPDateField; const B : TAnsiStringBuilder; const P : THTTPStringOptions) Procedure BuildStrHTTPDateField(const A:THTTPDateField;const B:TAnsiStringBuilder;const P:THTTPStringOptions); Procedure BuildStrHTTPTransferEncodingValue( const A : THTTPTransferEncoding; const B : TAnsiStringBuilder; const P : THTTPStringOptions) Procedure BuildStrHTTPTransferEncoding( const A : THTTPTransferEncoding; const B : TAnsiStringBuilder; const P : THTTPStringOptions) Procedure BuildStrHTTPContentRangeField( const A : THTTPContentRangeField; const B : TAnsiStringBuilder; const P : THTTPStringOptions) Procedure BuildStrHTTPConnectionFieldValue( const A : THTTPConnectionField; const B : TAnsiStringBuilder; const P : THTTPStringOptions) Procedure BuildStrHTTPConnectionField( const A : THTTPConnectionField; const B : TAnsiStringBuilder; const P : THTTPStringOptions) Procedure BuildStrHTTPAgeField(const A:THTTPAgeField;const B:TAnsiStringBuilder;const P:THTTPStringOptions); Procedure BuildStrHTTPContentEncoding( const A : THTTPContentEncoding; const B : TAnsiStringBuilder; const P : THTTPStringOptions) Procedure BuildStrHTTPContentEncodingField(const A:THTTPContentEncodingField;const B:TAnsiStringBuilder;const P:THTTPStringOptions) Procedure BuildStrHTTPProxyConnectionField(const A : THTTPConnectionField; const B : TAnsiStringBuilder; const P : THTTPStringOptions) Procedure BuildStrHTTPCommonHeaders( const A: THTTPCommonHeaders; const B : TAnsiStringBuilder; const P : THTTPStringOptions) Procedure BuildStrHTTPFixedHeaders(const A:THTTPFixedHeaders;const B:TAnsiStrBuilder;const P:THTTPStringOptions) Procedure BuildStrHTTPCustomHeaders( const A : THTTPCustomHeaders; const B : TAnsiStringBuilder; const P : THTTPStringOptions) Procedure BuildStrHTTPSetCookieFieldValue( const A : THTTPSetCookieField; const B : TAnsiStringBuilder; const P : THTTPStringOptions) Procedure BuildStrHTTPCookieFieldValue( const A : THTTPCookieField; const B : TAnsiStringBuilder; const P : THTTPStringOptions) Procedure BuildStrHTTPCookieField(const A:THTTPCookieField;const B:TAnsiStrBuilder;const P:THTTPStringOptions); Procedure BuildStrHTTPMethod(const A:THTTPMethod;const B:TAnsiStringBuilder;const P: THTTPStringOptions) Procedure BuildStrHTTPRequestStartLine( const A : THTTPRequestStartLine; const B : TAnsiStringBuilder; const P : THTTPStringOptions) Procedure BuildStrHTTPRequestHeader(const A:THTTPRequestHeader;const B:TAnsiStringBuilder;const P:THTTPStrOptions); Procedure BuildStrHTTPRequest(const A : THTTPRequest; const B: TAnsiStringBuilder; const P : THTTPStringOptions) Procedure BuildStrHTTPResponseCookieFieldArray( const A : THTTPSetCookieFieldArray; const B : TAnsiStringBuilder; const P : THTTPStringOptions) Procedure BuildStrHTTPResponseStartLine(const A:THTTPResponsStartLine;const B:TAnsiStrBldr;const P THTTPStrOptions); Procedure BuildStrHTTPResponseHeader(const A:THTTPRespHeader;const B:TAnsiStrBuilder;const P:THTTPStringOptions); Procedure BuildStrHTTPResponse(const A:THTTPResponse; const B:TAnsiStringBuilder; const P:THTTPStringOptions); Function HTTPContentTypeValueToStr( const A : THTTPContentType) : AnsiString Function HTTPSetCookieFieldValueToStr( const A : THTTPSetCookieField) : AnsiString Function HTTPCookieFieldValueToStr( const A : THTTPCookieField) : AnsiString Function HTTPMethodToStr( const A : THTTPMethod) : AnsiString Function HTTPRequestToStr( const A : THTTPRequest) : AnsiString Function HTTPResponseToStr( const A : THTTPResponse) : AnsiString Procedure PrepareCookie(var A:THTTPCookieField;const B:THTTPSetCookieFieldArray;const Domain:AnsiString;const Secure:Bool; THTTPParserHeaderParseFunc','Function (const HeaderName : THTT' +PHeaderNameEnum; const HeaderPtr : ___Pointer) : Boolean SIRegister_THTTPParser(CL); FindClass('TOBJECT'),'THTTPContentDecoder THTTPContentDecoderProc', 'Procedure ( const Sender : THTTPContentDecoder) THTTPContentDecoderContentType', '( crctFixedSize, crctChunked, crctUnsized ) THTTPContentDecoderChunkState', '( crcsChunkHeader, crcsContent,' +' crcsContentCRLF, crcsTrailer, crcsFinished ) THTTPContentDecoderLogEvent', 'Procedure ( const Sender : THTTPContentDecoder; const LogMsg : String) SIRegister_THTTPContentDecoder(CL); THTTPContentReaderMechanism', '( hcrmEvent, hcrmString, hcrmStream, hcrmFile ) FindClass('TOBJECT'),'THTTPContentReader THTTPContentReaderProc', 'Procedure ( const Sender : THTTPContentReader) THTTPContentReaderLogEvent','Procedure(const Sender:THTTPContentReader;const LogMsg:String;const LogLevel:Int; SIRegister_THTTPContentReader(CL); THTTPContentWriterMechanism','(hctmEvent, hctmString, hctmStream, hctmFile ) FindClass('TOBJECT'),'THTTPContentWriter THTTPContentWriterLogEvent', 'Procedure (const Sender : THTTPContentWriter;const LogMsg:AnsiString); SIRegister_THTTPContentWriter(CL); Procedure SelfTestcHTTPUtils end; (*----------------------------------------------------------------------------*) procedure SIRegister_cTLSUtils(CL: TPSPascalCompiler); begin 'TLSLibraryVersion','String '1.00 'TLSError_None','LongInt'( 0); 'TLSError_InvalidBuffer','LongInt'( 1); 'TLSError_InvalidParameter','LongInt'( 2); 'TLSError_InvalidCertificate','LongInt'( 3); 'TLSError_InvalidState','LongInt'( 4); 'TLSError_DecodeError','LongInt'( 5); 'TLSError_BadProtocol','LongInt'( 6); Function TLSErrorMessage( const TLSError : Int) : String SIRegister_ETLSError(CL); TTLSProtocolVersion', 'record major : Byte; minor : Byte; end PTLSProtocolVersion', '^TTLSProtocolVersion // will not work Procedure InitSSLProtocolVersion30( var A : TTLSProtocolVersion) Procedure InitTLSProtocolVersion10( var A : TTLSProtocolVersion) Procedure InitTLSProtocolVersion11( var A : TTLSProtocolVersion) Procedure InitTLSProtocolVersion12( var A : TTLSProtocolVersion) Function IsTLSProtocolVersion( const A, B : TTLSProtocolVersion) : Boolean Function IsSSL2( const A : TTLSProtocolVersion) : Boolean Function IsSSL3( const A : TTLSProtocolVersion) : Boolean Function IsTLS10( const A : TTLSProtocolVersion) : Boolean Function IsTLS11( const A : TTLSProtocolVersion) : Boolean Function IsTLS12( const A : TTLSProtocolVersion) : Boolean Function IsTLS10OrLater( const A : TTLSProtocolVersion) : Boolean Function IsTLS11OrLater( const A : TTLSProtocolVersion) : Boolean Function IsTLS12OrLater( const A : TTLSProtocolVersion) : Boolean Function IsFutureTLSVersion( const A : TTLSProtocolVersion) : Boolean Function IsKnownTLSVersion( const A : TTLSProtocolVersion) : Boolean Function TLSProtocolVersionToStr( const A : TTLSProtocolVersion) : String Function TLSProtocolVersionName( const A : TTLSProtocolVersion) : String PTLSRandom', '^TTLSRandom // will not work Procedure InitTLSRandom( var Random : TTLSRandom) Function TLSRandomToStr( const Random : TTLSRandom) : AnsiString 'TLSSessionIDMaxLen','LongInt'( 32); Procedure InitTLSSessionID( var SessionID : TTLSSessionID; const A : AnsiString) Function EncodeTLSSessionID(var Buffer:string;const Size:Int;const SessionID:TTLSSessionID):Int; Function DecodeTLSSessionID(const Buffer:string;const Size:Int;var SessionID:TTLSSessionID):Int; TTLSSignatureAndHashAlgorithm', 'record Hash : TTLSHashAlgorithm' +'; Signature : TTLSSignatureAlgorithm; end // PTLSSignatureAndHashAlgorithm', '^TTLSSignatureAndHashAlgorithm +'// will not work TTLSSignatureAndHashAlgorithmArray', 'array of TTLSSignatureAndHashAlgorithm TTLSKeyExchangeAlgorithm', '( tlskeaNone, tlskeaNULL, tlskeaDHE_' +'DSS, tlskeaDHE_RSA, tlskeaDH_Anon, tlskeaRSA, tlskeaDH_DSS, tlskeaDH_RSA ) TTLSMACAlgorithm', '( tlsmaNone, tlsmaNULL, tlsmaHMAC_MD5, tlsma' +'HMAC_SHA1, tlsmaHMAC_SHA256, tlsmaHMAC_SHA384, tlsmaHMAC_SHA512 ) TTLSMacAlgorithmInfo', 'record Name : AnsiString; DigestSize : I' +'nteger; Supported : Boolean; end PTLSMacAlgorithmInfo', '^TTLSMacAlgorithmInfo // will not work 'TLS_MAC_MAXDIGESTSIZE','LongInt'( 64); TTLSPRFAlgorithm', '( tlspaSHA256 ) Function tlsP_MD5( const Secret, Seed : AnsiString; const Size : Int) : AnsiString Function tlsP_SHA1( const Secret, Seed : AnsiString; const Size : Int) : AnsiString Function tlsP_SHA256( const Secret, Seed : AnsiString; const Size : Int) : AnsiString Function tlsP_SHA512( const Secret, Seed : AnsiString; const Size : Int) : AnsiString Function tls10PRF( const Secret, ALabel, Seed : AnsiString; const Size : Int) : AnsiString Function tls12PRF_SHA256( const Secret, ALabel, Seed : AnsiString; const Size : Int) : AnsiString Function tls12PRF_SHA512( const Secret, ALabel, Seed : AnsiString; const Size : Int) : AnsiString Function TLSPRF(const ProtoVersion:TTLSProtocolVersion;const Secret,ALabel,Seed:AString;const Size:Int):AString; Function tls10KeyBlock(const MasterSecret,ServerRandom,ClientRandom:AnsiString;const Size:Int):AnsiString Function tls12SHA256KeyBlock(const MasterSecret,ServerRandom,ClientRandom: AnsiString;const Size:Int):AnsiString; Function tls12SHA512KeyBlock(const MasterSecret,ServerRandom,ClientRandom: AnsiString;const Size:Int):AnsiString; Function TLSKeyBlock(const ProtocolVersion:TTLSProtocolVersion;const MasterSecret,ServerRandom,ClientRandom: AnsiString;const Size:Int):AnsiString Function tls10MasterSecret(const PreMasterSecret,ClientRandom, ServerRandom:AnsiString) :AnsiString; Function tls12SHA256MasterSecret(const PreMasterSecret,ClientRandom,ServerRandom:AnsiString):AnsiString; Function tls12SHA512MasterSecret(const PreMasterSecret,ClientRandom,ServerRandom:AnsiString): AnsiString; Function TLSMasterSecret(const ProtocolVersion:TTLSProtocolVersion;const PreMasterSecret,ClientRandom,ServerRandom:AnsiString):AnsiString TTLSKeys', 'record KeyBlock : AnsiString; ClientMACKey : AnsiStr' +'ing; ServerMACKey : AnsiString; ClientEncKey : AnsiString; ServerEncKey : ' +'AnsiString; ClientIV : AnsiString; ServerIV : AnsiString; end Procedure GenerateTLSKeys( const ProtocolVersion: TTLSProtocolVersion; const MACKeyBits,CipherKeyBits,IVBits: Int; const MasterSecret, ServerRandom, ClientRandom : AnsiString; var TLSKeys : TTLSKeys) Procedure GenerateFinalTLSKeys(const ProtocolVersion:TTLSProtocolVersion;const IsExportable:Boolean;const ExpandedKeyBits:Int;const ServerRandom,ClientRandom:AnsiString;var TLSKeys:TTLSKeys) 'TLS_PLAINTEXT_FRAGMENT_MAXSIZE','LongInt'( 16384 - 1); 'TLS_COMPRESSED_FRAGMENT_MAXSIZE','LongInt'( 16384 + 1024); Procedure SelfTestcTLSUtils end; (*----------------------------------------------------------------------------*) procedure SIRegister_Reversi(CL: TPSPascalCompiler); begin sPosData','record corner:boolean;square2x2:boolean;edge:boolean;stable:Int;internal:Int; disks:Int;mx:Int;my:Int; end // pBoard', '^tBoard // will not work Function rCalculateData( cc : byte; cx, cy : Int) : sPosData Function rCheckMove( color : byte; cx, cy : Int) : Int //Function rDoStep( data : pBoard) : word Function winExecAndWait( const sAppPath : string; wVisible : word) : boolean end; procedure SIRegister_IWDBCommon(CL: TPSPascalCompiler); begin Function InEditMode( ADataset : TDataset) : Boolean Function CheckDataSource( ADataSource : TDataSource) : Boolean; Function CheckDataSource1(ADataSource:TDataSource;const AFieldName:string;var VField:TField):boolean; Function GetFieldText( AField : TField) : String end; procedure SIRegister_SortGrid(CL: TPSPascalCompiler); begin TPrintMode', '( pmPrint, pmPreview, pmPageCount ) TMyPrintRange', '( prAll, prSelected ) TSortStyle', '( ssAutomatic, ssNormal, ssNumeric, ssNumericExtended, ssDateTime, ssTime, ssCustom ) TSortDirection', '( sdAscending, sdDescending ) TSetChecked', 'Procedure ( Sender : TObject; ACol, ARow : Int; State : Boolean) TGetCombobox', 'Procedure ( Sender : TObject; ACol, ARow : integ' +'er; var Strs : TStringList; var Width, Height : Int; var Sorted : Boolean) TSetCombobox', 'Procedure ( Sender : TObject; ACol, ARow : Int; Str : String) TSetEllipsis', 'Procedure ( Sender : TObject; ACol, ARow : Int) SIRegister_TSortOptions(CL); SIRegister_TPrintOptions(CL); TSortedListEntry', 'record Str : String; RowNum : Int; SortOption : TSortOptions; end SIRegister_TSortedList(CL); TCellBevelStyle', '( cbNone, cbRaised, cbLowered ) TCellBevel', 'record Style: TCellBevelStyle;UpperLeftColor:TColor;LowerRightColor:TColor; end TVertAlignment', '( taTopJustify, taBottomJustify, taMiddle ) TFormatOptions', 'record Brush : TBrush; Font : TFont; Alignment' +'Horz : TAlignment; AlignmentVert: TVertAlignment; Bevel:TCellBevel; HideText:Boolean; end SIRegister_TFontSetting(CL); SIRegister_TFontList(CL); AddTypeS(TFormatDrawCellEvent', 'Procedure ( Sender : TObject; Col, Row :' + Int;State:TGridDrawState;var FormatOptions:TFormatOptions;var CheckBox,Combobox,Ellipsis:Bool); TSetFilterEvent', 'Procedure ( ARows : TStrings; var Accept : Boolean) TSearchEvent', 'Procedure ( ARows : TStrings; var Accept : Boolean) TUpdateGridEvent', 'Procedure ( Sender : TObject; ARow : Int) TSizeChangedEvent', 'Procedure ( Sender : TObject; OldColCount, OldRowCount : Int) TBeginSortEvent', 'Procedure ( Sender : TObject; var Col : Int) TEndSortEvent', 'Procedure ( Sender : TObject; Col : Int) TGetSortStyleEvent', 'Procedure ( Sender : TObject; Col : integer; var SortStyle : TSortStyle) TCellValidateEvent', 'Procedure ( Sender : TObject; ACol, ARow :' +' Int; const OldValue : string; var NewValue : String; var Valid : Boolean) SIRegister_TSortGrid(CL); Function ExtendedCompare( const Str1, Str2 : String) : Int Function NormalCompare( const Str1, Str2 : String) : Int Function DateTimeCompare( const Str1, Str2 : String) : Int Function NumericCompare( const Str1, Str2 : String) : Int Function TimeCompare( const Str1, Str2 : String) : Int //Function Compare( Item1, Item2 : Pointer) : Int end; ************************************ procedure Register_IB(CL: TPSPascalCompiler); Procedure IBAlloc( var P, OldSize, NewSize : Int) Procedure IBError( ErrMess : TIBClientError; const Args : array of const) Procedure IBDataBaseError Function StatusVector : PISC_STATUS Function StatusVectorArray : PStatusVector Function CheckStatusVector( ErrorCodes : array of ISC_STATUS) : Boolean Function StatusVectorAsText : string Procedure SetIBDataBaseErrorMessages( Value : TIBDataBaseErrorMessages) Function GetIBDataBaseErrorMessages : TIBDataBaseErrorMessages //*****************************unit uPSI_BoldUtils;******************************************* Function CharCount( c : char; const s : string) : Int Function BoldNamesEqual( const name1, name2 : string) : Boolean Procedure BoldAppendToStrings(strings: TStrings; const aString: string; const ForceNewLine:Boolean) Function BoldSeparateStringList(strings:TStringList;const Separator,PreString,PostString:String):String Function BoldSeparatedAppend( const S1, S2 : string; const Separator : string) : string Function BoldTrim( const S : string) : string Function BoldIsPrefix( const S, Prefix : string) : Boolean Function BoldStrEqual( P1, P2 : PChar; Len : Int) : Boolean Function BoldStrAnsiEqual( P1, P2 : PChar; Len : Int) : Boolean Function BoldAnsiEqual( const S1, S2 : string) : Boolean Function BoldStrStringEqual( const S1 : string; P2 : PChar; Len : Int) : Boolean Function BoldCaseIndependentPos( const Substr, S : string) : Int //Procedure EnumToStrings( aTypeInfo : pTypeInfo; Strings : TStrings) Function CapitalisedToSpaced( Capitalised : String) : String Function SpacedToCapitalised( Spaced : String) : String Function BooleanToString( BoolValue : Boolean) : String Function StringToBoolean( StrValue : String) : Boolean Function GetUpperLimitForMultiplicity( const Multiplicity : String) : Int Function GetLowerLimitForMultiplicity( const Multiplicity : String) : Int Function StringListToVarArray( List : TStringList) : variant Function IsLocalMachine( const Machinename : WideString) : Boolean Function GetComputerNameStr : string Function TimeStampComp( const Time1, Time2 : TTimeStamp) : Int Function BoldStrToDateFmt(const S:string;const DateFormat:string;const DateSeparatorChar:char):TDateTime Function BoldDateToStrFmt(const aDate:TDateTime;DateFormat:string;const DateSeparatorChar:char):String; Function BoldParseFormattedDateList(const value:String;const formats:TStrings;var Date:TDateTime):Boolean; Function BoldParseFormattedDate(const value:String;const formats:array of string; var Date:TDateTime):Boolean; Procedure EnsureTrailing( var Str : String; ch : char) Function BoldDirectoryExists( const Name : string) : Boolean Function BoldForceDirectories( Dir : string) : Boolean Function BoldRootRegistryKey : string Function GetModuleFileNameAsString( IncludePath : Boolean) : string Function BoldVariantToStrings( V : OleVariant; Strings : TStrings) : Int Function LogicalAnd( A, B : Int) : Boolean record TByHandleFileInformation dwFileAttributes : DWORD; ' +'ftCreationTime : TFileTime; ftLastAccessTime : TFileTime; ftLastWriteTime ' +': TFileTime; dwVolumeSerialNumber : DWORD; nFileSizeHigh : DWORD; nFileSiz' +'eLow : DWORD; nNumberOfLinks : DWORD; nFileIndexHigh : DWORD; nFileIndexLow : DWORD; end Function GetFileInformationByHandle(hFile:THandle;var lpFileInformation:TByHandleFileInformation):BOOL; Function IsFirstInstance : Boolean Procedure ActivateFirst( AString : PChar) Procedure ActivateFirstCommandLine function MakeAckPkt(const BlockNumber: Word): string; procedure SendError(UDPBase:TIdUDPBase;APeerIP:string;const APort:Int;const ErrNumber:Word;ErrStr:string; procedure SendError(UDPClient: TIdUDPClient; const ErrNumber: Word; ErrorString: string); overload; procedure SendError(UDPBase: TIdUDPBase; APeerIP: string; const APort: Int; E: Exception); overload; procedure SendError(UDPClient: TIdUDPClient; E: Exception); overload; function IdStrToWord(const Value: String): Word; function IdWordToStr(const Value: Word): WordStr; Function HasInstructionSet( const InstructionSet : TCPUInstructionSet) : Boolean Function CPUFeatures : TCPUFeatures procedure SIRegister_xrtl_util_CPUUtils(CL: TPSPascalCompiler); begin AddTypeS('TXRTLBitIndex', 'Int Function XRTLSwapBits( Data : Cardinal; Bit1Index, Bit2Index : TXRTLBitIndex) : Cardinal Function XRTLBitTest( Data : Cardinal; BitIndex : TXRTLBitIndex) : Boolean Function XRTLBitSet( Data : Cardinal; BitIndex : TXRTLBitIndex) : Cardinal Function XRTLBitReset( Data : Cardinal; BitIndex : TXRTLBitIndex) : Cardinal Function XRTLBitComplement( Data : Cardinal; BitIndex : TXRTLBitIndex) : Cardinal Function XRTLSwapHiLo16( X : Word) : Word Function XRTLSwapHiLo32( X : Cardinal) : Cardinal Function XRTLSwapHiLo64( X : Int64) : Int64 Function XRTLROL32( A, S : Cardinal) : Cardinal Function XRTLROR32( A, S : Cardinal) : Cardinal Function XRTLROL16( A : Word; S : Cardinal) : Word Function XRTLROR16( A : Word; S : Cardinal) : Word Function XRTLROL8( A : Byte; S : Cardinal) : Byte Function XRTLROR8( A : Byte; S : Cardinal) : Byte //Procedure XRTLXorBlock( I1, I2, O1 : PByteArray; Len : Int) //Procedure XRTLIncBlock( P : PByteArray; Len : Int) Procedure XRTLUMul64( const A, B : Int; var MulL, MulH : Int) Function XRTLPopulation( A : Cardinal) : Cardinal end; Function XRTLURLDecode( const ASrc : WideString) : WideString Function XRTLURLEncode( const ASrc : WideString) : WideString Function XRTLURINormalize( const AURI : WideString) : WideString Procedure XRTLURIParse(const AURI:WideString;var VProtocol,VHost,VPath,VDocument,VPort,VBookmark,VUserName,VPassword:WideString) Function XRTLExtractLongPathName(APath: string): string; procedure SIRegister_cFundamentUtils(CL: TPSPascalCompiler); begin Int8', 'ShortInt AddTypeS('Int16', 'SmallInt Int32', 'LongInt UInt8', 'Byte UInt16', 'Word UInt32', 'LongWord UInt64', 'Int64 Word8', 'UInt8 Word16', 'UInt16 Word32', 'UInt32 Word64', 'UInt64 LargeInt', 'Int64 NativeInt', 'Int AddTypeS('NativeUInt', 'Cardinal Const('BitsPerByte','LongInt'( 8); Const('BitsPerWord','LongInt'( 16); Const('BitsPerLongWord','LongInt'( 32); //Const('BitsPerCardinal','LongInt'( BytesPerCardinal * 8); //Const('BitsPerNativeWord','LongInt'( BytesPerNativeWord * 8); Function MinI( const A, B : Int) : Int Function MaxI( const A, B : Int) : Int Function MinC( const A, B : Cardinal) : Cardinal Function MaxC( const A, B : Cardinal) : Cardinal Function SumClipI( const A, I : Int) : Int Function SumClipC( const A : Cardinal; const I : Int) : Cardinal Function InByteRange( const A : Int64) : Boolean Function InWordRange( const A : Int64) : Boolean Function InLongWordRange( const A : Int64) : Boolean Function InShortIntRange( const A : Int64) : Boolean Function InSmallIntRange( const A : Int64) : Boolean Function InLongIntRange( const A : Int64) : Boolean AddTypeS('Bool8', 'ByteBool AddTypeS('Bool16', 'WordBool AddTypeS('Bool32', 'LongBool AddTypeS('TCompareResult', '( crLess, crEqual, crGreater, crUndefined ) AddTypeS('TCompareResultSet', 'set of TCompareResult Function ReverseCompareResult( const C : TCompareResult) : TCompareResult Const('MinSingle','Single').setExtended( 1.5E-45); Const('MaxSingle','Single').setExtended( 3.4E+38); Const('MinDouble','Double').setExtended( 5.0E-324); Const('MaxDouble','Double').setExtended( 1.7E+308); Const('MinExtended','Extended').setExtended(3.4E-4932); Const('MaxExtended','Extended').setExtended(1.1E+4932); Const('MinCurrency','Currency').SetExtended( - 922337203685477.5807); Const('MaxCurrency','Currency').SetExtended( 922337203685477.5807); Function MinF( const A, B : Float) : Float Function MaxF( const A, B : Float) : Float Function ClipF( const Value : Float; const Low, High : Float) : Float Function InSingleRange( const A : Float) : Boolean Function InDoubleRange( const A : Float) : Boolean Function InCurrencyRange( const A : Float) : Boolean; Function InCurrencyRange1( const A : Int64) : Boolean; Function FloatExponentBase2( const A : Extended; var Exponent : Int) : Boolean Function FloatExponentBase10( const A : Extended; var Exponent : Int) : Boolean Function FloatIsInfinity( const A : Extended) : Boolean Function FloatIsNaN( const A : Extended) : Boolean Const('SingleCompareDelta','Extended').setExtended( 1.0E-34); Const('DoubleCompareDelta','Extended').setExtended( 1.0E-280); Const('ExtendedCompareDelta','Extended').setExtended( 1.0E-4400); Const('DefaultCompareDelta','Extended').SetExtended( 1.0E-34); Function FloatZero( const A : Float; const CompareDelta : Float) : Boolean Function FloatOne( const A : Float; const CompareDelta : Float) : Boolean Function FloatsEqual( const A, B : Float; const CompareDelta : Float) : Boolean Function FloatsCompare( const A, B : Float; const CompareDelta : Float) : TCompareResult Const('SingleCompareEpsilon','Extended').setExtended( 1.0E-5); Const('DoubleCompareEpsilon','Extended').setExtended( 1.0E-13); Const('ExtendedCompareEpsilon','Extended').setExtended( 1.0E-17); Const('DefaultCompareEpsilon','Extended').setExtended( 1.0E-10); Function ApproxEqual( const A, B : Extended; const CompareEpsilon : Double) : Boolean Function ApproxCompare( const A, B : Extended; const CompareEpsilon : Double): TCompareResult Function cClearBit( const Value, BitIndex : LongWord) : LongWord Function cSetBit( const Value, BitIndex : LongWord) : LongWord Function cIsBitSet( const Value, BitIndex : LongWord) : Boolean Function cToggleBit( const Value, BitIndex : LongWord) : LongWord Function cIsHighBitSet( const Value : LongWord) : Boolean Function SetBitScanForward( const Value : LongWord) : Int; Function SetBitScanForward1( const Value, BitIndex : LongWord) : Int; Function SetBitScanReverse( const Value : LongWord) : Int; Function SetBitScanReverse1( const Value, BitIndex : LongWord) : Int; Function ClearBitScanForward( const Value : LongWord) : Int; Function ClearBitScanForward1( const Value, BitIndex : LongWord) : Int; Function ClearBitScanReverse( const Value : LongWord) : Int; Function ClearBitScanReverse1( const Value, BitIndex : LongWord) : Int; Function cReverseBits( const Value : LongWord) : LongWord; Function cReverseBits1( const Value : LongWord; const BitCount : Int) : LongWord; Function cSwapEndian( const Value : LongWord) : LongWord Function cTwosComplement( const Value : LongWord) : LongWord Function RotateLeftBits16( const Value : Word; const Bits : Byte) : Word Function RotateLeftBits32( const Value : LongWord; const Bits : Byte) : LongWord Function RotateRightBits16( const Value : Word; const Bits : Byte) : Word Function RotateRightBits32( const Value : LongWord; const Bits : Byte) : LongWord Function cBitCount( const Value : LongWord) : LongWord Function cIsPowerOfTwo( const Value : LongWord) : Boolean Function LowBitMask( const HighBitIndex : LongWord) : LongWord Function HighBitMask( const LowBitIndex : LongWord) : LongWord Function RangeBitMask( const LowBitIndex, HighBitIndex : LongWord) : LongWord Function SetBitRange( const Value: LongWord; const LowBitIndex, HighBitIndex: LongWord) : LongWord Function ClearBitRange(const Value: LongWord; const LowBitIndex,HighBitIndex: LongWord) : LongWord Function ToggleBitRange(const Value:LongWord; const LowBitIndex,HighBitIndex: LongWord) : LongWord Function IsBitRangeSet(const Value: LongWord; const LowBitIndex,HighBitIndex : LongWord) : Boolean Function IsBitRangeClear(const Value: LongWord; const LowBitIndex,HighBitIndex: LongWord): Boolean // AddTypeS('CharSet', 'set of AnsiChar AddTypeS('CharSet', 'set of Char //!!! AddTypeS('AnsiCharSet', 'TCharSet AddTypeS('ByteSet', 'set of Byte AddTypeS('AnsiChar', 'Char // Function AsCharSet( const C : array of AnsiChar) : CharSet Function AsByteSet( const C : array of Byte) : ByteSet Procedure ComplementChar( var C : CharSet; const Ch : Char) Procedure ClearCharSet( var C : CharSet) Procedure FillCharSet( var C : CharSet) procedure FillCharSearchRec; // with 0 Procedure ComplementCharSet( var C : CharSet) Procedure AssignCharSet( var DestSet : CharSet; const SourceSet : CharSet) Procedure Union( var DestSet : CharSet; const SourceSet : CharSet) Procedure Difference( var DestSet : CharSet; const SourceSet : CharSet) Procedure Intersection( var DestSet : CharSet; const SourceSet : CharSet) Procedure XORCharSet( var DestSet : CharSet; const SourceSet : CharSet) Function IsSubSet( const A, B : CharSet) : Boolean //Function IsEqual( const A, B : CharSet) : Boolean Function IsEqualCharset( const A, B : CharSet) : Boolean Function IsEqual( const D1, D2 : TDateTime) : Boolean; Function IsEmpty( const C : CharSet) : Boolean Function IsEmptyCharset( const C : CharSet) : Boolean Function IsComplete( const C : CharSet) : Boolean Function cCharCount( const C : CharSet) : Int Procedure ConvertCaseInsensitive( var C : CharSet) Function CaseInsensitiveCharSet( const C : CharSet) : CharSet Function IntRangeLength( const Low, High : Int) : Int64 Function IntRangeAdjacent( const Low1, High1, Low2, High2 : Int) : Boolean Function IntRangeOverlap( const Low1, High1, Low2, High2 : Int) : Boolean Function IntRangeHasElement( const Low, High, Element : Int) : Boolean Function IntRangeIncludeElement( var Low, High : Int; const Element : Int) : Boolean Function IntRangeIncludeElementRange(var Low,High:Int;const LowElement,HighElement:Int):Boolean Function CardRangeLength( const Low, High : Cardinal) : Int64 Function CardRangeAdjacent( const Low1, High1, Low2, High2 : Cardinal) : Boolean Function CardRangeOverlap( const Low1, High1, Low2, High2 : Cardinal) : Boolean Function CardRangeHasElement( const Low, High, Element : Cardinal) : Boolean Function CardRangeIncludeElement( var Low, High : Cardinal; const Element : Cardinal) : Boolean Function CardRangeIncludeElementRange(var Low,High:Card;const LowElement,HighElement:Card):Bool; AddTypeS('UnicodeChar', 'WideChar Function Compare( const I1, I2 : Boolean) : TCompareResult; Function Compare1( const I1, I2 : Int) : TCompareResult; Function Compare2( const I1, I2 : Int64) : TCompareResult; Function Compare3( const I1, I2 : Extended) : TCompareResult; Function CompareA( const I1, I2 : AnsiString) : TCompareResult Function CompareW( const I1, I2 : WideString) : TCompareResult Function cSgn( const A : LongInt) : Int; Function cSgn1( const A : Int64) : Int; Function cSgn2( const A : Extended) : Int; AddTypeS('TConvertResult', '( convertOK, convertFormatError, convertOverflow ) Function AnsiCharToInt( const A : AnsiChar) : Int Function WideCharToInt( const A : WideChar) : Int Function CharToInt( const A : Char) : Int Function IntToAnsiChar( const A : Int) : AnsiChar Function IntToWideChar( const A : Int) : WideChar Function IntToChar( const A : Int) : Char Function IsHexAnsiChar( const Ch : AnsiChar) : Boolean Function IsHexWideChar( const Ch : WideChar) : Boolean Function IsHexChar( const Ch : Char) : Boolean Function HexAnsiCharToInt( const A : AnsiChar) : Int Function HexWideCharToInt( const A : WideChar) : Int Function HexCharToInt( const A : Char) : Int Function IntToUpperHexAnsiChar( const A : Int) : AnsiChar Function IntToUpperHexWideChar( const A : Int) : WideChar Function IntToUpperHexChar( const A : Int) : Char Function IntToLowerHexAnsiChar( const A : Int) : AnsiChar Function IntToLowerHexWideChar( const A : Int) : WideChar Function IntToLowerHexChar( const A : Int) : Char Function IntToStringA( const A : Int64) : AnsiString Function IntToStringW( const A : Int64) : WideString Function IntToString( const A : Int64) : String Function UIntToStringA( const A : NativeUInt) : AnsiString Function UIntToStringW( const A : NativeUInt) : WideString Function UIntToString( const A : NativeUInt) : String Function LongWordToStrA( const A : LongWord; const Digits : Int) : AnsiString Function LongWordToStrW( const A : LongWord; const Digits : Int) : WideString Function LongWordToStrU( const A : LongWord; const Digits : Int) : UnicodeString Function LongWordToStr( const A : LongWord; const Digits : Int) : String Function LongWordToHexA(const A:LongWord;const Digits:Int;const UpperCase:Bool):AnsiString; Function LongWordToHexW(const A:LongWord;const Digits:Int;const UpperCase:Bool):WideString; Function LongWordToHex( const A : LongWord; const Digits : Int;const UpperCase:Boolean):String Function LongWordToOctA( const A : LongWord; const Digits : Int) : AnsiString Function LongWordToOctW( const A : LongWord; const Digits : Int) : WideString Function LongWordToOct( const A : LongWord; const Digits : Int) : String Function LongWordToBinA( const A : LongWord; const Digits : Int) : AnsiString Function LongWordToBinW( const A : LongWord; const Digits : Int) : WideString Function LongWordToBin( const A : LongWord; const Digits : Int) : String Function TryStringToInt64A( const S : AnsiString; out A : Int64) : Boolean Function TryStringToInt64W( const S : WideString; out A : Int64) : Boolean Function TryStringToInt64( const S : String; out A : Int64) : Boolean Function StringToInt64DefA( const S : AnsiString; const Default : Int64) : Int64 Function StringToInt64DefW( const S : WideString; const Default : Int64) : Int64 Function StringToInt64Def( const S : String; const Default : Int64) : Int64 Function StringToInt64A( const S : AnsiString) : Int64 Function StringToInt64W( const S : WideString) : Int64 Function StringToInt64( const S : String) : Int64 Function TryStringToIntA( const S : AnsiString; out A : Int) : Boolean Function TryStringToIntW( const S : WideString; out A : Int) : Boolean Function TryStringToInt( const S : String; out A : Int) : Boolean Function StringToIntDefA( const S : AnsiString; const Default : Int) : Int Function StringToIntDefW( const S : WideString; const Default : Int) : Int Function StringToIntDef( const S : String; const Default : Int) : Int Function StringToIntA( const S : AnsiString) : Int Function StringToIntW( const S : WideString) : Int Function StringToInt( const S : String) : Int Function TryStringToLongWordA( const S : AnsiString; out A : LongWord) : Boolean Function TryStringToLongWordW( const S : WideString; out A : LongWord) : Boolean Function TryStringToLongWord( const S : String; out A : LongWord) : Boolean Function StringToLongWordA( const S : AnsiString) : LongWord Function StringToLongWordW( const S : WideString) : LongWord Function StringToLongWord( const S : String) : LongWord Function HexToUIntA( const S : AnsiString) : NativeUInt Function HexToUIntW( const S : WideString) : NativeUInt Function HexToUInt( const S : String) : NativeUInt Function TryHexToLongWordA( const S : AnsiString; out A : LongWord) : Boolean Function TryHexToLongWordW( const S : WideString; out A : LongWord) : Boolean Function TryHexToLongWord( const S : String; out A : LongWord) : Boolean Function HexToLongWordA( const S : AnsiString) : LongWord Function HexToLongWordW( const S : WideString) : LongWord Function HexToLongWord( const S : String) : LongWord Function TryOctToLongWordA( const S : AnsiString; out A : LongWord) : Boolean Function TryOctToLongWordW( const S : WideString; out A : LongWord) : Boolean Function TryOctToLongWord( const S : String; out A : LongWord) : Boolean Function OctToLongWordA( const S : AnsiString) : LongWord Function OctToLongWordW( const S : WideString) : LongWord Function OctToLongWord( const S : String) : LongWord Function TryBinToLongWordA( const S : AnsiString; out A : LongWord) : Boolean Function TryBinToLongWordW( const S : WideString; out A : LongWord) : Boolean Function TryBinToLongWord( const S : String; out A : LongWord) : Boolean Function BinToLongWordA( const S : AnsiString) : LongWord Function BinToLongWordW( const S : WideString) : LongWord Function BinToLongWord( const S : String) : LongWord Function FloatToStringA( const A : Extended) : AnsiString Function FloatToStringW( const A : Extended) : WideString Function FloatToString( const A : Extended) : String Function TryStringToFloatA( const A : AnsiString; out B : Extended) : Boolean Function TryStringToFloatW( const A : WideString; out B : Extended) : Boolean Function TryStringToFloat( const A : String; out B : Extended) : Boolean Function StringToFloatA( const A : AnsiString) : Extended Function StringToFloatW( const A : WideString) : Extended Function StringToFloat( const A : String) : Extended Function StringToFloatDefA( const A : AnsiString; const Default : Extended) : Extended Function StringToFloatDefW( const A : WideString; const Default : Extended) : Extended Function StringToFloatDef( const A : String; const Default : Extended) : Extended Function EncodeBase64(const S,Alphabet:AnsiString;const Pad:Boolean;const PadMultiple:Int;const PadChar:AnsiChar):AnsiString Function DecodeBase64( const S, Alphabet : AnsiString; const PadSet : CharSet) : AnsiString unit uPSI_cFundamentUtils; Const('b64_MIMEBase64','Str').String('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ Const('b64_UUEncode','String').String('!"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'; Const('b64_XXEncode','String').String('+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; Const('CCHARSET','Stringb64_XXEncode); Const('CHEXSET','String'0123456789ABCDEF Const('HEXDIGITS','String'0123456789ABCDEF StHexDigits : array[0..$F] of Char = '0123456789ABCDEF'; Const('DIGISET','String'0123456789 Const('LETTERSET','String'ABCDEFGHIJKLMNOPQRSTUVWXYZ' Const('DIGISET2','TCharset').SetSet('0123456789' Const('LETTERSET2','TCharset').SetSet('ABCDEFGHIJKLMNOPQRSTUVWXYZ' Const('HEXSET2','TCharset').SetSET('0123456789ABCDEF; Const('NUMBERSET','TCharset').SetSet('0123456789; Const('NUMBERS','String'0123456789; Const('LETTERS','String'ABCDEFGHIJKLMNOPQRSTUVWXYZ; Const('NUMBLETTS','String').SetString('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ; Const('NUMBLETTSET','TCharset').SetSet('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ; Function CharSetToStr( const C : CharSet) : AnsiString Function StrToCharSet( const S : AnsiString) : CharSet Function MIMEBase64Decode( const S : AnsiString) : AnsiString Function MIMEBase64Encode( const S : AnsiString) : AnsiString Function UUDecode( const S : AnsiString) : AnsiString Function XXDecode( const S : AnsiString) : AnsiString Function BytesToHex( const P : array of Byte; const UpperCase : Boolean) : AnsiString Function InterfaceToStrA( const I : IInterface) : AnsiString Function InterfaceToStrW( const I : IInterface) : WideString Function InterfaceToStr( const I : IInterface) : String Function ObjectClassName( const O : TObject) : String Function ClassClassName( const C : TClass) : String Function ObjectToStr( const O : TObject) : String Function ObjectToString( const O : TObject) : String Function CharSetToStr( const C : CharSet) : AnsiString Function StrToCharSet( const S : AnsiString) : CharSet Function HashStrA(const S : AnsiString; const Index : Int; const Count: Int;const AsciiCaseSensitive : Boolean; const Slots : LongWord) : LongWord Function HashStrW(const S:WideString;const Index:Int;const Count:Int;const AsciiCaseSensitive:Bool;const Slots:LongWord):LongWord Function HashStr(const S:String;const Index:Int;const Count:Int;const AsciiCaseSensitive:Bool;const Slots: LongWord):LongWord Function HashInt( const I : Int; const Slots : LongWord) : LongWord Function HashLongWord( const I : LongWord; const Slots : LongWord) : LongWord Const('Bytes1KB','LongInt'( 1024); SIRegister_IInterface(CL); Procedure SelfTestCFundamentUtils Function CreateSchedule : IJclSchedule Function NullStamp : TTimeStamp Function CompareTimeStamps( const Stamp1, Stamp2 : TTimeStamp) : Int64 Function EqualTimeStamps( const Stamp1, Stamp2 : TTimeStamp) : Boolean Function IsNullTimeStamp( const Stamp : TTimeStamp) : Boolean procedure SIRegister_uwinplot(CL: TPSPascalCompiler); begin AddTypeS('TFunc', 'function(X : Float) : Float; Function InitGraphics( Width, Height : Int) : Boolean Procedure SetWindow( Canvas : TCanvas; X1, X2, Y1, Y2 : Int; GraphBorder : Boolean) Procedure SetOxScale( Scale : TScale; OxMin, OxMax, OxStep : Float) Procedure SetOyScale( Scale : TScale; OyMin, OyMax, OyStep : Float) Procedure GetOxScale( var Scale : TScale; var OxMin, OxMax, OxStep : Float) Procedure GetOyScale( var Scale : TScale; var OyMin, OyMax, OyStep : Float) Procedure SetGraphTitle( Title : String) Procedure SetOxTitle( Title : String) Procedure SetOyTitle( Title : String) Function GetGraphTitle : String Function GetOxTitle : String Function GetOyTitle : String Procedure PlotOxAxis( Canvas : TCanvas) Procedure PlotOyAxis( Canvas : TCanvas) Procedure PlotGrid( Canvas : TCanvas; Grid : TGrid) Procedure WriteGraphTitle( Canvas : TCanvas) Function SetMaxCurv( NCurv : Byte) : Boolean Procedure SetPointParam( CurvIndex, Symbol, Size : Int; Color : TColor) Procedure SetLineParam(CurvIndex: Int; Style : TPenStyle; Width : Int; Color : TColor) Procedure SetCurvLegend( CurvIndex : Int; Legend : String) Procedure SetCurvStep( CurvIndex, Step : Int) Function GetMaxCurv : Byte Procedure GetPointParam( CurvIndex : Int; var Symbol, Size : Int; var Color : TColor) Procedure GetLineParam(CurvIndex:Int;var Style:TPenStyle;var Width:Int;var Color:TColor); Function GetCurvLegend( CurvIndex : Int) : String Function GetCurvStep( CurvIndex : Int) : Int Procedure PlotPoint( Canvas : TCanvas; X, Y : Float; CurvIndex : Int) Procedure PlotCurve( Canvas : TCanvas; X, Y : TVector; Lb, Ub, CurvIndex : Int) Procedure PlotCurveWithErrorBars(Canvas : TCanvas; X,Y,S: TVector; Ns,Lb,Ub,CurvIndex:Int) Procedure PlotFunc(Canvas: TCanvas; Func: TFunc; Xmin,Xmax: Float; Npt,CurvIndex: Int) Procedure WriteLegend( Canvas : TCanvas; NCurv : Int; ShowPoints, ShowLines : Boolean) Procedure ConRec( Canvas : TCanvas; Nx, Ny, Nc : Int; X, Y, Z : TVector; F : TMatrix) Function Xpixel( X : Float) : Int Function Ypixel( Y : Float) : Int Function Xuser( X : Int) : Float Function Yuser( Y : Int) : Float end; Procedure FFT( NumSamples : Int; InArray, OutArray : TCompVector) Procedure IFFT( NumSamples : Int; InArray, OutArray : TCompVector) Procedure FFT_Int( NumSamples : Int; RealIn, ImagIn : TIntVector; OutArray : TCompVector) Procedure FFT_Int_Cleanup Procedure CalcFrequency(NumSamples,FrequencyIndex: Int;InArray: TCompVector;var FT : Complex) //unit uPSI_JclStreams; Function StreamSeek(Stream: TStream; const Offset: Int64; const Origin : TSeekOrigin) : Int64 Function StreamCopy( Source : TStream; Dest : TStream; BufferSize : Int) : Int64 Function CompareStreams( A, B : TStream; BufferSize : Int) : Boolean Function JCompareFiles( const FileA, FileB : TFileName; BufferSize : Int) : Boolean procedure SIRegister_FmxUtils(CL: TPSPascalCompiler); begin FindClass('TOBJECT'),'EInvalidDest FindClass('TOBJECT'),'EFCantMove Procedure fmxCopyFile( const FileName, DestName : string) Procedure fmxMoveFile( const FileName, DestName : string) Function fmxGetFileSize( const FileName : string) : LongInt Function fmxFileDateTime( const FileName : string) : TDateTime Function fmxHasAttr( const FileName : string; Attr : Word) : Boolean Function fmxExecuteFile( const FileName, Params, DefaultDir: string; ShowCmd : Int):THandle; end; procedure SIRegister_FindFileIter(CL: TPSPascalCompiler); begin SIRegister_IFindFileIterator(CL); Function CreateFindFile(const Path:string; IncludeAttr:Int;out iffi:IFindFileIterator):Bool; end; procedure SIRegister_PCharUtils(CL: TPSPascalCompiler); begin Function SkipWhite( cp : PChar) : PChar Function ReadStringDoubleQuotedMaybe( cp : PChar; var AStr : string) : PChar Function ReadStringSingleQuotedMaybe( cp : PChar; var AStr : string) : PChar Function ReadIdent( cp : PChar; var ident : string) : PChar end; procedure SIRegister_JclStrHashMap(CL: TPSPascalCompiler); begin SIRegister_TStringHashMapTraits(CL); Function CaseSensitiveTraits : TStringHashMapTraits Function CaseInsensitiveTraits : TStringHashMapTraits THashNode', 'record Str : string; Ptr : Pointer; Left : PHashNod' +'e; Right : PHashNode; end //PHashArray', '^THashArray // will not work SIRegister_TStringHashMap(CL); THashValue', 'Cardinal Function StrHash( const s : string) : THashValue Function TextHash( const s : string) : THashValue Function DataHash( var AValue, ASize : Cardinal) : THashValue Function Iterate_FreeObjects( AUserData : Pointer; const AStr : string; var AData : Pointer) : Boolean Function Iterate_Dispose( AUserData : Pointer; const AStr : string; var AData : Pointer) : Boolean Function Iterate_FreeMem( AUserData : Pointer; const AStr : string; var AData : Pointer) : Boolean SIRegister_TCaseSensitiveTraits(CL); SIRegister_TCaseInsensitiveTraits(CL); //*********************************************************************unit uPSI_umath; Function uExpo( X : Float) : Float Function uExp2( X : Float) : Float Function uExp10( X : Float) : Float Function uLog( X : Float) : Float Function uLog2( X : Float) : Float Function uLog10( X : Float) : Float Function uLogA( X, A : Float) : Float Function uIntPower( X : Float; N : Int): Float Function uPower( X, Y : Float) : Float Function SgnGamma( X : Float) : Int Function Stirling( X : Float) : Float Function StirLog( X : Float) : Float Function Gamma( X : Float) : Float Function LnGamma( X : Float) : Float Function DiGamma( X : Float) : Float Function TriGamma( X : Float) : Float Function IGamma( X : Float) : Float Function JGamma( X : Float) : Float Function InvGamma( X : Float) : Float Function Erf( X : Float) : Float Function Erfc( X : Float) : Float Function Correl(X, Y : TVector; Lb, Ub : Int) : Float; { Correlation coefficient between samples X and Y } function DBeta(A, B, X : Float) : Float; { Density of Beta distribution with parameters A and B } Function LambertW( X : Float; UBranch, Offset : Boolean) : Float Function Beta(X, Y : Float) : Float Function Binomial( N, K : Int) : Float Function PBinom( N : Int; P : Float; K : Int) : Float Procedure Cholesky( A, L : TMatrix; Lb, Ub : Int) Procedure LU_Decomp( A : TMatrix; Lb, Ub : Int) Procedure LU_Solve( A : TMatrix; B : TVector; Lb, Ub : Int; X : TVector) Function DNorm( X : Float) : Float function DGamma(A, B, X : Float) : Float; { Density of Gamma distribution with parameters A and B } function DKhi2(Nu : Int; X : Float) : Float; { Density of Khi-2 distribution with Nu d.o.f. } function DStudent(Nu : Int; X : Float) : Float; { Density of Student distribution with Nu d.o.f. } function DSnedecor(Nu1, Nu2 : Int; X : Float) : Float; { Density of Fisher-Snedecor distribution with Nu1 and Nu2 d.o.f. } function IBeta(A, B, X : Float) : Float; { Incomplete Beta function} function Correl(X, Y : TVector; Lb, Ub : Int) : Float; procedure SIRegister_unlfit(CL: TPSPascalCompiler); begin Procedure SetOptAlgo( Algo : TOptAlgo) procedure SetOptAlgo(Algo : TOptAlgo); { ------------------------------------------------------------------ Sets the optimization algorithm according to Algo, which must be NL_MARQ, NL_SIMP, NL_BFGS, NL_SA, NL_GA. Default is NL_MARQ } Function GetOptAlgo : TOptAlgo Procedure SetMaxParam( N : Byte) Function GetMaxParam : Byte Procedure SetParamBounds( I : Byte; ParamMin, ParamMax : Float) Procedure GetParamBounds( I : Byte; var ParamMin, ParamMax : Float) Function NullParam( B : TVector; Lb, Ub : Int) : Boolean Procedure NLFit(RegFunc:TRegFunc;DerivProc:TDerivProc;X,Y:TVector;Lb Ub:Int;MaxIter:Int;Tol: Float;B:TVector;FirstPar,LastPar:Int;V:TMatrix) Procedure WNLFit(RegFunc:TRegFunc;DerivProc:TDerivProc;X,Y,S:TVector;Lb,Ub:Int;MaxIter:Int;Tol :Float;B:TVector;FirstPar,LastPar:Int;V:TMatrix) Procedure SetMCFile( FileName : String) Procedure SimFit(RegFunc:TRegFunc;X,Y:TVector;Lb,Ub:Int;B:TVector;FirstPar,LastPar:Int;V:TMatrix; Procedure WSimFit(RegFunc:TRegFunc;X,Y,S:TVector;Lb,Ub:Int;B:TVector;FirstPar,LastPar:Int;V:TMatrix); end; (*----------------------------------------------------------------------------*) procedure SIRegister_usimplex(CL: TPSPascalCompiler); begin Procedure SaveSimplex( FileName : string) Procedure Simplex(Func:TFuncNVar;X:TVector;Lb,Ub:Int; MaxIter:Int;Tol:Float;var F_min:Float); end; (*----------------------------------------------------------------------------*) procedure SIRegister_uregtest(CL: TPSPascalCompiler); begin Procedure RegTest(Y,Ycalc:TVector;LbY,UbY:Int;V:TMatrix;LbV,UbV:Int;var Test:TRegTest) Procedure WRegTest(Y,Ycalc,S:TVector;LbY,UbY:Int;V:TMatrix;LbV,UbV:Int;var Test:TRegTest); end; procedure SIRegister_ustrings(CL: TPSPascalCompiler); begin Function LTrim( S : String) : String Function RTrim( S : String) : String Function uTrim( S : String) : String Function StrChar( N : Byte; C : Char) : String Function RFill( S : String; L : Byte) : String Function LFill( S : String; L : Byte) : String Function CFill( S : String; L : Byte) : String Function Replace( S : String; C1, C2 : Char) : String Function Extract( S : String; var Index : Byte; Delim : Char) : String Procedure Parse( S : String; Delim : Char; Field : TStrVector; var N : Byte) Procedure SetFormat( NumLength, MaxDec : Int; FloatPoint, NSZero : Boolean) Function FloatStr( X : Float) : String Function IntStr( N : LongInt) : String Function uCompStr( Z : Complex) : String end; procedure SIRegister_uhyper(CL: TPSPascalCompiler); begin Function uSinh( X : Float) : Float Function uCosh( X : Float) : Float Function uTanh( X : Float) : Float Function uArcSinh( X : Float) : Float Function uArcCosh( X : Float) : Float Function ArcTanh( X : Float) : Float Procedure SinhCosh( X : Float; var SinhX, CoshX : Float) end; procedure SIRegister_urandom(CL: TPSPascalCompiler); begin type RNG_Type = (RNG_MWC, { Multiply-With-Carry } RNG_MT, { Mersenne Twister } RNG_UVAG); { Universal Virtual Array Generator } Procedure SetRNG( RNG : RNG_Type) Procedure InitGen( Seed : RNG_IntType) Procedure SRand( Seed : RNG_IntType) Function IRanGen : RNG_IntType Function IRanGen31 : RNG_IntType Function RanGen1 : Float Function RanGen2 : Float Function RanGen3 : Float Function RanGen53 : Float end; // Optimization by Simulated Annealing procedure SIRegister_usimann(CL: TPSPascalCompiler); begin Procedure InitSAParams( NT, NS, NCycles : Int; RT : Float) Procedure SA_CreateLogFile( FileName : String) Procedure SimAnn(Func: TFuncNVar; X,Xmin,Xmax: TVector; Lb, Ub : Int; var F_min : Float); end; procedure SIRegister_uranuvag(CL: TPSPascalCompiler); begin Procedure InitUVAGbyString( KeyPhrase : string) Procedure InitUVAG( Seed : RNG_IntType) Function IRanUVAG : RNG_IntType end; procedure SIRegister_ugenalg(CL: TPSPascalCompiler); begin Procedure InitGAParams( NP, NG : Int; SR, MR, HR : Float) Procedure GA_CreateLogFile( LogFileName : String) Procedure GenAlg(Func: TFuncNVar; X,Xmin,Xmax : TVector; Lb, Ub : Int; var F_min : Float); end; TVector', 'array of Float procedure SIRegister_uqsort(CL: TPSPascalCompiler); begin Procedure QSort( X : TVector; Lb, Ub : Int) Procedure DQSort( X : TVector; Lb, Ub : Int) end; procedure SIRegister_uinterv(CL: TPSPascalCompiler); begin Procedure Interval( X1, X2 : Float; MinDiv, MaxDiv : Int; var Min, Max, Step : Float) Procedure AutoScale(X: TVector; Lb, Ub : Int; Scale : TScale; var XMin, XMax, XStep:Float) end; procedure SIRegister_D2XXUnit(CL: TPSPascalCompiler); begin FT_Result', 'Int //TDWordptr', '^DWord // will not work TFT_Program_Data', 'record Signature1 : DWord; Signature2 : DWor' d; Version : DWord; VendorID : Word; ProductID : Word; Manufacturer : PCha' r; ManufacturerID : PChar; Description : PChar; SerialNumber : PChar; MaxP' ower : Word; PnP : Word; SelfPowered : Word; RemoteWakeup : Word; Rev4 : B' yte; IsoIn : Byte; IsoOut : Byte; PullDownEnable : Byte; SerNumEnable : By' te; USBVersionEnable : Byte; USBVersion : Word; Rev5 : Byte; IsoInA : Byte' ; IsoInB : Byte; IsoOutA : Byte; IsoOutB : Byte; PullDownEnable5 : Byte; S' erNumEnable5 : Byte; USBVersionEnable5 : Byte; USBVersion5 : Word; AIsHigh' Current : Byte; BIsHighCurrent : Byte; IFAIsFifo : Byte; IFAIsFifoTar : By' te; IFAIsFastSer : Byte; AIsVCP : Byte; IFBIsFifo : Byte; IFBIsFifoTar : B' yte; IFBIsFastSer : Byte; BIsVCP : Byte; UseExtOsc : Byte; HighDriveIOs : ' Byte; EndpointSize : Byte; PullDownEnableR : Byte; SerNumEnableR : Byte; I' nvertTXD : Byte; InvertRXD : Byte; InvertRTS : Byte; InvertCTS : Byte; Inv' ertDTR : Byte; InvertDSR : Byte; InvertDCD : Byte; InvertRI : Byte; Cbus0 ' : Byte; Cbus1 : Byte; Cbus2 : Byte; Cbus3 : Byte; Cbus4 : Byte; RIsVCP : B' yte; end end; //*************************************** PaintFX**************************** procedure SIRegister_TJvPaintFX(CL: TPSPascalCompiler); begin //with RegClassS(CL,'TComponent', 'TJvPaintFX') do with AddClassN(FindClass('TComponent'),'TJvPaintFX') do begin Procedure Solarize( const Src : TBitmap; var Dst : TBitmap; Amount : Int) Procedure Posterize( const Src : TBitmap; var Dst : TBitmap; Amount : Int) Procedure Blend( const Src1, Src2 : TBitmap; var Dst : TBitmap; Amount : Single) Procedure Blend2( const Src1, Src2 : TBitmap; var Dst : TBitmap; Amount : Single) Procedure ExtractColor( const Dst : TBitmap; AColor : TColor) Procedure ExcludeColor( const Dst : TBitmap; AColor : TColor) Procedure Turn( Src, Dst : TBitmap) Procedure TurnRight( Src, Dst : TBitmap) Procedure HeightMap( const Dst : TBitmap; Amount : Int) Procedure TexturizeTile( const Dst : TBitmap; Amount : Int) Procedure TexturizeOverlap( const Dst : TBitmap; Amount : Int) Procedure RippleRandom( const Dst : TBitmap; Amount : Int) Procedure RippleTooth( const Dst : TBitmap; Amount : Int) Procedure RippleTriangle( const Dst : TBitmap; Amount : Int) Procedure Triangles( const Dst : TBitmap; Amount : Int) Procedure DrawMandelJulia(const Dst:TBitmap;x0,y0,x1,y1:Single;Niter:Int;Mandel:Bool) Procedure FilterXBlue( const Dst : TBitmap; Min, Max : Int) Procedure FilterXGreen( const Dst : TBitmap; Min, Max : Int) Procedure FilterXRed( const Dst : TBitmap; Min, Max : Int) Procedure FilterBlue( const Dst : TBitmap; Min, Max : Int) Procedure FilterGreen( const Dst : TBitmap; Min, Max : Int) Procedure FilterRed( const Dst : TBitmap; Min, Max : Int) Procedure Emboss( var Bmp : TBitmap) Procedure Plasma( Src1, Src2, Dst : TBitmap; Scale, Turbulence : Single) Procedure Shake( Src, Dst : TBitmap; Factor : Single) Procedure ShakeDown( Src, Dst : TBitmap; Factor : Single) Procedure KeepBlue( const Dst : TBitmap; Factor : Single) Procedure KeepGreen( const Dst : TBitmap; Factor : Single) Procedure KeepRed( const Dst : TBitmap; Factor : Single) Procedure Mandelbrot( const Dst : TBitmap; Factor : Int) Procedure MaskMandelbrot( const Dst : TBitmap; Factor : Int) Procedure FoldRight( Src1, Src2, Dst : TBitmap; Amount : Single) Procedure QuartoOpaque( Src, Dst : TBitmap) Procedure SemiOpaque( Src, Dst : TBitmap) Procedure ShadowDownLeft( const Dst : TBitmap) Procedure ShadowDownRight( const Dst : TBitmap) Procedure ShadowUpLeft( const Dst : TBitmap) Procedure ShadowUpRight( const Dst : TBitmap) Procedure Darkness( const Dst : TBitmap; Amount : Int) Procedure Trace( const Dst : TBitmap; Intensity : Int) Procedure FlipRight( const Dst : TBitmap) Procedure FlipDown( const Dst : TBitmap) Procedure SpotLight( const Dst : TBitmap; Amount : Int; Spot : TRect) Procedure SplitLight( const Dst : TBitmap; Amount : Int) Procedure MakeSeamlessClip( var Dst : TBitmap; Seam : Int) Procedure Wave( const Dst : TBitmap; Amount, Inference, Style : Int) Procedure Mosaic( const Bm : TBitmap; Size : Int) Procedure SmoothRotate( var Src, Dst : TBitmap; CX, CY : Int; Angle : Single) Procedure SmoothResize( var Src, Dst : TBitmap) Procedure Twist( var Bmp, Dst : TBitmap; Amount : Int) Procedure SplitBlur( const Dst : TBitmap; Amount : Int) Procedure GaussianBlur( const Dst : TBitmap; Amount : Int) Procedure Smooth( const Dst : TBitmap; Weight : Int) Procedure GrayScale( const Dst : TBitmap) Procedure AddColorNoise( const Dst : TBitmap; Amount : Int) Procedure AddMonoNoise( const Dst : TBitmap; Amount : Int) Procedure Contrast( const Dst : TBitmap; Amount : Int) Procedure Lightness( const Dst : TBitmap; Amount : Int) Procedure Saturation( const Dst : TBitmap; Amount : Int) Procedure Spray( const Dst : TBitmap; Amount : Int) Procedure AntiAlias( const Dst : TBitmap) Procedure AntiAliasRect( const Dst : TBitmap; XOrigin, YOrigin, XFinal, YFinal : Int) Procedure SmoothPoint( const Dst : TBitmap; XK, YK : Int) Procedure FishEye( var Bmp, Dst : TBitmap; Amount : Single) Procedure Marble(const Src:TBitmap; var Dst : TBitmap; Scale : Single; Turbulence : Int) Procedure Marble2(const Src: TBitmap; var Dst : TBitmap; Scale : Single; Turbulence: Int) Procedure Marble3(const Src: TBitmap; var Dst : TBitmap; Scale : Single; Turbulence: Int) Procedure Marble4(const Src: TBitmap; var Dst : TBitmap; Scale : Single; Turbulence: Int) Procedure Marble5(const Src: TBitmap; var Dst : TBitmap; Scale : Single; Turbulence: Int) Procedure Marble6(const Src: TBitmap; var Dst : TBitmap; Scale : Single; Turbulence: Int) Procedure Marble7(const Src: TBitmap; var Dst : TBitmap; Scale : Single; Turbulence: Int) Procedure Marble8(const Src: TBitmap; var Dst : TBitmap; Scale : Single; Turbulence: Int) Procedure SqueezeHor( Src, Dst : TBitmap; Amount : Int; Style : TLightBrush) Procedure SplitRound( Src, Dst : TBitmap; Amount : Int; Style : TLightBrush) Procedure Tile( Src, Dst : TBitmap; Amount : Int) Procedure Stretch( Src, Dst : TBitmap; Filter : TFilterProc; AWidth : Single) Procedure Grow( Src1, Src2, Dst : TBitmap; Amount : Single; X, Y : Int) Procedure Invert( Src : TBitmap) Procedure MirrorRight( Src : TBitmap) Procedure MirrorDown( Src : TBitmap) end; end; (*----------------------------------------------------------------------------*) procedure SIRegister_JvPaintFX(CL: TPSPascalCompiler); begin AddTypeS('TLightBrush', '( lbBrightness, lbContrast, lbSaturation, lbFishe' +'ye, lbrotate, lbtwist, lbrimple, mbHor, mbTop, mbBottom, mbDiamond, mbWast' +'e, mbRound, mbRound2, mbSplitRound, mbSplitWaste ) SIRegister_TJvPaintFX(CL); Function SplineFilter( Value : Single) : Single Function BellFilter( Value : Single) : Single Function TriangleFilter( Value : Single) : Single Function BoxFilter( Value : Single) : Single Function HermiteFilter( Value : Single) : Single Function Lanczos3Filter( Value : Single) : Single Function MitchellFilter( Value : Single) : Single end; (*----------------------------------------------------------------------------*) procedure SIRegister_Chart(CL: TPSPascalCompiler); begin 'TeeMsg_DefaultFunctionName','String 'TeeFunction TeeMsg_DefaultSeriesName','String 'Series TeeMsg_DefaultToolName','String 'ChartTool ChartComponentPalette','String 'TeeChart TeeMaxLegendColumns',LongInt'( 2); TeeDefaultLegendSymbolWidth','LongInt'( 20); TeeTitleFootDistance,LongInt( 5); SIRegister_TCustomChartWall(CL); SIRegister_TChartWall(CL); SIRegister_TChartLegendGradient(CL); TLegendStyle', '( lsAuto, lsSeries, lsValues, lsLastValues, lsSeriesGroups ) TLegendAlignment', '( laLeft, laRight, laTop, laBottom ) FindClass('TOBJECT'),'LegendException TOnGetLegendText', 'Procedure ( Sender : TCustomAxisPanel; Legen' +'dStyle : TLegendStyle; Index : Int; var LegendText : String) FindClass('TOBJECT'),'TCustomChartLegend TLegendSymbolSize', '( lcsPercent, lcsPixels ) TLegendSymbolPosition', '( spLeft, spRight ) TSymbolDrawEvent','Procedure(Sender:TObject;Series:TChartSeries;ValueIndex:Int;R:TRect); TSymbolCalcHeight', 'Function : Int SIRegister_TLegendSymbol(CL); SIRegister_TTeeCustomShapePosition(CL); TCheckBoxesStyle', '( cbsCheck, cbsRadio ) SIRegister_TLegendTitle(CL); SIRegister_TLegendItem(CL); SIRegister_TLegendItems(CL); TLegendCalcSize', 'Procedure ( Sender : TCustomChartLegend; var ASize : Int) FindClass('TOBJECT'),'TCustomChart SIRegister_TCustomChartLegend(CL); SIRegister_TChartLegend(CL); SIRegister_TChartTitle(CL); SIRegister_TChartFootTitle(CL); TChartClick', 'Procedure(ender:TCustomChart;Button:TMouseButton;Shift:TShiftState;X,Y:Int) TChartClickAxis', 'Procedure ( Sender : TCustomChart; Axis : TCh' +'artAxis; Button : TMouseButton; Shift : TShiftState; X, Y : Int) TChartClickSeries', 'Procedure ( Sender : TCustomChart; Series :' +TChartSeries; ValueIndex : Int; Button: TMouseButton; Shift:TShiftState;X,Y:Int) TChartClickTitle', 'Procedure ( Sender : TCustomChart; ATitle : ' +'TChartTitle; Button : TMouseButton; Shift : TShiftState; X, Y : Int) TOnGetLegendPos', 'Procedure (Sender: TCustomChart; Index: Int; var X,Y,XColor:Int) TOnGetLegendRect', 'Procedure ( Sender : TCustomChart; var Rect : TRect) TAxisSavedScales', 'record Auto:Boolean;AutoMin:Bool;AutoMax:Bool;Min:Double;Max:Double;end TAllAxisSavedScales', 'array of TAxisSavedScales SIRegister_TChartBackWall(CL); SIRegister_TChartRightWall(CL); SIRegister_TChartBottomWall(CL); SIRegister_TChartLeftWall(CL); SIRegister_TChartWalls(CL); TChartAllowScrollEvent','Procedure(Sender:TChartAxis;var AMin,AMax:Double;var AllowScroll:Bool); SIRegister_TCustomChart(CL); SIRegister_TChart(CL); SIRegister_TTeeSeriesTypes(CL); SIRegister_TTeeToolTypes(CL); SIRegister_TTeeDragObject(CL); SIRegister_TColorPalettes(CL); Procedure RegisterTeeSeries(ASeriesClass:TChartSeriesClass;ADescription,AGalleryPage:PString;ANumGallerySeries:Int; Procedure RegisterTeeSeries1( ASeriesClass : TChartSeriesClass; ADescription : PString); Procedure RegisterTeeFunction(AFunctClass:TTeeFunctionClass;ADescription,AGalleryPage:PString;ANumGallerySeries: Int; Procedure RegisterTeeBasicFunction(AFunctionClass: TTeeFunctionClass; ADescription : PString) Procedure RegisterTeeSeriesFunction(ASeriesClass: TChartSeriesClass;AFunctionClass:TTeeFunctionClass; ADescription,AGalleryPage:PString;ANumGallerySeries:Int;ASubIndex : Int) Procedure UnRegisterTeeSeries( const ASeriesList : array of TChartSeriesClass) Procedure UnRegisterTeeFunctions( const AFunctionList : array of TTeeFunctionClass) Procedure AssignSeries( var OldSeries, NewSeries : TChartSeries) Function CreateNewTeeFunction(ASeries:TChartSeries;AClass:TTeeFunctionClass): TTeeFunction Function CreateNewSeries( AOwner: TComponent; AChar :TCustomAxisPanel;AClass : TChartSeriesClass; AFunctionClass : TTeeFunctionClass) : TChartSeries Function CloneChartSeries( ASeries : TChartSeries) : TChartSeries; Function CloneChartSeries1(ASeries: TChartSeries; AChart: TCustomAxisPanel): TChartSeries; Function CloneChartSeries2(ASeries:TChartSeries;AOwner:TComponent;AChart:TCustomAxisPanel):TChartSeries;; Function CloneChartTool( ATool : TTeeCustomTool; AOwner : TComponent) : TTeeCustomTool Function ChangeSeriesType( var ASeries : TChartSeries; NewType : TChartSeriesClass) : TChartSeries Procedure ChangeAllSeriesType( AChart : TCustomChart; AClass : TChartSeriesClass) Function GetNewSeriesName( AOwner : TComponent) : TComponentName Procedure RegisterTeeTools( const ATools : array of TTeeCustomToolClass) Procedure UnRegisterTeeTools( const ATools : array of TTeeCustomToolClass) Function GetGallerySeriesName( ASeries : TChartSeries) : String Procedure PaintSeriesLegend(ASeries:TChartSeries;ACanvas:TCanvas;const R:TRect;ReferenceChart:TCustomChart); SIRegister_TChartTheme(CL); //TChartThemeClass', 'class of TChartTheme //TCanvasClass', 'class of TCanvas3D Function SeriesNameOrIndex( ASeries : TCustomChartSeries) : String Function SeriesTitleOrName( ASeries : TCustomChartSeries) : String Procedure FillSeriesItems( AItems : TStrings; AList : TCustomSeriesList; UseTitles : Boolean) Procedure ShowMessageUser( const S : String) Function HasNoMandatoryValues( ASeries : TChartSeries) : Boolean Function HasLabels( ASeries : TChartSeries) : Boolean Function HasColors( ASeries : TChartSeries) : Boolean Function SeriesGuessContents( ASeries : TChartSeries) : TeeFormatFlag Procedure TeeDrawBitmapEditor(Canvas: TCanvas;Element: TCustomChartElement;Left, Top : Int) end; procedure SIRegister_TeeProcs(CL: TPSPascalCompiler); begin //'TeeFormBorderStyle',' bsNone); SIRegister_TMetafile(CL); 'TeeDefVerticalMargin','LongInt'( 4); 'TeeDefHorizMargin','LongInt'( 3); 'crTeeHand','LongInt'( TCursor ( 2020 )); 'TeeMsg_TeeHand','String 'crTeeHand 'TeeNormalPrintDetail','LongInt'( 0); 'TeeHighPrintDetail','LongInt'( - 100); 'TeeDefault_PrintMargin','LongInt'( 15); 'MaxDefaultColors','LongInt'( 19); 'TeeTabDelimiter',Char #9); TDateTimeStep', '( dtOneMicroSecond, dtOneMillisecond, dtOneSeco' +'nd, dtFiveSeconds, dtTenSeconds, dtFifteenSeconds, dtThirtySeconds, dtOneM' +'inute, dtFiveMinutes, dtTenMinutes, dtFifteenMinutes, dtThirtyMinutes, dtO' +'neHour, dtTwoHours, dtSixHours, dtTwelveHours, dtOneDay, dtTwoDays, dtThre' +'eDays, dtOneWeek, dtHalfMonth, dtOneMonth, dtTwoMonths, dtThreeMonths, dtF' +'ourMonths, dtSixMonths, dtOneYear, dtNone ) SIRegister_TCustomPanelNoCaption(CL); FindClass('TOBJECT'),'TCustomTeePanel SIRegister_TZoomPanning(CL); SIRegister_TTeeEvent(CL); //SIRegister_TTeeEventListeners(CL); TTeeMouseEventKind', '( meDown, meUp, meMove ) SIRegister_TTeeMouseEvent(CL); SIRegister_TCustomTeePanel(CL); //TChartGradient', 'TTeeGradient //TChartGradientClass', 'class of TChartGradient TPanningMode', '( pmNone, pmHorizontal, pmVertical, pmBoth ) SIRegister_TTeeZoomPen(CL); SIRegister_TTeeZoomBrush(CL); TTeeZoomDirection', '( tzdHorizontal, tzdVertical, tzdBoth ) SIRegister_TTeeZoom(CL); FindClass('TOBJECT'),'TCustomTeePanelExtended TTeeBackImageMode', '( pbmStretch, pbmTile, pbmCenter, pbmCustom ) SIRegister_TBackImage(CL); SIRegister_TCustomTeePanelExtended(CL); //TChartBrushClass', 'class of TChartBrush SIRegister_TTeeCustomShapeBrushPen(CL); TChartObjectShapeStyle', '( fosRectangle, fosRoundRectangle, fosEllipse ) TTextFormat', '( ttfNormal, ttfHtml ) SIRegister_TTeeCustomShape(CL); SIRegister_TTeeShape(CL); SIRegister_TTeeExportData(CL); Function TeeStr( const Num : Int) : String Function DateTimeDefaultFormat( const AStep : Double) : String Function TEEDaysInMonth( Year, Month : Word) : Word Function FindDateTimeStep( const StepValue : Double) : TDateTimeStep Function NextDateTimeStep( const AStep : Double) : Double Function PointInLine( const P : TPoint; const px, py, qx, qy : Int) : Boolean; Function PointInLine1( const P, FromPoint, ToPoint : TPoint) : Boolean; Function PointInLine2(const P,FromPoint,ToPoint:TPoint;const TolerancePixels:Int):Boolean; Function PointInLine3( const P : TPoint; const px, py, qx, qy, TolerancePixels:Int):Boolean; Function PointInLineTolerance(const P:TPoint;const px,py,qx,qy,TolerancePixels:Int):Boolean; Function PointInPolygon( const P : TPoint; const Poly : array of TPoint) : Boolean Function PointInTriangle( const P, P0, P1, P2 : TPoint) : Boolean; Function PointInTriangle1( const P : TPoint; X0, X1, Y0, Y1 : Int) : Boolean; Function PointInHorizTriangle( const P : TPoint; Y0, Y1, X0, X1 : Int) : Boolean Function PointInEllipse( const P : TPoint; const Rect : TRect) : Boolean; Function PointInEllipse1( const P: TPoint;Left,Top,Right, Bottom : Int) : Boolean; Function DelphiToLocalFormat( const Format : String) : String Function LocalToDelphiFormat( const Format : String) : String Procedure TEEEnableControls(Enable: Boolean; const ControlArray : array of TControl) Function TeeRoundDate(const ADate : TDateTime; AStep : TDateTimeStep) : TDateTime Procedure TeeDateTimeIncrement(IsDateTime:Boolean;Increment:Boolean;var Value:Double;const AnIncrement:Double; tmpWhichDateTime:TDateTimeStep) TTeeSortCompare', 'Function ( a, b : Int) : Int TTeeSortSwap', 'Procedure ( a, b : Int) Procedure TeeSort(StartIndex,EndIndex:Int;CompareFunc:TTeeSortCompare;SwapFunc:TTeeSortSwap); Function TeeGetUniqueName( AOwner : TComponent; const AStartName : String) : string Function TeeExtractField( St : String; Index : Int) : String; Function TeeExtractField1( St : String; Index : Int; const Separator : String) : String; Function TeeNumFields( St : String) : Int; Function TeeNumFields1( const St, Separator : String) : Int; Procedure TeeGetBitmapEditor( AObject : TObject; var Bitmap : TBitmap) Procedure TeeLoadBitmap( Bitmap : TBitmap; const Name1, Name2 : String) // TColorArray', 'array of TColor Function GetDefaultColor( const Index : Int) : TColor Procedure SetDefaultColorPalette; Procedure SetDefaultColorPalette1( const Palette : array of TColor); 'TeeCheckBoxSize','LongInt'( 11); Procedure TeeDrawCheckBox(x,y:Int;Canvas:TCanvas;Checked:Boolean;ABackColor:TColor;CheckBox:Boolean); Function TEEStrToFloatDef( const S : string; const Default : Extended) : Extended Function TryStrToFloat( const S : String; var Value : Double) : Boolean Function CrossingLines( const X1, Y1, X2, Y2, X3, Y3, X4, Y4 : Double; out x, y : Double) : Boolean Procedure TeeTranslateControl( AControl : TControl); Procedure TeeTranslateControl1(AControl: TControl;const ExcludeChilds: array of TControl); Function ReplaceChar(const AString:String;const Search: Char; const Replace : Char) : String //Procedure RectToFourPoints( const ARect : TRect; const Angle : Double; var P : TFourPoints) Function TeeAntiAlias( Panel : TCustomTeePanel; ChartRect : Boolean) : TBitmap //Procedure DrawBevel(Canvas:TTeeCanvas;Bevel:TPanelBevel;var R:TRect;Width:Int;Round:Int); //Function ScreenRatio( ACanvas : TCanvas3D) : Double Function TeeReadBoolOption( const AKey : String; DefaultValue : Boolean) : Boolean Procedure TeeSaveBoolOption( const AKey : String; Value : Boolean) Function TeeReadIntOption( const AKey : String; DefaultValue : Int) : Int Procedure TeeSaveIntOption( const AKey : String; Value : Int) Function TeeReadStringOption( const AKey, DefaultValue : String) : String Procedure TeeSaveStringOption( const AKey, Value : String) Function TeeDefaultXMLEncoding : String Procedure ConvertTextToXML( Stream : TStream; XMLHeader : Boolean) TeeWindowHandle', 'Int Procedure TeeGotoURL( Handle : TeeWindowHandle; const URL : String) Procedure HtmlTextOut( ACanvas : TCanvas; x, y : Int; Text : String) Function HtmlTextExtent( ACanvas : TCanvas; const Text : String) : TSize end; using mXBDEUtils ******************************************************************************* Procedure SetAlias( aAlias, aDirectory : String) Procedure CheckRegistryEntry(Reg:TRegistry;const Path,Value:Str;const Default,Desired:Variant;Size:Byte); Function GetFileVersionNumber( const FileName : String) : TVersionNo Procedure SetBDE( aPath, aNode, aValue : String) function RestartDialog(Wnd: HWnd; Reason: PChar; Flags: Int): Int; stdcall; Function GetSystemDirectory( lpBuffer : string; uSize : UINT) : UINT Function GetSystemDirectoryW( lpBuffer : pchar; uSize : UINT) : UINT Function GetTempPath( nBufferLength : DWORD; lpBuffer : string) : DWORD Function GetWindowsDirectoryW( nBufferLength : DWORD; lpBuffer : string) : DWORD Function GetTempFileName(lpPathName,lpPrefixString:string;uUnique:UINT;lpTempFileName:string):UINT; procedure SIRegister_cDateTime(CL: TPSPascalCompiler); begin AddClassN(FindClass('TOBJECT'),'EDateTime Function DatePart( const D : TDateTime) : Int Function TimePart( const D : TDateTime) : Double Function Century( const D : TDateTime) : Word Function Year( const D : TDateTime) : Word Function Month( const D : TDateTime) : Word Function Day( const D : TDateTime) : Word Function Hour( const D : TDateTime) : Word Function Minute( const D : TDateTime) : Word Function Second( const D : TDateTime) : Word Function Millisecond( const D : TDateTime) : Word ('OneDay','Extended').setExtended( 1.0); ('OneHour','Extended').SetExtended( OneDay / 24); ('OneMinute','Extended').SetExtended( OneHour / 60); ('OneSecond','Extended').SetExtended( OneMinute / 60); ('OneMillisecond','Extended').SetExtended( OneSecond / 1000); ('OneWeek','Extended').SetExtended( OneDay * 7); ('HoursPerDay','Extended').SetExtended( 24); ('MinutesPerHour','Extended').SetExtended( 60); ('SecondsPerMinute','Extended').SetExtended( 60); Procedure SetYear( var D : TDateTime; const Year : Word) Procedure SetMonth( var D : TDateTime; const Month : Word) Procedure SetDay( var D : TDateTime; const Day : Word) Procedure SetHour( var D : TDateTime; const Hour : Word) Procedure SetMinute( var D : TDateTime; const Minute : Word) Procedure SetSecond( var D : TDateTime; const Second : Word) Procedure SetMillisecond( var D : TDateTime; const Milliseconds : Word) Function IsEqual( const D1, D2 : TDateTime) : Boolean; Function IsEqual1( const D1 : TDateTime; const Ye, Mo, Da : Word):Boolean; Function IsEqual2( const D1 : TDateTime; const Ho, Mi, Se, ms : Word):Boolean; Function IsAM( const D : TDateTime) : Boolean Function IsPM( const D : TDateTime) : Boolean Function IsMidnight( const D : TDateTime) : Boolean Function IsNoon( const D : TDateTime) : Boolean Function IsSunday( const D : TDateTime) : Boolean Function IsMonday( const D : TDateTime) : Boolean Function IsTuesday( const D : TDateTime) : Boolean Function IsWedneday( const D : TDateTime) : Boolean Function IsThursday( const D : TDateTime) : Boolean Function IsFriday( const D : TDateTime) : Boolean Function IsSaturday( const D : TDateTime) : Boolean Function IsWeekend( const D : TDateTime) : Boolean Function Noon( const D : TDateTime) : TDateTime Function Midnight( const D : TDateTime) : TDateTime Function FirstDayOfMonth( const D : TDateTime) : TDateTime Function LastDayOfMonth( const D : TDateTime) : TDateTime Function NextWorkday( const D : TDateTime) : TDateTime Function PreviousWorkday( const D : TDateTime) : TDateTime Function FirstDayOfYear( const D : TDateTime) : TDateTime Function LastDayOfYear( const D : TDateTime) : TDateTime Function EasterSunday( const Year : Word) : TDateTime Function GoodFriday( const Year : Word) : TDateTime Function AddMilliseconds( const D : TDateTime; const N : Int64) : TDateTime Function AddSeconds( const D : TDateTime; const N : Int64) : TDateTime Function AddMinutes( const D : TDateTime; const N : Int) : TDateTime Function AddHours( const D : TDateTime; const N : Int) : TDateTime Function AddDays( const D : TDateTime; const N : Int) : TDateTime Function AddWeeks( const D : TDateTime; const N : Int) : TDateTime Function AddMonths( const D : TDateTime; const N : Int) : TDateTime Function AddYears( const D : TDateTime; const N : Int) : TDateTime Function DayOfYear( const Ye, Mo, Da : Word) : Int Function DayOfYear( const D : TDateTime) : Int Function DaysInMonth( const Ye, Mo : Word) : Int Function DaysInMonth( const D : TDateTime) : Int Function DaysInYear( const Ye : Word) : Int Function DaysInYearDate( const D : TDateTime) : Int Function WeekNumber( const D : TDateTime) : Int Function ISOFirstWeekOfYear( const Ye : Word) : TDateTime Procedure ISOWeekNumber( const D : TDateTime; var WeekNumber, WeekYear : Word) Function DiffMilliseconds( const D1, D2 : TDateTime) : Int64 Function DiffSeconds( const D1, D2 : TDateTime) : Int Function DiffMinutes( const D1, D2 : TDateTime) : Int Function DiffHours( const D1, D2 : TDateTime) : Int Function DiffDays( const D1, D2 : TDateTime) : Int Function DiffWeeks( const D1, D2 : TDateTime) : Int Function DiffMonths( const D1, D2 : TDateTime) : Int Function DiffYears( const D1, D2 : TDateTime) : Int Function GMTBias : Int Function GMTTimeToLocalTime( const D : TDateTime) : TDateTime Function LocalTimeToGMTTime( const D : TDateTime) : TDateTime Function NowAsGMTTime : TDateTime Function DateTimeToISO8601String( const D : TDateTime) : AnsiString Function ISO8601StringToTime( const D : AnsiString) : TDateTime Function ISO8601StringAsDateTime( const D : AnsiString) : TDateTime Function DateTimeToANSI( const D : TDateTime) : Int Function ANSIToDateTime( const Julian : Int) : TDateTime Function DateTimeToISOInt( const D : TDateTime) : Int Function DateTimeToISOString( const D : TDateTime) : AnsiString Function ISOIntToDateTime( const ISOInt : Int) : TDateTime Function TwoDigitRadix2000YearToYear( const Y : Int) : Int Function DateTimeAsElapsedTime(const D:TDateTime; const IncludeMilliseconds:Boolean):AnsiString Function UnixTimeToDateTime( const UnixTime : LongWord) : TDateTime Function DateTimeToUnixTime( const D : TDateTime) : LongWord Function EnglishShortDayOfWeekStrA( const DayOfWeek : Int) : AnsiString Function EnglishShortDayOfWeekStrU( const DayOfWeek : Int) : UnicodeString Function EnglishLongDayOfWeekStrA( const DayOfWeek : Int) : AnsiString Function EnglishLongDayOfWeekStrU( const DayOfWeek : Int) : UnicodeString Function EnglishShortMonthStrA( const Month : Int) : AnsiString Function EnglishShortMonthStrU( const Month : Int) : UnicodeString Function EnglishLongMonthStrA( const Month : Int) : AnsiString Function EnglishLongMonthStrU( const Month : Int) : UnicodeString Function EnglishShortDayOfWeekA( const S : AnsiString) : Int Function EnglishShortDayOfWeekU( const S : UnicodeString) : Int Function EnglishLongDayOfWeekA( const S : AnsiString) : Int Function EnglishLongDayOfWeekU( const S : UnicodeString) : Int Function EnglishShortMonthA( const S : AnsiString) : Int Function EnglishShortMonthU( const S : UnicodeString) : Int Function EnglishLongMonthA( const S : AnsiString) : Int Function EnglishLongMonthU( const S : UnicodeString) : Int Function RFC850DayOfWeekA( const S : AnsiString) : Int Function RFC850DayOfWeekU( const S : UnicodeString) : Int Function RFC1123DayOfWeekA( const S : AnsiString) : Int Function RFC1123DayOfWeekU( const S : UnicodeString) : Int Function RFCMonthA( const S : AnsiString) : Word Function RFCMonthU( const S : UnicodeString) : Word Function GMTTimeToRFC1123TimeA( const D : TDateTime; const IncludeSeconds:Boolean) : AnsiString Function GMTTimeToRFC1123TimeU( const D : TDateTime; const IncludeSeconds:Boolean) : UnicodeString Function GMTDateTimeToRFC1123DateTimeA(const D: TDateTime; const IncludeDayOfWeek:Bool):AnsiString; Function GMTDateTimeToRFC1123DateTimeU(const D:TDateTime;const IncludeDayOfWeek:Bool):UnicodeString; Function DateTimeToRFCDateTimeA( const D : TDateTime) : AnsiString Function DateTimeToRFCDateTimeU( const D : TDateTime) : UnicodeString Function NowAsRFCDateTimeA : AnsiString Function NowAsRFCDateTimeU : UnicodeString Function RFCDateTimeToGMTDateTime( const S : AnsiString) : TDateTime Function RFCDateTimeToDateTime( const S : AnsiString) : TDateTime Function RFCTimeZoneToGMTBias( const Zone : AnsiString) : Int Function TimePeriodStr( const D : TDateTime) : AnsiString Procedure SelfTest end; //*******************************************CFileUtils Function PathHasDriveLetterA( const Path : AnsiString) : Boolean Function PathHasDriveLetter( const Path : String) : Boolean Function PathIsDriveLetterA( const Path : AnsiString) : Boolean Function PathIsDriveLetter( const Path : String) : Boolean Function PathIsDriveRootA( const Path : AnsiString) : Boolean Function PathIsDriveRoot( const Path : String) : Boolean Function PathIsRootA( const Path : AnsiString) : Boolean Function PathIsRoot( const Path : String) : Boolean Function PathIsUNCPathA( const Path : AnsiString) : Boolean Function PathIsUNCPath( const Path : String) : Boolean Function PathIsAbsoluteA( const Path : AnsiString) : Boolean Function PathIsAbsolute( const Path : String) : Boolean Function PathIsDirectoryA( const Path : AnsiString) : Boolean Function PathIsDirectory( const Path : String) : Boolean Function PathInclSuffixA( const Path : AnsiString; const PathSep : Char) : AnsiString Function PathInclSuffix( const Path : String; const PathSep : Char) : String Function PathExclSuffixA( const Path : AnsiString; const PathSep : Char) : AnsiString Function PathExclSuffix( const Path : String; const PathSep : Char) : String Procedure PathEnsureSuffixA( var Path : AnsiString; const PathSep : Char) Procedure PathEnsureSuffix( var Path : String; const PathSep : Char) Procedure PathEnsureNoSuffixA( var Path : AnsiString; const PathSep : Char) Procedure PathEnsureNoSuffix( var Path : String; const PathSep : Char) //Function PathCanonicalA( const Path : AnsiString; const PathSep : Char) : AnsiString Function PathCanonical( const Path : String; const PathSep : Char) : String Function PathExpandA(const Path:AnsiString;const BasePath:AnsiString;const PathSep:Char):AnsiString Function PathExpand( const Path : String; const BasePath : String; const PathSep : Char) : String Function PathLeftElementA( const Path : AnsiString; const PathSep : Char) : AnsiString Function PathLeftElement( const Path : String; const PathSep : Char) : String Procedure PathSplitLeftElementA(const Path:AString;var LeftElement,RightPath:AString;const PathSep:Char); Procedure PathSplitLeftElement(const Path:String; var LeftElement,RightPath: String;const PathSep:Char); Procedure DecodeFilePathA(const FilePath:AnsiString; var Path,FileName:AnsiString;const PathSep:Char; Procedure DecodeFilePath(const FilePath:String; var Path,FileName:String;const PathSep: Char) Function FileNameValidA( const FileName : AnsiString) : AnsiString Function FileNameValid( const FileName : String) : String Function FilePathA(const FileName,Path:AnsiString;const BasePath:AnsiStr;const PathSep:Char):AnsiString; Function FilePath(const FileName, Path: String;const BasePath: String;const PathSep : Char) : String Function DirectoryExpandA(const Path:AnsiString;const BasePath:AnsiString;const PathSep:Char):AnsiString Function DirectoryExpand(const Path: String; const BasePath: String; const PathSep : Char) : String Function UnixPathToWinPath( const Path : AnsiString) : AnsiString Function WinPathToUnixPath( const Path : AnsiString) : AnsiString Procedure CCopyFile( const FileName, DestName : String) Procedure CMoveFile( const FileName, DestName : String) Function CDeleteFiles( const FileMask : String) : Boolean Function FileSeekEx(const FHandle:TFileHandle;const FileOffset:Int64; const FilePos:TFileSeekPos):Int64; Procedure FileCloseEx( const FileHandle : TFileHandle) Function FileExistsA( const FileName : AnsiString) : Boolean Function CFileExists( const FileName : String) : Boolean Function CFileGetSize( const FileName : String) : Int64 Function FileGetDateTime( const FileName : String) : TDateTime Function FileGetDateTime2( const FileName : String) : TDateTime Function FileIsReadOnly( const FileName : String) : Boolean Procedure FileDeleteEx( const FileName : String) Procedure FileRenameEx( const OldFileName, NewFileName : String) Function ReadFileStrA( const FileName:AnsiString; const FileSharing : TFileSharing; const FileCreationMode : TFileCreationMode; const FileOpenWait : PFileOpenWait) : AnsiString Function DirectoryEntryExists( const Name : String) : Boolean Function DirectoryEntrySize( const Name : String) : Int64 Function CDirectoryExists( const DirectoryName : String) : Boolean Function DirectoryGetDateTime( const DirectoryName : String) : TDateTime Procedure CDirectoryCreate( const DirectoryName : String) Function GetFirstFileNameMatching( const FileMask : String) : String Function DirEntryGetAttr( const FileName : AnsiString) : Int Function DirEntryIsDirectory( const FileName : AnsiString) : Boolean Function FileHasAttr( const FileName : String; const Attr : Word) : Boolean AddTypeS('TLogicalDriveType', '( DriveRemovable, DriveFixed, DriveRemote, ' +'DriveCDRom, DriveRamDisk, DriveTypeUnknown ) Function DriveIsValid( const Drive : Char) : Boolean Function DriveGetType( const Path : AnsiString) : TLogicalDriveType Function DriveFreeSpace( const Path : AnsiString) : Int64 procedure SIRegister_cTimers(CL: TPSPascalCompiler); begin AddClassN(FindClass('TOBJECT'),'ETimers Const('TickFrequency','LongInt'( 1000);Function GetTick : LongWord Function TickDelta( const D1, D2 : LongWord) : Int Function TickDeltaW( const D1, D2 : LongWord) : LongWord AddTypeS('THPTimer', 'Int64 Procedure StartTimer( var Timer : THPTimer) Procedure StopTimer( var Timer : THPTimer) Procedure ResumeTimer( var StoppedTimer : THPTimer) Procedure InitStoppedTimer( var Timer : THPTimer) Procedure InitElapsedTimer( var Timer : THPTimer; const Milliseconds : Int) Function MillisecondsElapsed( const Timer: THPTimer; const TimerRunning : Boolean) : Int Function MicrosecondsElapsed( const Timer: THPTimer; const TimerRunning : Boolean) : Int64 Procedure WaitMicroseconds( const MicroSeconds : Int) Function GetHighPrecisionFrequency : Int64 Function GetHighPrecisionTimerOverhead : Int64 Procedure AdjustTimerForOverhead(var StoppedTimer: THPTimer; const Overhead : Int64) Procedure SelfTestCTimer end; procedure SIRegister_cRandom(CL: TPSPascalCompiler); begin Function RandomSeed : LongWord Procedure AddEntropy( const Value : LongWord) Function RandomUniform : LongWord; Function RandomUniform1( const N : Int) : Int; Function RandomBoolean : Boolean Function RandomByte : Byte Function RandomByteNonZero : Byte Function RandomWord : Word Function RandomInt64 : Int64; Function RandomInt641( const N : Int64) : Int64; Function RandomHex( const Digits : Int) : String Function RandomFloat : Extended Function RandomAlphaStr( const Length : Int) : AnsiString Function RandomPseudoWord( const Length : Int) : AnsiString Function RandomPassword(const MinL,MaxLength:Int;const CaseSens,UseSymbols,UseNumbers:Bool):AnsiString; Function mwcRandomLongWord : LongWord Function urnRandomLongWord : LongWord Function moaRandomFloat : Extended Function mwcRandomFloat : Extended Function RandomNormalF : Extended Procedure SelfTestCRandom end; procedure SIRegister_SynEditMiscProcs(CL: TPSPascalCompiler); begin // PIntArray', '^TIntArray // will not work Addtypes('TConvertTabsProc','function(const Line:AnsiString; TabWidth: Int):AnsiString TConvertTabsProcEx,function(const Line:AnsiString;TabWidth:Int;var HasTabs:boolean):AnsiString Function synMax( x, y : Int) : Int Function synMin( x, y : Int) : Int Function synMinMax( x, mi, ma : Int) : Int Procedure synSwapInt( var l, r : Int) Function synMaxPoint( const P1, P2 : TPoint) : TPoint Function synMinPoint( const P1, P2 : TPoint) : TPoint //Function synGetIntArray( Count : Cardinal; InitialValue : Int) : PIntArray Procedure synInternalFillRect( dc : HDC; const rcPaint : TRect) Function synGetBestConvertTabsProc( TabWidth : Int) : TConvertTabsProc Function synConvertTabs( const Line : AnsiString; TabWidth : Int) : AnsiString Function synGetBestConvertTabsProcEx( TabWidth : Int) : TConvertTabsProcEx Function synConvertTabsEx(const Line:AnsiString;TabWidth:Int;var HasTabs:bool):AnsiString; Function synGetExpandedLength( const aStr : string; aTabWidth : Int) : Int Function synCharIndex2CaretPos( Index, TabWidth : Int; const Line : string) : Int Function synCaretPos2CharIndex(Position,TabWidth:int;const Line:string;var InsideTabChar:boolean):int; Function synStrScanForCharInSet(const Line:string;Start:Int;AChars:TSynIdentChars):int; Function synStrRScanForCharInSet(const Line:string;Start:Int;AChars:TSynIdentChars):Int; TStringType', '( stNone, stHalfNumAlpha, stHalfSymbol, stHalfKat' +'akana,stWideNumAlpha,stWideSymbol,stWideKatakana,stHiragana,stIdeograph,stControl,stKashida ) ('C3_NONSPACING','LongInt'( 1); 'C3_DIACRITIC','LongInt'( 2); 'C3_VOWELMARK','LongInt'( 4); ('C3_SYMBOL','LongInt'( 8); ('C3_KATAKANA',LongWord( $0010); ('C3_HIRAGANA',LongWord( $0020); ('C3_HALFWIDTH',LongWord( $0040); ('C3_FULLWIDTH',LongWord( $0080); ('C3_IDEOGRAPH',LongWord( $0100); ('C3_KASHIDA',LongWord( $0200); ('C3_LEXICAL',LongWord( $0400); ('C3_ALPHA',LongWord( $8000); ('C3_NOTAPPLICABLE','LongInt'( 0); Function synStrScanForMultiByteChar( const Line : string; Start : Int) : Int Function synStrRScanForMultiByteChar( const Line : string; Start : Int) : Int Function synIsStringType( Value : Word) : TStringType Function synGetEOL( Line : PChar) : PChar Function synEncodeString( s : string) : string Function synDecodeString( s : string) : string Procedure synFreeAndNil( var Obj: TObject) Procedure synAssert( Expr : Boolean) Function synLastDelimiter( const Delimiters, S : string) : Int TReplaceFlag', '( rfReplaceAll, rfIgnoreCase ) TReplaceFlags', 'set of TReplaceFlag ) Function synStringReplace(const S, OldPattern,NewPattern:string;Flags:TReplaceFlags): string Function synGetRValue( RGBValue : TColor) : byte Function synGetGValue( RGBValue : TColor) : byte Function synGetBValue( RGBValue : TColor) : byte Function synRGB( r, g, b : Byte) : Cardinal // THighlighterAttriProc', 'Function ( Highlighter : TSynCustomHigh' // +'lighter; Attri:TSynHighlighterAttributes;UniqueAttriName:string;Params array of Pointer):Boolean; //Function synEnumHighlighterAttris( Highlighter : TSynCustomHighlighter; SkipDuplicates : Boolean; HighlighterAttriProc : THighlighterAttriProc; Params : array of Pointer) : Boolean Function synCalcFCS( const ABuf, ABufSize : Cardinal) : Word Procedure synSynDrawGradient(const ACanvas:TCanvas;const AStartColor,AEndColor:TColor;ASteps:Int;const ARect : TRect; const AHorizontal : boolean) end; Function GET_APPCOMMAND_LPARAM( lParam : LPARAM) : WORD Function GET_DEVICE_LPARAM( lParam : LPARAM) : WORD Function GET_KEYSTATE_LPARAM( lParam : LPARAM) : WORD procedure SIRegister_synautil(CL: TPSPascalCompiler); begin Function STimeZoneBias : Int Function TimeZone : string Function Rfc822DateTime( t : TDateTime) : string Function CDateTime( t : TDateTime) : string Function SimpleDateTime( t : TDateTime) : string Function AnsiCDateTime( t : TDateTime) : string Function GetMonthNumber( Value : String) : Int Function GetTimeFromStr( Value : string) : TDateTime Function GetDateMDYFromStr( Value : string) : TDateTime Function DecodeRfcDateTime( Value : string) : TDateTime Function GetUTTime : TDateTime Function SetUTTime( Newdt : TDateTime) : Boolean Function SGetTick : LongWord Function STickDelta( TickOld, TickNew : LongWord) : LongWord Function CodeInt( Value : Word) : Ansistring Function DecodeInt( const Value : Ansistring; Index : Int) : Word Function CodeLongInt( Value : LongInt) : Ansistring Function DecodeLongInt( const Value : Ansistring; Index : Int) : LongInt Function DumpStr( const Buffer : Ansistring) : string Function DumpExStr( const Buffer : Ansistring) : string Procedure Dump( const Buffer : AnsiString; DumpFile : string) Procedure DumpEx( const Buffer : AnsiString; DumpFile : string) Function TrimSPLeft( const S : string) : string Function TrimSPRight( const S : string) : string Function TrimSP( const S : string) : string Function SeparateLeft( const Value, Delimiter : string) : string Function SeparateRight( const Value, Delimiter : string) : string Function SGetParameter( const Value, Parameter : string) : string Procedure ParseParametersEx( Value, Delimiter : string; const Parameters : TStrings) Procedure ParseParameters( Value : string; const Parameters : TStrings) Function IndexByBegin( Value : string; const List : TStrings) : Int Function GetEmailAddr( const Value : string) : string Function GetEmailDesc( Value : string) : string Function CStrToHex( const Value : Ansistring) : string Function CIntToBin( Value : Int; Digits : Byte) : string Function CBinToInt( const Value : string) : Int Function ParseURL( URL : string; var Prot, User, Pass, Host, Port, Path, Para:string):string Function CReplaceString( Value, Search, Replace : AnsiString) : AnsiString Function CRPosEx( const Sub, Value : string; From : Int) : Int Function CRPos( const Sub, Value : String) : Int Function FetchBin( var Value : string; const Delimiter : string) : string Function CFetch( var Value : string; const Delimiter : string) : string Function FetchEx( var Value : string; const Delimiter, Quotation : string) : string Function IsBinaryString( const Value : AnsiString) : Boolean Function PosCRLF( const Value : AnsiString; var Terminator : AnsiString) : Int Procedure StringsTrim( const value : TStrings) Function PosFrom( const SubStr, Value : String; From : Int) : Int Function IncPoint( const p : ___pointer; Value : Int) : ___pointer Function GetBetween( const PairBegin, PairEnd, Value : string) : string Function CCountOfChar( const Value : string; aChr : char) : Int Function UnquoteStr( const Value : string; Quote : Char) : string Function QuoteStr( const Value : string; Quote : Char) : string Procedure HeadersToList( const Value : TStrings) Procedure ListToHeaders( const Value : TStrings) Function SwapBytes( Value : Int) : Int Function ReadStrFromStream( const Stream : TStream; len : Int) : AnsiString Procedure WriteStrToStream( const Stream : TStream; Value : AnsiString) Function GetTempFile( const Dir, prefix : AnsiString) : AnsiString Function CPadString( const Value : AnsiString; len : Int; Pad : AnsiChar): AnsiString Function CXorString( Indata1, Indata2 : AnsiString) : AnsiString Function NormalizeHeader( Value : TStrings; var Index : Int) : string end; procedure SIRegister_StCRC(CL: TPSPascalCompiler); begin ('CrcBufSize','LongInt'( 2048); Function Adler32Prim( var Data, DataSize : Cardinal; CurCrc : LongInt) : LongInt Function Adler32OfStream( Stream : TStream; CurCrc : LongInt) : LongInt Function Adler32OfFile( FileName : AnsiString) : LongInt Function Crc16Prim( var Data, DataSize, CurCrc : Cardinal) : Cardinal Function Crc16OfStream( Stream : TStream; CurCrc : Cardinal) : Cardinal Function Crc16OfFile( FileName : AnsiString) : Cardinal Function Crc32Prim( var Data, DataSize : Cardinal; CurCrc : LongInt) : LongInt Function Crc32OfStream( Stream : TStream; CurCrc : LongInt) : LongInt Function Crc32OfFile( FileName : AnsiString) : LongInt Function InternetSumPrim( var Data, DataSize, CurCrc : Cardinal) : Cardinal Function InternetSumOfStream( Stream : TStream; CurCrc : Cardinal) : Cardinal Function InternetSumOfFile( FileName : AnsiString) : Cardinal Function Kermit16Prim( var Data, DataSize, CurCrc : Cardinal) : Cardinal Function Kermit16OfStream( Stream : TStream; CurCrc : Cardinal) : Cardinal Function Kermit16OfFile( FileName : AnsiString) : Cardinal end; procedure SIRegister_ComObj(cl: TPSPascalCompiler); begin function CreateOleObject(const ClassName: String): IDispatch; function GetActiveOleObject(const ClassName: String): IDispatch; function ProgIDToClassID(const ProgID: string): TGUID; function ClassIDToProgID(const ClassID: TGUID): string; function CreateClassID: string; function CreateGUIDString: string; function CreateGUIDID: string; procedure OleError(ErrorCode: longint) procedure OleCheck(Result: HResult); end; Function xCreateOleObject( const ClassName : string) : Variant //or IDispatch Function xGetActiveOleObject( const ClassName : string) : Variant //Function DllGetClassObject( const CLSID : TCLSID; const IID : TIID; var Obj) : HResult Function DllCanUnloadNow : HResult Function DllRegisterServer : HResult Function DllUnregisterServer : HResult Function VarFromInterface( Unknown : IUnknown) : Variant Function VarToInterface( const V : Variant) : IDispatch Function VarToAutoObject( const V : Variant) : TAutoObject //Procedure DispInvoke(Dispatch:IDispatch;CallDesc:PCallDesc;DispIDs:PDispIDList;Params:Pointer;Res:PVariant); //Procedure DispInvokeError( Status : HResult; const ExcepInfo : TExcepInfo) Procedure OleError( ErrorCode : HResult) Procedure OleCheck( Result : HResult) Function StringToClassID( const S : string) : TCLSID Function ClassIDToString( const ClassID : TCLSID) : string Function xProgIDToClassID( const ProgID : string) : TCLSID Function xClassIDToProgID( const ClassID : TCLSID) : string Function xWideCompareStr( const S1, S2 : WideString) : Int Function xWideSameStr( const S1, S2 : WideString) : Boolean Function xGUIDToString( const ClassID : TGUID) : string Function xStringToGUID( const S : string) : TGUID Function xGetModuleName( Module : HMODULE) : string Function xAcquireExceptionObject : TObject Function xIfThen( AValue : Boolean; const ATrue : Int; const AFalse : Int) : Int Function xUtf8Encode( const WS : WideString) : UTF8String Function xUtf8Decode( const S : UTF8String) : WideString Function xExcludeTrailingPathDelimiter( const S : string) : string Function xIncludeTrailingPathDelimiter( const S : string) : string Function XRTLHandleCOMException : HResult Procedure XRTLCheckArgument( Flag : Boolean) //Procedure XRTLCheckOutArgument( out Arg) Procedure XRTLInterfaceConnect(const Source:IUnknown;const IID:TIID;const Sink:IUnknown;var Connection:Longint); Procedure XRTLInterfaceDisconnect(const Source: IUnknown; const IID:TIID;var Connection : Longint) Function XRTLRegisterActiveObject(const Unk:IUnknown;ClassID:TCLSID;Flags:DWORD;var RegisterCookie:Int):HResult Function XRTLUnRegisterActiveObject( var RegisterCookie : Int) : HResult //Function XRTLGetActiveObject( ClassID : TCLSID; RIID : TIID; out Obj) : HResult Procedure XRTLEnumActiveObjects( Strings : TStrings) function XRTLDefaultCategoryManager: IUnknown; function XRTLIsCategoryEmpty(CatID: TGUID; const CategoryManager: IUnknown = nil): Boolean; // ICatRegister helper functions function XRTLCreateComponentCategory(CatID: TGUID; CatDescription: WideString; LocaleID: TLCID = LOCALE_USER_DEFAULT; const CategoryManager: IUnknown = nil): HResult; function XRTLRemoveComponentCategory(CatID: TGUID; CatDescription: WideString; LocaleID: TLCID = LOCALE_USER_DEFAULT; const CategoryManager: IUnknown = nil): HResult; function XRTLRegisterCLSIDInCategory(ClassID: TGUID; CatID: TGUID; const CategoryManager: IUnknown = nil): HResult; function XRTLUnRegisterCLSIDInCategory(ClassID: TGUID; CatID: TGUID; const CategoryManager: IUnknown = nil): HResult; // ICatInformation helper functions function XRTLGetCategoryDescription(CatID: TGUID; var CatDescription: WideString; LocaleID: TLCID = LOCALE_USER_DEFAULT; const CategoryManager: IUnknown = nil): HResult; function XRTLGetCategoryList(Strings: TStrings; LocaleID: TLCID = LOCALE_USER_DEFAULT; const CategoryManager: IUnknown = nil): HResult; function XRTLGetCategoryCLSIDList(CatID: TGUID; Strings: TStrings; const CategoryManager: IUnknown = nil): HResult; function XRTLGetCategoryProgIDList(CatID: TGUID; Strings: TStrings; const CategoryManager: IUnknown = nil): HResult; function XRTLFetch(var AInput: WideString; const ADelim: WideString = ' '; const ADelete: Boolean = True): WideString; function XRTLRPos(const ASub, AIn: WideString; AStart: Int = -1): Int; Function XRTLGetVariantAsString( const Value : Variant) : string Function XRTLDateTimeToTimeZoneTime( DT : TDateTime; TimeZone : TXRTLTimeZone) : TDateTime Function XRTLGetTimeZones : TXRTLTimeZones Function XFileTimeToDateTime( FileTime : TFileTime) : TDateTime Function DateTimeToFileTime( DateTime : TDateTime) : TFileTime Function GMTNow : TDateTime Function GMTToLocalTime( GMT : TDateTime) : TDateTime Function LocalTimeToGMT( LocalTime : TDateTime) : TDateTime Procedure XRTLNotImplemented Procedure XRTLRaiseError( E : Exception) Procedure XRTLRaise( E : Exception); Procedure XRaise( E : Exception); Procedure XRTLInvalidOperation( ClassName:string; OperationName:string; Description: string) procedure SIRegister_xrtl_util_Value(CL: TPSPascalCompiler); begin SIRegister_IXRTLValue(CL); SIRegister_TXRTLValue(CL); //AddTypeS('PXRTLValueArray', '^TXRTLValueArray // will not work AddTypeS('TXRTLValueArray', 'array of IXRTLValue Function XRTLValue( const AValue : Cardinal) : IXRTLValue; Function XRTLSetValue( const IValue : IXRTLValue; const AValue : Cardinal) : Cardinal; Function XRTLGetAsCardinal( const IValue : IXRTLValue) : Cardinal Function XRTLGetAsCardinalDef( const IValue : IXRTLValue; const DefValue : Cardinal) : Cardinal Function XRTLValue1( const AValue : Int) : IXRTLValue; Function XRTLSetValue1( const IValue : IXRTLValue; const AValue : Int) : Int; Function XRTLGetAsInt( const IValue : IXRTLValue) : Int Function XRTLGetAsIntDef( const IValue : IXRTLValue; const DefValue : Int) : Int Function XRTLValue2( const AValue : Int64) : IXRTLValue; Function XRTLSetValue2( const IValue : IXRTLValue; const AValue : Int64) : Int64; Function XRTLGetAsInt64( const IValue : IXRTLValue) : Int64 Function XRTLGetAsInt64Def( const IValue : IXRTLValue; const DefValue : Int64) : Int64 Function XRTLValue3( const AValue : Single) : IXRTLValue; Function XRTLSetValue3( const IValue : IXRTLValue; const AValue : Single) : Single; Function XRTLGetAsSingle( const IValue : IXRTLValue) : Single Function XRTLGetAsSingleDef( const IValue : IXRTLValue; const DefValue : Single) : Single Function XRTLValue4( const AValue : Double) : IXRTLValue; Function XRTLSetValue4( const IValue : IXRTLValue; const AValue : Double) : Double; Function XRTLGetAsDouble( const IValue : IXRTLValue) : Double Function XRTLGetAsDoubleDef( const IValue : IXRTLValue; const DefValue : Double) : Double Function XRTLValue5( const AValue : Extended) : IXRTLValue; Function XRTLSetValue5( const IValue : IXRTLValue; const AValue : Extended) : Extended; Function XRTLGetAsExtended( const IValue : IXRTLValue) : Extended Function XRTLGetAsExtendedDef( const IValue : IXRTLValue; const DefValue : Extended) : Extended Function XRTLValue6( const AValue : IInterface) : IXRTLValue; Function XRTLSetValue6( const IValue : IXRTLValue; const AValue : IInterface) : IInterface; Function XRTLGetAsInterface( const IValue : IXRTLValue) : IInterface; //Function XRTLGetAsInterface1( const IValue : IXRTLValue; out Obj) : IInterface; Function XRTLGetAsInterfaceDef( const IValue : IXRTLValue; const DefValue : IInterface) : IInterface; Function XRTLValue7( const AValue : WideString) : IXRTLValue; Function XRTLSetValue7( const IValue : IXRTLValue; const AValue : WideString) : WideString; Function XRTLGetAsWideString( const IValue : IXRTLValue) : WideString Function XRTLGetAsWideStringDef( const IValue : IXRTLValue; const DefValue : WideString) : WideString Function XRTLValue8( const AValue : TObject; const AOwnValue : Boolean) : IXRTLValue; Function XRTLSetValue8( const IValue : IXRTLValue; const AValue : TObject) : TObject; Function XRTLGetAsObject(const IValue: IXRTLValue; const ADetachOwnership: Boolean): TObject; Function XRTLGetAsObjectDef(const IValue:IXRTLValue;const DefValue:TObject;const ADetachOwnership:Boolean):TObject; //Function XRTLValue9( const AValue : __Pointer) : IXRTLValue; //Function XRTLSetValue9( const IValue : IXRTLValue; const AValue : __Pointer) : __Pointer; //Function XRTLGetAsPointer( const IValue : IXRTLValue) : __Pointer //Function XRTLGetAsPointerDef( const IValue : IXRTLValue; const DefValue : __Pointer) : __Pointer Function XRTLValueV( const AValue : Variant) : IXRTLValue; Function XRTLSetValueV( const IValue : IXRTLValue; const AValue : Variant) : Variant; Function XRTLGetAsVariant( const IValue : IXRTLValue) : Variant Function XRTLGetAsVariantDef( const IValue : IXRTLValue; const DefValue : Variant) : Variant Function XRTLValue10( const AValue : Currency) : IXRTLValue; Function XRTLSetValue10( const IValue : IXRTLValue; const AValue : Currency) : Currency; Function XRTLGetAsCurrency( const IValue : IXRTLValue) : Currency Function XRTLGetAsCurrencyDef( const IValue : IXRTLValue; const DefValue : Currency) : Currency Function XRTLValue11( const AValue : Comp) : IXRTLValue; Function XRTLSetValue11( const IValue : IXRTLValue; const AValue : Comp) : Comp; Function XRTLGetAsComp( const IValue : IXRTLValue) : Comp Function XRTLGetAsCompDef( const IValue : IXRTLValue; const DefValue : Comp) : Comp Function XRTLValue12( const AValue : TClass) : IXRTLValue; Function XRTLSetValue12( const IValue : IXRTLValue; const AValue : TClass) : TClass; Function XRTLGetAsClass( const IValue : IXRTLValue) : TClass Function XRTLGetAsClassDef( const IValue : IXRTLValue; const DefValue : TClass) : TClass Function XRTLValue13( const AValue : TGUID) : IXRTLValue; Function XRTLSetValue13( const IValue : IXRTLValue; const AValue : TGUID) : TGUID; Function XRTLGetAsGUID( const IValue : IXRTLValue) : TGUID Function XRTLGetAsGUIDDef( const IValue : IXRTLValue; const DefValue : TGUID) : TGUID Function XRTLValue14( const AValue : Boolean) : IXRTLValue; Function XRTLSetValue14( const IValue : IXRTLValue; const AValue : Boolean) : Boolean; Function XRTLGetAsBoolean( const IValue : IXRTLValue) : Boolean Function XRTLGetAsBooleanDef( const IValue : IXRTLValue; const DefValue : Boolean) : Boolean end; //*****************************unit uPSI_GR32;******************************************* Function Color32( WinColor : TColor) : TColor32; Function Color321( R, G, B : Byte; A : Byte) : TColor32; Function Color322( Index : Byte; var Palette : TPalette32) : TColor32; Function Gray32( Intensity : Byte; Alpha : Byte) : TColor32 Function WinColor( Color32 : TColor32) : TColor Function ArrayOfColor32( Colors : array of TColor32) : TArrayOfColor32 Procedure Color32ToRGB( Color32 : TColor32; var R, G, B : Byte) Procedure Color32ToRGBA( Color32 : TColor32; var R, G, B, A : Byte) Function Color32Components( R, G, B, A : Boolean) : TColor32Components Function RedComponent( Color32 : TColor32) : Int Function GreenComponent( Color32 : TColor32) : Int Function BlueComponent( Color32 : TColor32) : Int Function AlphaComponent( Color32 : TColor32) : Int Function Intensity( Color32 : TColor32) : Int Function SetAlpha( Color32 : TColor32; NewAlpha : Int) : TColor32 Function HSLtoRGB( H, S, L : Single) : TColor32; Procedure RGBtoHSL( RGB : TColor32; out H, S, L : Single); Function HSLtoRGB1( H, S, L : Int) : TColor32; Procedure RGBtoHSL1( RGB : TColor32; out H, S, L : Byte); Function WinPalette( const P : TPalette32) : HPALETTE Function FloatPoint( X, Y : Single) : TFloatPoint; Function FloatPoint1( const P : TPoint) : TFloatPoint; Function FloatPoint2( const FXP : TFixedPoint) : TFloatPoint; Function FixedPoint( X, Y : Int) : TFixedPoint; Function FixedPoint1( X, Y : Single) : TFixedPoint; Function FixedPoint2( const P : TPoint) : TFixedPoint; Function FixedPoint3( const FP : TFloatPoint) : TFixedPoint; AddTypeS('TRectRounding', '( rrClosest, rrOutside, rrInside ) Function MakeRect( const L, T, R, B : Int) : TRect; Function MakeRect1( const FR : TFloatRect; Rounding : TRectRounding) : TRect; Function MakeRect2( const FXR : TRect; Rounding : TRectRounding) : TRect; Function GFixedRect( const L, T, R, B : TFixed) : TRect; Function FixedRect1( const ARect : TRect) : TRect; Function FixedRect2( const FR : TFloatRect) : TRect; Function GFloatRect( const L, T, R, B : TFloat) : TFloatRect; Function FloatRect1( const ARect : TRect) : TFloatRect; Function FloatRect2( const FXR : TRect) : TFloatRect; Function GIntersectRect( out Dst : TRect; const R1, R2 : TRect) : Boolean; Function IntersectRect1( out Dst : TFloatRect; const FR1, FR2 : TFloatRect) : Boolean; Function GUnionRect( out Rect : TRect; const R1, R2 : TRect) : Boolean; Function UnionRect1( out Rect : TFloatRect; const R1, R2 : TFloatRect) : Boolean; Function GEqualRect( const R1, R2 : TRect) : Boolean; Function EqualRect1( const R1, R2 : TFloatRect) : Boolean; Procedure GInflateRect( var R : TRect; Dx, Dy : Int); Procedure InflateRect1( var FR : TFloatRect; Dx, Dy : TFloat); Procedure GOffsetRect( var R : TRect; Dx, Dy : Int); Procedure OffsetRect1( var FR : TFloatRect; Dx, Dy : TFloat); Function IsRectEmpty( const R : TRect) : Boolean; Function IsRectEmpty1( const FR : TFloatRect) : Boolean; Function GPtInRect( const R : TRect; const P : TPoint) : Boolean; Function PtInRect1( const R : TFloatRect; const P : TPoint) : Boolean; Function PtInRect2( const R : TRect; const P : TFloatPoint) : Boolean; Function PtInRect3( const R : TFloatRect; const P : TFloatPoint) : Boolean; Function EqualRectSize( const R1, R2 : TRect) : Boolean; Function EqualRectSize1( const R1, R2 : TFloatRect) : Boolean; Function MessageBeep( uType : UINT) : BOOL Function ShowCursor( bShow : BOOL) : Int Function SetCursorPos( X, Y : Int) : BOOL Function SetCursor( hCursor : HICON) : HCURSOR Function GetCursorPos( var lpPoint : TPoint) : BOOL //Function ClipCursor( lpRect : PRect) : BOOL Function GetClipCursor( var lpRect : TRect) : BOOL Function GetCursor : HCURSOR Function CreateCaret( hWnd : HWND; hBitmap : HBITMAP; nWidth, nHeight : Int) : BOOL Function GetCaretBlinkTime : UINT Function SetCaretBlinkTime( uMSeconds : UINT) : BOOL Function DestroyCaret : BOOL Function HideCaret( hWnd : HWND) : BOOL Function ShowCaret( hWnd : HWND) : BOOL Function SetCaretPos( X, Y : Int) : BOOL Function GetCaretPos( var lpPoint : TPoint) : BOOL Function ClientToScreen( hWnd : HWND; var lpPoint : TPoint) : BOOL Function ScreenToClient( hWnd : HWND; var lpPoint : TPoint) : BOOL Function MapWindowPoints(hWndFrom,hWndTo:HWND; var lpPoints, cPoints : UINT) : Int Function WindowFromPoint( Point : TPoint) : HWND Function ChildWindowFromPoint( hWndParent : HWND; Point : TPoint) : HWND procedure SIRegister_GR32_Math(CL: TPSPascalCompiler); begin Function FixedFloor( A : TFixed) : Int Function FixedCeil( A : TFixed) : Int Function FixedMul( A, B : TFixed) : TFixed Function FixedDiv( A, B : TFixed) : TFixed Function OneOver( Value : TFixed) : TFixed Function FixedRound( A : TFixed) : Int Function FixedSqr( Value : TFixed) : TFixed Function FixedSqrtLP( Value : TFixed) : TFixed Function FixedSqrtHP( Value : TFixed) : TFixed Function FixedCombine( W, X, Y : TFixed) : TFixed Procedure GRSinCos( const Theta : TFloat; out Sin, Cos : TFloat); Procedure GRSinCos1( const Theta, Radius : Single; out Sin, Cos : Single); Function GRHypot( const X, Y : TFloat) : TFloat; Function Hypot1( const X, Y : Int) : Int; Function FastSqrt( const Value : TFloat) : TFloat Function FastSqrtBab1( const Value : TFloat) : TFloat Function FastSqrtBab2( const Value : TFloat) : TFloat Function FastInvSqrt( const Value : Single) : Single; Function MulDiv( Multiplicand, Multiplier, Divisor : Int) : Int Function GRIsPowerOf2( Value : Int) : Boolean Function PrevPowerOf2( Value : Int) : Int Function NextPowerOf2( Value : Int) : Int Function Average( A, B : Int) : Int Function GRSign( Value : Int) : Int Function FloatMod( x, y : Double) : Double end; procedure SIRegister_GR32_LowLevel(CL: TPSPascalCompiler); begin Function Clamp( const Value : Int) : Int; Procedure GRFillWord( var X, Count : Cardinal; Value : Longword) Function StackAlloc( Size : Int) : Pointer Procedure StackFree( P : Pointer) Procedure Swap( var A, B : Pointer); Procedure Swap1( var A, B : Int); Procedure Swap2( var A, B : TFixed); Procedure Swap3( var A, B : TColor32); Procedure TestSwap( var A, B : Int); Procedure TestSwap1( var A, B : TFixed); Function TestClip( var A, B : Int; const Size : Int) : Boolean; Function TestClip1( var A, B : Int; const Start, Stop : Int) : Boolean; Function GRConstrain( const Value, Lo, Hi : Int) : Int; Function Constrain1( const Value, Lo, Hi : Single) : Single; Function SwapConstrain( const Value:Int; Constrain1,Constrain2:Int) : Int Function GRMin( const A, B, C : Int) : Int; Function GRMax( const A, B, C : Int) : Int; Function Clamp( Value, Max : Int) : Int; Function Clamp1( Value, Min, Max : Int) : Int; Function Wrap( Value, Max : Int) : Int; Function Wrap1( Value, Min, Max : Int) : Int; Function Wrap3( Value, Max : Single) : Single;; Function WrapPow2( Value, Max : Int) : Int; Function WrapPow21( Value, Min, Max : Int) : Int; Function Mirror( Value, Max : Int) : Int; Function Mirror1( Value, Min, Max : Int) : Int; Function MirrorPow2( Value, Max : Int) : Int; Function MirrorPow21( Value, Min, Max : Int) : Int; Function GetOptimalWrap( Max : Int) : TWrapProc; Function GetOptimalWrap1( Min, Max : Int) : TWrapProcEx; Function GetOptimalMirror( Max : Int) : TWrapProc; Function GetOptimalMirror1( Min, Max : Int) : TWrapProcEx; Function GetWrapProc( WrapMode : TWrapMode) : TWrapProc; Function GetWrapProc1( WrapMode : TWrapMode; Max : Int) : TWrapProc; Function GetWrapProcEx( WrapMode : TWrapMode) : TWrapProcEx; Function GetWrapProcEx1( WrapMode : TWrapMode; Min, Max : Int):TWrapProcEx; Function Div255( Value : Cardinal) : Cardinal Function SAR_4( Value : Int) : Int Function SAR_8( Value : Int) : Int Function SAR_9( Value : Int) : Int Function SAR_11( Value : Int) : Int Function SAR_12( Value : Int) : Int Function SAR_13( Value : Int) : Int Function SAR_14( Value : Int) : Int Function SAR_15( Value : Int) : Int Function SAR_16( Value : Int) : Int Function ColorSwap( WinColor : TColor) : TColor32 end; procedure SIRegister_GR32_Filters(CL: TPSPascalCompiler); begin AddTypeS('TLogicalOperator', '( loXOR, loAND, loOR ) Procedure CopyComponents( Dst, Src : TCustomBitmap32; Components : TColor32Components); Procedure CopyComponents1(Dst:TCustBmap32;DstX,DstY:Int;Src:TCustomBmap32;SrcRect:TRect;Components:TColor32Comp; Procedure AlphaToGrayscale( Dst, Src : TCustomBitmap32) Procedure ColorToGrayscale( Dst, Src : TCustomBitmap32; PreserveAlpha : Boolean) Procedure IntensityToAlpha( Dst, Src : TCustomBitmap32) Procedure Invert( Dst, Src : TCustomBitmap32; Components : TColor32Components) Procedure InvertRGB( Dst, Src : TCustomBitmap32) Procedure ApplyLUT( Dst, Src : TCustomBitmap32; const LUT : TLUT8; PreserveAlpha : Boolean) Procedure ChromaKey( ABitmap : TCustomBitmap32; TrColor : TColor32) Function CreateBitmask( Components : TColor32Components) : TColor32 Procedure ApplyBitmask(Dst:TCustomBitmap32;DstX,DstY:Int;Src:TCustomBitmap32;SrcRect:TRect; Bitmask:TColor32;LogicalOperator:TLogicalOperator); Procedure ApplyBitmask1(ABitmap:TCustomBitmap32;ARect:TRect;Bitmask:TColor32;LogicalOperator:TLogicalOperator); Procedure CheckParams( Dst, Src : TCustomBitmap32; ResizeDst : Boolean) end; procedure SIRegister_JclNTFS(CL: TPSPascalCompiler); begin AddClassN(FindClass('TOBJECT'),'EJclNtfsError AddTypeS('TFileCompressionState', '( fcNoCompression, fcDefaultCompression, fcLZNT1Compression ) Function NtfsGetCompression( const FileName : string; var State : Short) : Boolean; Function NtfsGetCompression1( const FileName : string) : TFileCompressionState; Function NtfsSetCompression( const FileName : string; const State : Short) : Boolean Procedure NtfsSetFileCompression(const FileName: string; const State: TFileCompressionState) Procedure NtfsSetDirectoryTreeCompression(const Directory: string; const State : TFileCompressionState) Procedure NtfsSetDefaultFileCompression(const Directory: string; const State:TFileCompressionState) Procedure NtfsSetPathCompression(const Path:string;const State:TFileCompressionState;Recursive:Boolean; //AddTypeS('TNtfsAllocRanges', 'record Entries : Int; Data : PFileAlloca' //+'tedRangeBuffer; MoreData : Boolean; end Function NtfsSetSparse( const FileName : string) : Boolean Function NtfsZeroDataByHandle( const Handle : THandle; const First, Last : Int64) : Boolean Function NtfsZeroDataByName( const FileName : string; const First, Last : Int64) : Boolean //Function NtfsQueryAllocRanges(const FileName:string;Offset,Count:Int64;var Ranges:TNtfsAllocRanges):Boolean; //Function NtfsGetAllocRangeEntry( const Ranges : TNtfsAllocRanges; Index:Int):TFileAllocatedRangeBuffer Function NtfsSparseStreamsSupported( const Volume : string) : Boolean Function NtfsGetSparse( const FileName : string) : Boolean Function NtfsDeleteReparsePoint( const FileName : string; ReparseTag : DWORD) : Boolean Function NtfsSetReparsePoint( const FileName : string; var ReparseData, Size : Longword) : Boolean //Function NtfsGetReparsePoint(const FileName:string; var ReparseData:TReparseGuidDataBuffer):Boolean Function NtfsGetReparseTag( const Path : string; var Tag : DWORD) : Boolean Function NtfsReparsePointsSupported( const Volume : string) : Boolean Function NtfsFileHasReparsePoint( const Path : string) : Boolean Function NtfsIsFolderMountPoint( const Path : string) : Boolean Function NtfsMountDeviceAsDrive( const Device : string; Drive : Char) : Boolean Function NtfsMountVolume( const Volume : Char; const MountPoint : string) : Boolean AddTypeS('TOpLock', '( olExclusive, olReadOnly, olBatch, olFilter ) Function NtfsOpLockAckClosePending( Handle : THandle; Overlapped : TOverlapped) : Boolean Function NtfsOpLockBreakAckNo2( Handle : THandle; Overlapped : TOverlapped) : Boolean Function NtfsOpLockBreakAcknowledge( Handle : THandle; Overlapped : TOverlapped) : Boolean Function NtfsOpLockBreakNotify( Handle : THandle; Overlapped : TOverlapped) : Boolean Function NtfsRequestOpLock(Handle:THandle; Kind : TOpLock; Overlapped : TOverlapped) : Bool Function NtfsCreateJunctionPoint( const Source, Destination : string) : Boolean Function NtfsDeleteJunctionPoint( const Source : string) : Boolean Function NtfsGetJunctionPointDestination(const Source: string;var Destination:string):Bool AddTypeS('TStreamId', '( siInvalid, siStandard, siExtendedAttribute, siSec' +'urity, siAlternate, siHardLink, siProperty, siObjectIdentifier, siReparsePoints, siSparseFile ) AddTypeS('TStreamIds', 'set of TStreamId AddTypeS('TInternalFindStreamData', 'record FileHandle : THandle; Context ' +': ___Pointer; StreamIds : TStreamIds; end AddTypeS('TFindStreamData', 'record internal : TInternalFindStreamData; At' +'tributes : DWORD; StreamID : TStreamId; Name : WideString; Size : Int64; end Function NtfsFindFirstStream(const FileName:string;StreamIds:TStreamIds;var Data:TFindStreamData):Boolean; Function NtfsFindNextStream( var Data : TFindStreamData) : Boolean Function NtfsFindStreamClose( var Data : TFindStreamData) : Boolean Function NtfsCreateHardLink( const LinkFileName, ExistingFileName : string) : Boolean AddTypeS('TNtfsHardLinkInfo', 'record LinkCount : Cardinal; FileIndex : Int64; end Function NtfsGetHardLinkInfo( const FileName : string; var Info : TNtfsHardLinkInfo) : Boolean Function NtfsFindHardLinks(const Path:string;const FileIndexHigh,FileIndexLow:Cardinal;const List:TStrings):Bool; Function NtfsDeleteHardLinks( const FileName : string) : Boolean Function JclAppInstances : TJclAppInstances; Function JclAppInstances1( const UniqueAppIdGuidStr : string) : TJclAppInstances; Function ReadMessageCheck( var Message: TMessage;const IgnoredOriginatorWnd: HWND) : TJclAppInstDataKind Procedure ReadMessageData(const Message: TMessage;var Data : ___Pointer; var Size : Int) Procedure ReadMessageString( const Message : TMessage; var S : string) Procedure ReadMessageStrings( const Message : TMessage; const Strings : TStrings) (*----------------------------------------------------------------------------*) procedure SIRegister_JclGraphics(CL: TPSPascalCompiler); begin FindClass('TOBJECT'),'EJclGraphicsError TDynDynIntArrayArray', 'array of TDynIntArray TDynPointArray', 'array of TPoint TDynDynPointArrayArray', 'array of TDynPointArray TPointF', 'record X : Single; Y : Single; end TDynPointArrayF', 'array of TPointF TDrawMode2', '( dmOpaque, dmBlend ) TStretchFilter2', '( sfNearest, sfLinear, sfSpline ) TConversionKind', '( ckRed, ckGreen, ckBlue, ckAlpha, ckUniformRGB, ckWeightedRGB ) TResamplingFilter', '(rfBox,rfTriangle,rfHermite, rfBell, rfSpline, rfLanczos3, rfMitchell ) TMatrix3d', 'record array[0..2,0..2] of extended end TDynDynPointArrayArrayF', 'array of TDynPointArrayF TScanLine', 'array of Int TScanLines', 'array of TScanLine TColorChannel', '( ccRed, ccGreen, ccBlue, ccAlpha ) TGradientDirection', '( gdVertical, gdHorizontal ) TPolyFillMode', '( fmAlternate, fmWinding ) TJclRegionCombineOperator', '( coAnd, coDiff, coOr, coXor ) TJclRegionBitmapMode', '( rmInclude, rmExclude ) TJclRegionKind', '( rkNull, rkSimple, rkComplex, rkError ) SIRegister_TJclDesktopCanvas(CL); FindClass('TOBJECT'),'TJclRegion SIRegister_TJclRegionInfo(CL); SIRegister_TJclRegion(CL); SIRegister_TJclThreadPersistent(CL); SIRegister_TJclCustomMap(CL); SIRegister_TJclBitmap32(CL); SIRegister_TJclByteMap(CL); SIRegister_TJclTransformation(CL); SIRegister_TJclLinearTransformation(CL); Procedure Stretch(NewWidth,NewHeight:Card;Filter:TResamplingFilter;Radius:Single;Source:TGraphic;Target:TBitmap); Procedure Stretch1(NewWidth,NewHeight:Cardinal;Filter:TResamplingFilter;Radius:Single;Bitmap:TBitmap); Procedure DrawBitmap( DC : HDC; Bitmap : HBitMap; X, Y, Width, Height : Int) Function GetAntialiasedBitmap( const Bitmap : TBitmap) : TBitmap Procedure BitmapToJPeg( const FileName : string) Procedure JPegToBitmap( const FileName : string) Function ExtractIconCount( const FileName : string) : Int Function BitmapToIconJ( Bitmap : HBITMAP; cx, cy : Int) : HICON Function IconToBitmapJ( Icon : HICON) : HBITMAP Procedure BlockTransfer(Dst:TJclBitmap32;DstX:Int;DstY:Int;Src:TJclBitmap32;SrcRect:TRect;CombineOp:TDrawMode) Procedure StretchTransfer(Dst:TJclBitmap32;DstRect:TRect;Src:TJclBitmap32;SrcRect:TRect;StretchFilter:TStretchFilter; CombineOp : TDrawMode) Procedure Transform( Dst, Src : TJclBitmap32; SrcRect : TRect; Transformation : TJclTransformation) Procedure SetBorderTransparent( ABitmap : TJclBitmap32; ARect : TRect) Function FillGradient(DC:HDC;ARect:TRect;ColorCount:Int;StartColor,EndColor:TColor;ADirection:TGradientDirection):Bool; Function CreateRegionFromBitmap(Bitmap:TBitmap;RegionColor:TColor;RegionBitmapMode:TJclRegionBitmapMode): HRGN Procedure ScreenShot( bm : TBitmap; Left, Top, Width, Height : Int; Window : HWND); Procedure ScreenShot1( bm : TBitmap); Procedure PolyLineTS( Bitmap : TJclBitmap32; const Points : TDynPointArray; Color : TColor32) Procedure PolyLineAS( Bitmap : TJclBitmap32; const Points : TDynPointArray; Color : TColor32) Procedure PolyLineFS( Bitmap : TJclBitmap32; const Points : TDynPointArrayF; Color : TColor32) Procedure PolygonTS( Bitmap : TJclBitmap32; const Points : TDynPointArray; Color : TColor32) Procedure PolygonAS( Bitmap : TJclBitmap32; const Points : TDynPointArray; Color : TColor32) Procedure PolygonFS( Bitmap : TJclBitmap32; const Points : TDynPointArrayF; Color : TColor32) Procedure PolyPolygonTS(Bitm:TJclBitmap32;const Points:TDynDynPointArrayArray;Color:TColor32); Procedure PolyPolygonAS(Bitm:TJclBitmap32;const Points:TDynDynPointArrayArray;Color:TColor32); Procedure PolyPolygonFS(Bitmap:TJclBitmap32;const Points:TDynDynPointArrayArrayF;Color:TColor32); Procedure AlphaToGrayscale( Dst, Src : TJclBitmap32) Procedure IntensityToAlpha( Dst, Src : TJclBitmap32) Procedure Invert( Dst, Src : TJclBitmap32) Procedure InvertRGB( Dst, Src : TJclBitmap32) Procedure ColorToGrayscale( Dst, Src : TJclBitmap32) Procedure ApplyLUT( Dst, Src : TJclBitmap32; const LUT : TLUT8) Procedure SetGamma( Gamma : Single) end; (*----------------------------------------------------------------------------*) procedure SIRegister_JclSynch(CL: TPSPascalCompiler); begin Function LockedAdd( var Target : Int; Value : Int) : Int Function LockedCompareExchange( var Target : Int; Exch, Comp : Int) : Int; Function LockedCompareExchange1( var Target : ___Pointer; Exch, Comp : ___Pointer) : Pointer; Function LockedDec( var Target : Int) : Int Function LockedExchange( var Target : Int; Value : Int) : Int Function LockedExchangeAdd( var Target : Int; Value : Int) : Int Function LockedExchangeDec( var Target : Int) : Int Function LockedExchangeInc( var Target : Int) : Int Function LockedExchangeSub( var Target : Int; Value : Int) : Int Function LockedInc( var Target : Int) : Int Function LockedSub( var Target : Int; Value : Int) : Int TJclWaitResult', '( wrAbandoned, wrError, wrIoCompletion, wrSignaled, wrTimeout ) SIRegister_TJclDispatcherObject(CL); Function WaitForMultipleObjects(const Objects:array of TJclDispatcherObject;WaitAll:Bool;TimeOut:Cardin):Cardinal; Function WaitAlertableForMultipleObjects(const Objects:array of TJclDispatcherObject;WaitAll:Bool;TimeOut:Cardinal):Cardinal SIRegister_TJclCriticalSection(CL); SIRegister_TJclCriticalSectionEx(CL); SIRegister_TJclEvent(CL); SIRegister_TJclWaitableTimer(CL); SIRegister_TJclSemaphore(CL); SIRegister_TJclMutex(CL); POptexSharedInfo', '^TOptexSharedInfo // will not work TOptexSharedInfo','record SpinCount:Int; LockCount: Int; ThreadId:Longword; RecursionCount:Int; end SIRegister_TJclOptex(CL); TMrewPreferred', '( mpReaders, mpWriters, mpEqual ) TMrewThreadInfo', 'record ThreadId : Longword; RecursionCount: Int; Reader : Boolean; end TMrewThreadInfoArray', 'array of TMrewThreadInfo SIRegister_TJclMultiReadExclusiveWrite(CL); PMetSectSharedInfo', '^TMetSectSharedInfo // will not work TMetSectSharedInfo', 'record Initialized : LongBool; SpinLock : ' +'Longint; ThreadsWaiting : Longint; AvailableCount : Longint; MaximumCount : Longint; end PMeteredSection', '^TMeteredSection // will not work TMeteredSection', 'record Event:THandle; FileMap:THandle; SharedInfo:PMetSectSharedInfo; end SIRegister_TJclMeteredSection(CL); TEventInfo', 'record EventType : Longint; Signaled : LongBool; end TMutexInfo', 'record SignalState : Longint; Owned : Boolean; Abandoned : Boolean; end TSemaphoreCounts', 'record CurrentCount : Longint; MaximumCount: Longint; end TTimerInfo', 'record Remaining : TLargeInt; Signaled : LongBool; end Function QueryCriticalSection( CS : TJclCriticalSection; var Info : TRTLCriticalSection): Boolean Function QueryEvent( Handle : THandle; var Info : TEventInfo) : Boolean Function QueryMutex( Handle : THandle; var Info : TMutexInfo) : Boolean Function QuerySemaphore( Handle : THandle; var Info : TSemaphoreCounts) : Boolean Function QueryTimer( Handle : THandle; var Info : TTimerInfo) : Boolean FindClass('TOBJECT'),'EJclWin32HandleObjectError FindClass('TOBJECT'),'EJclDispatcherObjectError FindClass('TOBJECT'),'EJclCriticalSectionError FindClass('TOBJECT'),'EJclEventError FindClass('TOBJECT'),'EJclWaitableTimerError FindClass('TOBJECT'),'EJclSemaphoreError FindClass('TOBJECT'),'EJclMutexError FindClass('TOBJECT'),'EJclMeteredSectionError end; //***************************unit uPSI_mORMotReport; Procedure SetCurrentPrinterAsDefault Function CurrentPrinterName : string Function mCurrentPrinterPaperSize : string Procedure UseDefaultPrinter procedure SIRegisterTSTREAM(Cl: TPSPascalCompiler); begin with FindClass('TOBJECT'), 'TStream') do begin IsAbstract := True; //RegisterMethod('Function Read( var Buffer, Count : Longint) : Longint // RegisterMethod('Function Write( const Buffer, Count : Longint) : Longint function Read(Buffer:String;Count:LongInt):LongInt function Write(Buffer:String;Count:LongInt):LongInt function ReadString(Buffer:String;Count:LongInt):LongInt //FileStream function WriteString(Buffer:String;Count:LongInt):LongInt function ReadInt(Buffer:Int;Count:LongInt):LongInt function WriteInt(Buffer:Int;Count:LongInt):LongInt function ReadByteArray(Buffer:TByteArray;Count:LongInt):LongInt; function WriteByteArray(Buffer:TByteArray;Count:LongInt):LongInt; procedure ReadAB(Buffer: TByteArray;Count:LongInt) procedure WriteAB(Buffer: TByteArray;Count:LongInt) procedure ReadABD(Buffer: TByteDynArray;Count:LongInt) procedure WriteABD(Buffer: TByteDynArray;Count:LongInt) procedure ReadAC(Buffer: TCharArray;Count:LongInt) procedure WriteAC(Buffer: TCharArray;Count:LongInt) procedure ReadACD(Buffer: TCharDynArray;Count:LongInt) procedure WriteACD(Buffer: TCharDynArray;Count:LongInt) function Seek(Offset:LongInt;Origin:Word):LongInt procedure ReadBuffer(Buffer:String;Count:LongInt) procedure WriteBuffer(Buffer:String;Count:LongInt) procedure ReadBufferInt(Buffer:Int;Count:LongInt); procedure WriteBufferInt(Buffer:Int;Count:LongInt); procedure ReadBufferFloat(Buffer:Double;Count:LongInt); Procedure WriteBufferFloat(Buffer:Double;Count:LongInt); procedure ReadBufferAB(Buffer: TByteArray;Count:LongInt) procedure WriteBufferAB(Buffer: TByteArray;Count:LongInt) procedure ReadBufferABD(Buffer: TByteDynArray;Count:LongInt) procedure WriteBufferABD(Buffer: TByteDynArray;Count:LongInt) procedure ReadBufferAW(Buffer: TWordArray;Count:LongInt) procedure WriteBufferAW(Buffer: TWordArray;Count:LongInt) procedure ReadBufferAWD(Buffer: TWordDynArray;Count:LongInt) procedure WriteBufferAWD(Buffer: TWordDynArray;Count:LongInt) procedure ReadBufferAW(Buffer: TWordArray;Count:LongInt) procedure WriteBufferAW(Buffer: TWordArray;Count:LongInt) procedure ReadBufferAC(Buffer: TCharArray;Count:LongInt) procedure WriteBufferAC(Buffer: TCharArray;Count:LongInt) procedure ReadBufferACD(Buffer: TCharDynArray;Count:LongInt) procedure WriteBufferACD(Buffer: TCharDynArray;Count:LongInt) procedure ReadBufferP(Buffer: PChar;Count:LongInt) procedure WriteBufferP(Buffer: PChar;Count:LongInt) procedure ReadBufferO(Buffer: TObject;Count:LongInt); procedure WriteBufferO(Buffer: TObject;Count:LongInt); //READBUFFERAC function InstanceSize: Longint Procedure FixupResourceHeader( FixupInfo : Int) Procedure ReadResHeader {$IFDEF DELPHI4UP} function CopyFrom(Source:TStream;Count:Int64):LongInt {$ELSE} function CopyFrom(Source:TStream;Count:Int):LongInt {$ENDIF} RegisterProperty('Position', 'LongInt', iptrw); RegisterProperty('Size', 'LongInt', iptrw); end; end; { ****************************************************************** Unit DMATH - Interface for DMATH.DLL ****************************************************************** } // see more docs/dmath_manual.pdf Function InitEval : Int Procedure SetVariable( VarName : Char; Value : Float) Procedure SetFunction( FuncName : String; Wrapper : TWrapper) Function Eval( ExpressionString : String) : Float unit dmath; //types are in built, others are external in DLL interface {$IFDEF DELPHI} uses StdCtrls, Graphics; {$ENDIF} { ------------------------------------------------------------------ Types and constants ------------------------------------------------------------------ } {$i types.inc} { ------------------------------------------------------------------ Error handling ------------------------------------------------------------------ } procedure SetErrCode(ErrCode : Int); external 'dmath'; { Sets the error code } function DefaultVal(ErrCode : Int; DefVal : Float) : Float; external 'dmath'; { Sets error code and default function value } function MathErr : Int; external 'dmath'; { Returns the error code } { ------------------------------------------------------------------ Dynamic arrays ------------------------------------------------------------------ } procedure SetAutoInit(AutoInit : Boolean); external 'dmath'; { Sets the auto-initialization of arrays } procedure DimVector(var V : TVector; Ub : Int); external 'dmath'; { Creates floating point vector V[0..Ub] } procedure DimIntVector(var V : TIntVector; Ub : Int); external 'dmath'; { Creates Int vector V[0..Ub] } procedure DimCompVector(var V : TCompVector; Ub : Int); external 'dmath'; { Creates complex vector V[0..Ub] } procedure DimBoolVector(var V : TBoolVector; Ub : Int); external 'dmath'; { Creates boolean vector V[0..Ub] } procedure DimStrVector(var V : TStrVector; Ub : Int); external 'dmath'; { Creates string vector V[0..Ub] } procedure DimMatrix(var A : TMatrix; Ub1, Ub2 : Int); external 'dmath'; { Creates floating point matrix A[0..Ub1, 0..Ub2] } procedure DimIntMatrix(var A : TIntMatrix; Ub1, Ub2 : Int); external 'dmath'; { Creates Int matrix A[0..Ub1, 0..Ub2] } procedure DimCompMatrix(var A : TCompMatrix; Ub1, Ub2 : Int); external 'dmath'; { Creates complex matrix A[0..Ub1, 0..Ub2] } procedure DimBoolMatrix(var A : TBoolMatrix; Ub1, Ub2 : Int); external 'dmath'; { Creates boolean matrix A[0..Ub1, 0..Ub2] } procedure DimStrMatrix(var A : TStrMatrix; Ub1, Ub2 : Int); external 'dmath'; { Creates string matrix A[0..Ub1, 0..Ub2] } { ------------------------------------------------------------------ Minimum, maximum, sign and exchange ------------------------------------------------------------------ } function FMin(X, Y : Float) : Float; external 'dmath'; { Minimum of 2 reals } function FMax(X, Y : Float) : Float; external 'dmath'; { Maximum of 2 reals } function IMin(X, Y : Int) : Int; external 'dmath'; { Minimum of 2 Ints } function IMax(X, Y : Int) : Int; external 'dmath'; { Maximum of 2 Ints } function Sgn(X : Float) : Int; external 'dmath'; { Sign (returns 1 if X = 0) } function Sgn0(X : Float) : Int; external 'dmath'; { Sign (returns 0 if X = 0) } function DSgn(A, B : Float) : Float; external 'dmath'; { Sgn(B) * |A| } procedure FSwap(var X, Y : Float); external 'dmath'; { Exchange 2 reals } procedure ISwap(var X, Y : Int); external 'dmath'; { Exchange 2 Ints } { ------------------------------------------------------------------ Rounding functions ------------------------------------------------------------------ } function RoundN(X : Float; N : Int) : Float; external 'dmath'; { Rounds X to N decimal places } function Ceil(X : Float) : Int; external 'dmath'; { Ceiling function } function Floor(X : Float) : Int; external 'dmath'; { Floor function } { ------------------------------------------------------------------ Logarithms, exponentials and power ------------------------------------------------------------------ } function Expo(X : Float) : Float; external 'dmath'; { Exponential } function Exp2(X : Float) : Float; external 'dmath'; { 2^X } function Exp10(X : Float) : Float; external 'dmath'; { 10^X } function Log(X : Float) : Float; external 'dmath'; { Natural log } function Log2(X : Float) : Float; external 'dmath'; { Log, base 2 } function Log10(X : Float) : Float; external 'dmath'; { Decimal log } function LogA(X, A : Float) : Float; external 'dmath'; { Log, base A } function IntPower(X : Float; N : Int) : Float; external 'dmath'; { X^N } function Power(X, Y : Float) : Float; external 'dmath'; { X^Y, X >= 0 } { ------------------------------------------------------------------ Trigonometric functions ------------------------------------------------------------------ } function Pythag(X, Y : Float) : Float; external 'dmath'; { Sqrt(X^2 + Y^2) } function FixAngle(Theta : Float) : Float; external 'dmath'; { Set Theta in -Pi..Pi } function Tan(X : Float) : Float; external 'dmath'; { Tangent } function ArcSin(X : Float) : Float; external 'dmath'; { Arc sinus } function ArcCos(X : Float) : Float; external 'dmath'; { Arc cosinus } function ArcTan2(Y, X : Float) : Float; external 'dmath'; { Angle (Ox, OM) with M(X,Y) } { ------------------------------------------------------------------ Hyperbolic functions ------------------------------------------------------------------ } function Sinh(X : Float) : Float; external 'dmath'; { Hyperbolic sine } function Cosh(X : Float) : Float; external 'dmath'; { Hyperbolic cosine } function Tanh(X : Float) : Float; external 'dmath'; { Hyperbolic tangent } function ArcSinh(X : Float) : Float; external 'dmath'; { Inverse hyperbolic sine } function ArcCosh(X : Float) : Float; external 'dmath'; { Inverse hyperbolic cosine } function ArcTanh(X : Float) : Float; external 'dmath'; { Inverse hyperbolic tangent } procedure SinhCosh(X : Float; var SinhX, CoshX : Float); external 'dmath'; { Sinh & Cosh } { ------------------------------------------------------------------ Gamma function and related functions ------------------------------------------------------------------ } function Fact(N : Int) : Float; external 'dmath'; { Factorial } function SgnGamma(X : Float) : Int; external 'dmath'; { Sign of Gamma function } function Gamma(X : Float) : Float; external 'dmath'; { Gamma function } function LnGamma(X : Float) : Float; external 'dmath'; { Logarithm of Gamma function } function Stirling(X : Float) : Float; external 'dmath'; { Stirling's formula for the Gamma function } function StirLog(X : Float) : Float; external 'dmath'; { Approximate Ln(Gamma) by Stirling's formula, for X >= 13 } function DiGamma(X : Float ) : Float; external 'dmath'; { Digamma function } function TriGamma(X : Float ) : Float; external 'dmath'; { Trigamma function } function IGamma(A, X : Float) : Float; external 'dmath'; { Incomplete Gamma function} function JGamma(A, X : Float) : Float; external 'dmath'; { Complement of incomplete Gamma function } function InvGamma(A, P : Float) : Float; external 'dmath'; { Inverse of incomplete Gamma function } function Erf(X : Float) : Float; external 'dmath'; { Error function } function Erfc(X : Float) : Float; external 'dmath'; { Complement of error function } { ------------------------------------------------------------------ Beta function and related functions ------------------------------------------------------------------ } function Beta(X, Y : Float) : Float; external 'dmath'; { Beta function } function IBeta(A, B, X : Float) : Float; external 'dmath'; { Incomplete Beta function } function InvBeta(A, B, Y : Float) : Float; external 'dmath'; { Inverse of incomplete Beta function } { ------------------------------------------------------------------ Lambert's function ------------------------------------------------------------------ } function LambertW(X : Float; UBranch, Offset : Boolean) : Float; external 'dmath'; ------------------------------------------------------------------ Binomial distribution ------------------------------------------------------------------ } function Binomial(N, K : Int) : Float; external 'dmath'; { Binomial coefficient C(N,K) } function PBinom(N : Int; P : Float; K : Int) : Float; external 'dmath'; { Probability of binomial distribution } function FBinom(N : Int; P : Float; K : Int) : Float; external 'dmath'; { Cumulative probability for binomial distrib. } { ------------------------------------------------------------------ Poisson distribution ------------------------------------------------------------------ } function PPoisson(Mu : Float; K : Int) : Float; external 'dmath'; { Probability of Poisson distribution } function FPoisson(Mu : Float; K : Int) : Float; external 'dmath'; { Cumulative probability for Poisson distrib. } { ------------------------------------------------------------------ Exponential distribution ------------------------------------------------------------------ } function DExpo(A, X : Float) : Float; external 'dmath'; { Density of exponential distribution with parameter A } function FExpo(A, X : Float) : Float; external 'dmath'; { Cumulative probability function for exponential dist. with parameter A } { ------------------------------------------------------------------ Standard normal distribution ------------------------------------------------------------------ } function DNorm(X : Float) : Float; external 'dmath'; { Density of standard normal distribution } function FNorm(X : Float) : Float; external 'dmath'; { Cumulative probability for standard normal distrib. } function PNorm(X : Float) : Float; external 'dmath'; { Prob(|U| > X) for standard normal distrib. } function InvNorm(P : Float) : Float; external 'dmath'; { Inverse of standard normal distribution } { ------------------------------------------------------------------ Student's distribution ------------------------------------------------------------------ } function DStudent(Nu : Int; X : Float) : Float; external 'dmath'; { Density of Student distribution with Nu d.o.f. } function FStudent(Nu : Int; X : Float) : Float; external 'dmath'; { Cumulative probability for Student distrib. with Nu d.o.f. } function PStudent(Nu : Int; X : Float) : Float; external 'dmath'; { Prob(|t| > X) for Student distrib. with Nu d.o.f. } function InvStudent(Nu : Int; P : Float) : Float; external 'dmath'; { Inverse of Student's t-distribution function } { ------------------------------------------------------------------ Khi-2 distribution ------------------------------------------------------------------ } function DKhi2(Nu : Int; X : Float) : Float; external 'dmath'; { Density of Khi-2 distribution with Nu d.o.f. } function FKhi2(Nu : Int; X : Float) : Float; external 'dmath'; { Cumulative prob. for Khi-2 distrib. with Nu d.o.f. } function PKhi2(Nu : Int; X : Float) : Float; external 'dmath'; { Prob(Khi2 > X) for Khi-2 distrib. with Nu d.o.f. } function InvKhi2(Nu : Int; P : Float) : Float; external 'dmath'; { Inverse of Khi-2 distribution function } { ------------------------------------------------------------------ Fisher-Snedecor distribution ------------------------------------------------------------------ } function DSnedecor(Nu1, Nu2 : Int; X : Float) : Float; external 'dmath'; { Density of Fisher-Snedecor distribution with Nu1 and Nu2 d.o.f. } function FSnedecor(Nu1, Nu2 : Int; X : Float) : Float; external 'dmath'; { Cumulative prob. for Fisher-Snedecor distrib. with Nu1 and Nu2 d.o.f. } function PSnedecor(Nu1, Nu2 : Int; X : Float) : Float; external 'dmath'; { Prob(F > X) for Fisher-Snedecor distrib. with Nu1 and Nu2 d.o.f. } function InvSnedecor(Nu1, Nu2 : Int; P : Float) : Float; external 'dmath'; { Inverse of Snedecor's F-distribution function } { ------------------------------------------------------------------ Beta distribution ------------------------------------------------------------------ } function DBeta(A, B, X : Float) : Float; external 'dmath'; { Density of Beta distribution with parameters A and B } function FBeta(A, B, X : Float) : Float; external 'dmath'; { Cumulative probability for Beta distrib. with param. A and B } { ------------------------------------------------------------------ Gamma distribution ------------------------------------------------------------------ } function DGamma(A, B, X : Float) : Float; external 'dmath'; { Density of Gamma distribution with parameters A and B } function FGamma(A, B, X : Float) : Float; external 'dmath'; { Cumulative probability for Gamma distrib. with param. A and B } { ------------------------------------------------------------------ Expression evaluation ------------------------------------------------------------------ } function InitEval : Int; external 'dmath'; { Initializes built-in functions and returns their number } function Eval(ExpressionString : String) : Float; external 'dmath'; { Evaluates an expression at run-time } procedure SetVariable(VarName : Char; Value : Float); external 'dmath'; { Assigns a value to a variable } procedure SetFunction(FuncName : String; Wrapper : TWrapper); external 'dmath'; { Adds a function to the parser } { ------------------------------------------------------------------ Matrices and linear equations ------------------------------------------------------------------ } procedure GaussJordan(A : TMatrix; Lb, Ub1, Ub2 : Int; var Det : Float); external 'dmath'; { Transforms a matrix according to the Gauss-Jordan method } procedure LinEq(A : TMatrix; B : TVector; Lb, Ub : Int; var Det : Float); external 'dmath'; { Solves a linear system according to the Gauss-Jordan method } procedure Cholesky(A, L : TMatrix; Lb, Ub : Int); external 'dmath'; { Cholesky factorization of a positive definite symmetric matrix } procedure LU_Decomp(A : TMatrix; Lb, Ub : Int); external 'dmath'; { LU decomposition } procedure LU_Solve(A : TMatrix; B : TVector; Lb, Ub : Int; X : TVector); external 'dmath'; { Solution of linear system from LU decomposition } procedure QR_Decomp(A : TMatrix; Lb, Ub1, Ub2 : Int; R : TMatrix); external 'dmath'; { QR decomposition } procedure QR_Solve(Q, R : TMatrix; B : TVector; Lb, Ub1, Ub2 : Int; X : TVector); external 'dmath'; { Solution of linear system from QR decomposition } procedure SV_Decomp(A : TMatrix; Lb, Ub1, Ub2 : Int; S : TVector; V : TMatrix); external 'dmath'; { Singular value decomposition } procedure SV_SetZero(S : TVector; Lb, Ub : Int; Tol : Float); external 'dmath'; { Set lowest singular values to zero } procedure SV_Solve(U : TMatrix; S : TVector; V : TMatrix; B : TVector; Lb, Ub1, Ub2 : Int; X : TVector); external 'dmath'; { Solution of linear system from SVD } procedure SV_Approx(U : TMatrix; S : TVector; V : TMatrix; Lb, Ub1, Ub2 : Int; A : TMatrix); external 'dmath'; { Matrix approximation from SVD } procedure EigenVals(A : TMatrix; Lb, Ub : Int; Lambda : TCompVector); external 'dmath'; { Eigenvalues of a general square matrix } procedure EigenVect(A : TMatrix; Lb, Ub : Int; Lambda : TCompVector; V : TMatrix); external 'dmath'; { Eigenvalues and eigenvectors of a general square matrix } procedure EigenSym(A : TMatrix; Lb, Ub : Int; Lambda : TVector; V : TMatrix); external 'dmath'; { Eigenvalues and eigenvectors of a symmetric matrix (SVD method) } procedure Jacobi(A : TMatrix; Lb, Ub, MaxIter : Int; Tol : Float; Lambda : TVector; V : TMatrix); external 'dmath'; { Eigenvalues and eigenvectors of a symmetric matrix (Jacobi method) } { ------------------------------------------------------------------ Optimization ------------------------------------------------------------------ } procedure MinBrack(Func : TFunc; var A, B, C, Fa, Fb, Fc : Float); external 'dmath'; { Brackets a minimum of a function } procedure GoldSearch(Func : TFunc; A, B : Float; MaxIter : Int; Tol : Float; var Xmin, Ymin : Float); external 'dmath'; { Minimization of a function of one variable (golden search) } procedure LinMin(Func : TFuncNVar; X, DeltaX : TVector; Lb, Ub : Int; var R : Float; MaxIter : Int; Tol : Float; var F_min : Float); external 'dmath'; { Minimization of a function of several variables along a line } procedure Newton(Func : TFuncNVar; HessGrad : THessGrad; X : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; var F_min : Float; G : TVector; H_inv : TMatrix; var Det : Float); external 'dmath'; { Minimization of a function of several variables (Newton's method) } procedure SaveNewton(FileName : string); external 'dmath'; { Save Newton iterations in a file } procedure Marquardt(Func : TFuncNVar; HessGrad : THessGrad; X : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; var F_min : Float; G : TVector; H_inv : TMatrix; var Det : Float); external 'dmath'; { Minimization of a function of several variables (Marquardt's method) } procedure SaveMarquardt(FileName : string); external 'dmath'; { Save Marquardt iterations in a file } procedure BFGS(Func : TFuncNVar; Gradient : TGradient; X : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; var F_min : Float; G : TVector; H_inv : TMatrix); external 'dmath'; { Minimization of a function of several variables (BFGS method) } procedure SaveBFGS(FileName : string); external 'dmath'; { Save BFGS iterations in a file } procedure Simplex(Func : TFuncNVar; X : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; var F_min : Float); external 'dmath'; { Minimization of a function of several variables (Simplex) } procedure SaveSimplex(FileName : string); external 'dmath'; { Save Simplex iterations in a file } { ------------------------------------------------------------------ Nonlinear equations ------------------------------------------------------------------ } procedure RootBrack(Func : TFunc; var X, Y, FX, FY : Float); external 'dmath'; { Brackets a root of function Func between X and Y } procedure Bisect(Func : TFunc; var X, Y : Float; MaxIter : Int; Tol : Float; var F : Float); external 'dmath'; { Bisection method } procedure Secant(Func : TFunc; var X, Y : Float; MaxIter : Int; Tol : Float; var F : Float); external 'dmath'; { Secant method } procedure NewtEq(Func, Deriv : TFunc; var X : Float; MaxIter : Int; Tol : Float; var F : Float); external 'dmath'; { Newton-Raphson method for a single nonlinear equation } procedure NewtEqs(Equations : TEquations; Jacobian : TJacobian; X, F : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float); external 'dmath'; { Newton-Raphson method for a system of nonlinear equations } procedure Broyden(Equations : TEquations; X, F : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float); external 'dmath'; { Broyden's method for a system of nonlinear equations } { ------------------------------------------------------------------ Polynomials and rational fractions ------------------------------------------------------------------ } function Poly(X : Float; Coef : TVector; Deg : Int) : Float; external 'dmath'; { Evaluates a polynomial } function RFrac(X : Float; Coef : TVector; Deg1, Deg2 : Int) : Float; external 'dmath'; { Evaluates a rational fraction } function RootPol1(A, B : Float; var X : Float) : Int; external 'dmath'; { Solves the linear equation A + B * X = 0 } function RootPol2(Coef : TVector; Z : TCompVector) : Int; external 'dmath'; { Solves a quadratic equation } function RootPol3(Coef : TVector; Z : TCompVector) : Int; external 'dmath'; { Solves a cubic equation } function RootPol4(Coef : TVector; Z : TCompVector) : Int; external 'dmath'; { Solves a quartic equation } function RootPol(Coef : TVector; Deg : Int; Z : TCompVector) : Int; external 'dmath'; { Solves a polynomial equation } function SetRealRoots(Deg : Int; Z : TCompVector; Tol : Float) : Int; external 'dmath'; { Set the imaginary part of a root to zero } procedure SortRoots(Deg : Int; Z : TCompVector); external 'dmath'; { Sorts the roots of a polynomial } { ------------------------------------------------------------------ Numerical integration and differential equations ------------------------------------------------------------------ } function TrapInt(X, Y : TVector; N : Int) : Float; external 'dmath'; { Integration by trapezoidal rule } function GausLeg(Func : TFunc; A, B : Float) : Float; external 'dmath'; { Integral from A to B } function GausLeg0(Func : TFunc; B : Float) : Float; external 'dmath'; { Integral from 0 to B } function Convol(Func1, Func2 : TFunc; T : Float) : Float; external 'dmath'; { Convolution product at time T } procedure ConvTrap(Func1,Func2:TFunc; T,Y:TVector; N:Int);external 'dmath'; { Convolution by trapezoidal rule } procedure RKF45(F : TDiffEqs; Neqn : Int; Y, Yp : TVector; var T : Float; Tout, RelErr, AbsErr : Float; var Flag : Int); external 'dmath'; { Integration of a system of differential equations } { ------------------------------------------------------------------ Fast Fourier Transform ------------------------------------------------------------------ } procedure FFT(NumSamples : Int; InArray, OutArray : TCompVector); external 'dmath'; { Fast Fourier Transform } procedure IFFT(NumSamples : Int; InArray, OutArray : TCompVector); external 'dmath'; { Inverse Fast Fourier Transform } procedure FFT_Int(NumSamples : Int; RealIn, ImagIn : TIntVector; OutArray : TCompVector); external 'dmath'; { Fast Fourier Transform for Int data } procedure FFT_Int_Cleanup; external 'dmath'; { Clear memory after a call to FFT_Int } procedure CalcFrequency(NumSamples, FrequencyIndex : Int; InArray : TCompVector; var FFT : Complex); external 'dmath'; { Direct computation of Fourier transform } { ------------------------------------------------------------------ Random numbers ------------------------------------------------------------------ } procedure SetRNG(RNG : RNG_Type); external 'dmath'; { Select generator } procedure InitGen(Seed : RNG_IntType); external 'dmath'; { Initialize generator } function IRanGen : RNG_IntType; external 'dmath'; { 32-bit random Int in [-2^31 .. 2^31 - 1] } function IRanGen31 : RNG_IntType; external 'dmath'; { 31-bit random Int in [0 .. 2^31 - 1] } function RanGen1 : Float; external 'dmath'; { 32-bit random real in [0,1] } function RanGen2 : Float; external 'dmath'; { 32-bit random real in [0,1) } function RanGen3 : Float; external 'dmath'; { 32-bit random real in (0,1) } function RanGen53 : Float; external 'dmath'; { 53-bit random real in [0,1) } procedure InitMWC(Seed : RNG_IntType); external 'dmath'; { Initializes the 'Multiply with carry' random number generator } function IRanMWC : RNG_IntType; external 'dmath'; { Returns a 32 bit random number in [-2^31 ; 2^31-1] } procedure InitMT(Seed : RNG_IntType); external 'dmath'; { Initializes Mersenne Twister generator with a seed } procedure InitMTbyArray(InitKey : array of RNG_LongType; KeyLength : Word); external 'dmath'; { Initialize MT generator with an array InitKey[0..(KeyLength - 1)] } function IRanMT : RNG_IntType; external 'dmath'; { Random Int from MT generator } procedure InitUVAGbyString(KeyPhrase : string); external 'dmath'; { Initializes the UVAG generator with a string } procedure InitUVAG(Seed : RNG_IntType); external 'dmath'; { Initializes the UVAG generator with an Int } function IRanUVAG : RNG_IntType; external 'dmath'; { Random Int from UVAG generator } function RanGaussStd : Float; external 'dmath'; { Random number from standard normal distribution } function RanGauss(Mu, Sigma : Float) : Float; external 'dmath'; { Random number from normal distrib. with mean Mu and S. D. Sigma } procedure RanMult(M : TVector; L : TMatrix; Lb, Ub : Int; X : TVector); external 'dmath'; { Random vector from multinormal distribution (correlated) } procedure RanMultIndep(M, S : TVector; Lb, Ub : Int; X : TVector); external 'dmath'; { Random vector from multinormal distribution (uncorrelated) } procedure InitMHParams(NCycles, MaxSim, SavedSim : Int); external 'dmath'; { Initializes Metropolis-Hastings parameters } procedure GetMHParams(var NCycles, MaxSim,SavedSim:Int); external 'dmath'; { Returns Metropolis-Hastings parameters } procedure Hastings(Func : TFuncNVar; T : Float; X : TVector; V : TMatrix; Lb, Ub : Int; Xmat : TMatrix; X_min : TVector; var F_min : Float); external 'dmath'; { Simulation of a probability density function by Metropolis-Hastings } procedure InitSAParams(NT, NS, NCycles : Int; RT : Float); external 'dmath'; { Initializes Simulated Annealing parameters } procedure SA_CreateLogFile(FileName : String); external 'dmath'; { Initializes log file } procedure SimAnn(Func : TFuncNVar; X, Xmin, Xmax : TVector; Lb, Ub : Int; var F_min : Float); external 'dmath'; { Minimization of a function of several var. by simulated annealing } procedure InitGAParams(NP, NG : Int; SR, MR, HR : Float); external 'dmath'; { Initializes Genetic Algorithm parameters } procedure GA_CreateLogFile(FileName : String); external 'dmath'; { Initializes log file } procedure GenAlg(Func : TFuncNVar; X, Xmin, Xmax : TVector; Lb, Ub : Int; var F_min : Float); external 'dmath'; { Minimization of a function of several var. by genetic algorithm } { ------------------------------------------------------------------ Statistics ------------------------------------------------------------------ } function Mean(X : TVector; Lb, Ub : Int) : Float; external 'dmath'; { Mean of sample X } function Min(X : TVector; Lb, Ub : Int) : Float; external 'dmath'; { Minimum of sample X } function Max(X : TVector; Lb, Ub : Int) : Float; external 'dmath'; { Maximum of sample X } function Median(X : TVector; Lb, Ub : Int; Sorted : Boolean) : Float; external 'dmath'; { Median of sample X } function StDev(X : TVector; Lb, Ub : Int; M : Float) : Float; external 'dmath'; { Standard deviation estimated from sample X } function StDevP(X : TVector; Lb, Ub : Int; M : Float) : Float; external 'dmath'; { Standard deviation of population } function Correl(X, Y : TVector; Lb, Ub : Int) : Float; external 'dmath'; { Correlation coefficient } function Skewness(X : TVector; Lb, Ub : Int; M,Sigma: Float): Float; external 'dmath'; { Skewness of sample X } function Kurtosis(X : TVector; Lb, Ub : Int; M,Sigma: Float): Float; external 'dmath'; { Kurtosis of sample X } procedure QSort(X : TVector; Lb, Ub : Int); external 'dmath'; { Quick sort (ascending order) } procedure DQSort(X : TVector; Lb, Ub : Int); external 'dmath'; { Quick sort (descending order) } procedure Interval(X1, X2 : Float; MinDiv, MaxDiv : Int; var Min, Max, Step : Float); external 'dmath'; { Determines an interval for a set of values } procedure AutoScale(X : TVector; Lb, Ub : Int; Scale : TScale; var XMin, XMax, XStep : Float); external 'dmath'; { Finds an appropriate scale for plotting the data in X[Lb..Ub] } procedure StudIndep(N1, N2 : Int; M1, M2, S1, S2 : Float; var T : Float; var DoF : Int); external 'dmath'; { Student t-test for independent samples } procedure StudPaired(X, Y : TVector; Lb, Ub : Int; var T : Float; var DoF : Int); external 'dmath'; { Student t-test for paired samples } procedure AnOVa1(Ns : Int; N : TIntVector; M, S : TVector; var V_f, V_r, F : Float; var DoF_f, DoF_r : Int); external 'dmath'; { One-way analysis of variance } procedure AnOVa2(NA, NB, Nobs : Int; M, S : TMatrix; V, F : TVector; DoF : TIntVector); external 'dmath'; { Two-way analysis of variance } procedure Snedecor(N1, N2 : Int; S1, S2 : Float; var F : Float; var DoF1, DoF2 : Int); external 'dmath'; { Snedecor's F-test (comparison of two variances) } procedure Bartlett(Ns : Int; N : TIntVector; S : TVector; var Khi2 : Float; var DoF : Int); external 'dmath'; { Bartlett's test (comparison of several variances) } procedure Mann_Whitney(N1, N2 : Int; X1, X2 : TVector; var U, Eps : Float); external 'dmath'; { Mann-Whitney test} procedure Wilcoxon(X, Y : TVector; Lb, Ub : Int; var Ndiff : Int; var T, Eps : Float); external 'dmath'; { Wilcoxon test } procedure Kruskal_Wallis(Ns : Int; N : TIntVector; X : TMatrix; var H : Float; var DoF : Int); external 'dmath'; { Kruskal-Wallis test } procedure Khi2_Conform(N_cls : Int; N_estim : Int; Obs : TIntVector; Calc : TVector; var Khi2 : Float; var DoF : Int); external 'dmath'; { Khi-2 test for conformity } procedure Khi2_Indep(N_lin : Int; N_col : Int; Obs : TIntMatrix; var Khi2 : Float; var DoF : Int); external 'dmath'; { Khi-2 test for independence } procedure Woolf_Conform(N_cls : Int; N_estim : Int; Obs : TIntVector; Calc : TVector; var G : Float; var DoF : Int); external 'dmath'; { Woolf's test for conformity } procedure Woolf_Indep(N_lin : Int; N_col : Int; Obs : TIntMatrix; var G : Float; var DoF : Int); external 'dmath'; { Woolf's test for independence } procedure DimStatClassVector(var C : TStatClassVector; Ub : Int); external 'dmath'; { Allocates an array of statistical classes: C[0..Ub] } procedure Distrib(X : TVector; Lb, Ub : Int; A, B, H : Float; C : TStatClassVector); external 'dmath'; { Distributes an array X[Lb..Ub] into statistical classes } { ------------------------------------------------------------------ Linear / polynomial regression ------------------------------------------------------------------ } procedure LinFit(X, Y : TVector; Lb, Ub : Int; B : TVector; V : TMatrix); external 'dmath'; { Linear regression : Y = B(0) + B(1) * X } procedure WLinFit(X, Y, S : TVector; Lb, Ub : Int; B : TVector; V : TMatrix); external 'dmath'; { Weighted linear regression : Y = B(0) + B(1) * X } procedure SVDLinFit(X, Y : TVector; Lb, Ub : Int; SVDTol : Float; B : TVector; V : TMatrix); external 'dmath'; { Unweighted linear regression by singular value decomposition } procedure WSVDLinFit(X, Y, S : TVector; Lb, Ub : Int; SVDTol : Float; B : TVector; V : TMatrix); external 'dmath'; { Weighted linear regression by singular value decomposition } procedure MulFit(X : TMatrix; Y : TVector; Lb, Ub, Nvar : Int; ConsTerm : Boolean; B : TVector; V : TMatrix); external 'dmath'; { Multiple linear regression by Gauss-Jordan method } procedure WMulFit(X : TMatrix; Y, S : TVector; Lb, Ub, Nvar : Int; ConsTerm : Boolean; B : TVector; V : TMatrix); external 'dmath'; { Weighted multiple linear regression by Gauss-Jordan method } procedure SVDFit(X : TMatrix; Y : TVector; Lb, Ub, Nvar : Int; ConsTerm : Boolean; SVDTol : Float; B : TVector; V : TMatrix); external 'dmath'; { Multiple linear regression by singular value decomposition } procedure WSVDFit(X : TMatrix; Y, S : TVector; Lb, Ub, Nvar : Int; ConsTerm : Boolean; SVDTol : Float; B : TVector; V : TMatrix); external 'dmath'; { Weighted multiple linear regression by singular value decomposition } procedure PolFit(X, Y : TVector; Lb, Ub, Deg : Int; B : TVector; V : TMatrix); external 'dmath'; { Polynomial regression by Gauss-Jordan method } procedure WPolFit(X, Y, S : TVector; Lb, Ub, Deg : Int; B : TVector; V : TMatrix); external 'dmath'; { Weighted polynomial regression by Gauss-Jordan method } procedure SVDPolFit(X, Y : TVector; Lb, Ub, Deg : Int; SVDTol : Float; B : TVector; V : TMatrix); external 'dmath'; { Unweighted polynomial regression by singular value decomposition } procedure WSVDPolFit(X, Y, S : TVector; Lb, Ub, Deg : Int; SVDTol : Float; B : TVector; V : TMatrix); external 'dmath'; { Weighted polynomial regression by singular value decomposition } procedure RegTest(Y, Ycalc : TVector; LbY, UbY : Int; V : TMatrix; LbV, UbV : Int; var Test : TRegTest); external 'dmath'; { Test of unweighted regression } procedure WRegTest(Y, Ycalc, S : TVector; LbY, UbY : Int; V : TMatrix; LbV, UbV : Int; var Test : TRegTest); external 'dmath'; { Test of weighted regression } { ------------------------------------------------------------------ Nonlinear regression ------------------------------------------------------------------ } procedure SetOptAlgo(Algo : TOptAlgo); external 'dmath'; { Sets the optimization algorithm for nonlinear regression } function GetOptAlgo : TOptAlgo; external 'dmath'; { Returns the optimization algorithm } procedure SetMaxParam(N : Byte); external 'dmath'; { Sets the maximum number of regression parameters for nonlinear regression } function GetMaxParam : Byte; external 'dmath'; { Returns the maximum number of regression parameters for nonlinear regression } procedure SetParamBounds(I : Byte; ParamMin, ParamMax : Float); external 'dmath'; { Sets the bounds on the I-th regression parameter } procedure GetParamBounds(I : Byte; var ParamMin,ParamMax:Float); external 'dmath'; { Returns the bounds on the I-th regression parameter } procedure NLFit(RegFunc : TRegFunc; DerivProc : TDerivProc; X, Y : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; B : TVector; FirstPar, LastPar : Int; V : TMatrix); external 'dmath'; { Unweighted nonlinear regression } procedure WNLFit(RegFunc : TRegFunc; DerivProc : TDerivProc; X, Y, S : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; B : TVector; FirstPar, LastPar : Int; V : TMatrix); external 'dmath'; { Weighted nonlinear regression } procedure SetMCFile(FileName : String); external 'dmath'; { Set file for saving MCMC simulations } procedure SimFit(RegFunc : TRegFunc; X, Y : TVector; Lb, Ub : Int; B : TVector; FirstPar, LastPar : Int; V : TMatrix); external 'dmath'; { Simulation of unweighted nonlinear regression by MCMC } procedure WSimFit(RegFunc : TRegFunc; X, Y, S : TVector; Lb, Ub : Int; B : TVector; FirstPar, LastPar : Int; V : TMatrix); external 'dmath'; { Simulation of weighted nonlinear regression by MCMC } { ------------------------------------------------------------------ Nonlinear regression models ------------------------------------------------------------------ } procedure FracFit(X, Y : TVector; Lb, Ub : Int; Deg1, Deg2 : Int; ConsTerm : Boolean; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Unweighted fit of rational fraction } procedure WFracFit(X, Y, S : TVector; Lb, Ub : Int; Deg1, Deg2 : Int; ConsTerm : Boolean; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Weighted fit of rational fraction } function FracFit_Func(X : Float; B : TVector) : Float; external 'dmath'; { Returns the value of the rational fraction at point X } procedure ExpFit(X, Y : TVector; Lb, Ub, Nexp : Int; ConsTerm : Boolean; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Unweighted fit of sum of exponentials } procedure WExpFit(X, Y, S : TVector; Lb, Ub, Nexp : Int; ConsTerm : Boolean; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Weighted fit of sum of exponentials } function ExpFit_Func(X : Float; B : TVector) : Float; external 'dmath'; { Returns the value of the regression function at point X } procedure IncExpFit(X, Y : TVector; Lb, Ub : Int; ConsTerm : Boolean; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Unweighted fit of model of increasing exponential } procedure WIncExpFit(X, Y, S : TVector; Lb, Ub : Int; ConsTerm : Boolean; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Weighted fit of increasing exponential } function IncExpFit_Func(X : Float; B : TVector) : Float; external 'dmath'; { Returns the value of the regression function at point X } procedure ExpLinFit(X, Y : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Unweighted fit of the "exponential + linear" model } procedure WExpLinFit(X, Y, S : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Weighted fit of the "exponential + linear" model } function ExpLinFit_Func(X : Float; B : TVector) : Float; external 'dmath'; { Returns the value of the regression function at point X } procedure MichFit(X, Y : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Unweighted fit of Michaelis equation } procedure WMichFit(X, Y, S : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Weighted fit of Michaelis equation } function MichFit_Func(X : Float; B : TVector) : Float; external 'dmath'; { Returns the value of the Michaelis equation at point X } procedure MintFit(X, Y : TVector; Lb, Ub : Int; MintVar : TMintVar; Fit_S0 : Boolean; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Unweighted fit of the integrated Michaelis equation } procedure WMintFit(X, Y, S : TVector; Lb, Ub : Int; MintVar : TMintVar; Fit_S0 : Boolean; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Weighted fit of the integrated Michaelis equation } function MintFit_Func(X : Float; B : TVector) : Float; external 'dmath'; { Returns the value of the integrated Michaelis equation at point X } procedure HillFit(X, Y : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Unweighted fit of Hill equation } procedure WHillFit(X, Y, S : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Weighted fit of Hill equation } function HillFit_Func(X : Float; B : TVector) : Float; external 'dmath'; { Returns the value of the Hill equation at point X } procedure LogiFit(X, Y : TVector; Lb, Ub : Int; ConsTerm : Boolean; General : Boolean; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Unweighted fit of logistic function } procedure WLogiFit(X, Y, S : TVector; Lb, Ub : Int; ConsTerm : Boolean; General : Boolean; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Weighted fit of logistic function } function LogiFit_Func(X : Float; B : TVector) : Float; external 'dmath'; { Returns the value of the logistic function at point X } procedure PKFit(X, Y : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Unweighted fit of the acid-base titration curve } procedure WPKFit(X, Y, S : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Weighted fit of the acid-base titration curve } function PKFit_Func(X : Float; B : TVector) : Float; external 'dmath'; { Returns the value of the acid-base titration function at point X } procedure PowFit(X, Y : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Unweighted fit of power function } procedure WPowFit(X, Y, S : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Weighted fit of power function } function PowFit_Func(X : Float; B : TVector) : Float; external 'dmath'; { Returns the value of the power function at point X } procedure GammaFit(X, Y : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Unweighted fit of gamma distribution function } procedure WGammaFit(X, Y, S : TVector; Lb, Ub : Int; MaxIter : Int; Tol : Float; B : TVector; V : TMatrix); external 'dmath'; { Weighted fit of gamma distribution function } function GammaFit_Func(X : Float; B : TVector) : Float; external 'dmath'; { Returns the value of the gamma distribution function at point X } { ------------------------------------------------------------------ Principal component analysis ------------------------------------------------------------------ } procedure VecMean(X : TMatrix; Lb, Ub, Nvar : Int; M : TVector); external 'dmath'; { Computes the mean vector M from matrix X } procedure VecSD(X : TMatrix; Lb, Ub, Nvar : Int; M, S : TVector); external 'dmath'; { Computes the vector of standard deviations S from matrix X } procedure MatVarCov(X : TMatrix; Lb, Ub, Nvar : Int; M : TVector; V : TMatrix); external 'dmath'; { Computes the variance-covariance matrix V from matrix X } procedure MatCorrel(V : TMatrix; Nvar : Int; R : TMatrix); external 'dmath'; { Computes the correlation matrix R from the var-cov matrix V } procedure PCA(R : TMatrix; Nvar : Int; Lambda : TVector; C, Rc : TMatrix); external 'dmath'; { Performs a principal component analysis of the correlation matrix R } procedure ScaleVar(X : TMatrix; Lb, Ub, Nvar : Int; M, S : TVector; Z : TMatrix); external 'dmath'; { Scales a set of variables by subtracting means and dividing by SD's } procedure PrinFac(Z : TMatrix; Lb, Ub, Nvar : Int; C, F : TMatrix); external 'dmath'; { Computes principal factors } { ------------------------------------------------------------------ Strings ------------------------------------------------------------------ } function LTrim(S : String) : String; external 'dmath'; { Removes leading blanks } function RTrim(S : String) : String; external 'dmath'; { Removes trailing blanks } function Trim(S : String) : String; external 'dmath'; { Removes leading and trailing blanks } function StrChar(N : Byte; C : Char) : String; external 'dmath'; { Returns a string made of character C repeated N times } function RFill(S : String; L : Byte) : String; external 'dmath'; { Completes string S with trailing blanks for a total length L } function LFill(S : String; L : Byte) : String; external 'dmath'; { Completes string S with leading blanks for a total length L } function CFill(S : String; L : Byte) : String; external 'dmath'; { Centers string S on a total length L } function Replace(S : String; C1, C2 : Char) : String; external 'dmath'; { Replaces in string S all the occurences of C1 by C2 } function Extract(S : String; var Index : Byte; Delim : Char) : String; external 'dmath'; { Extracts a field from a string } procedure Parse(S : String; Delim:Char; Field:TStrVector; var N:Byte); external 'dmath'; { Parses a string into its constitutive fields } procedure SetFormat(NumLength,MaxDec:Int;FloatPoint,NSZero:Bool); external 'dmath'; { Sets the numeric format } function FloatStr(X : Float) : String; external 'dmath'; { Converts a real to a string according to the numeric format } function IntStr(N : LongInt) : String; external 'dmath'; { Converts an Int to a string } function CompStr(Z : Complex) : String; external 'dmath'; { Converts a complex number to a string } {$IFDEF DELPHI} function StrDec(S : String) : String; external 'dmath'; { Set decimal separator to the symbol defined in SysUtils } function IsNumeric(var S : String; var X : Float) : Boolean; external 'dmath'; { Test if a string represents a number and returns it in X } function ReadNumFromEdit(Edit : TEdit) : Float; external 'dmath'; { Reads a floating point number from an Edit control } procedure WriteNumToFile(var F : Text; X : Float); external 'dmath'; { Writes a floating point number in a text file } {$ENDIF} { ------------------------------------------------------------------ BGI / Delphi graphics ------------------------------------------------------------------ } function InitGraphics {$IFDEF DELPHI} (Width, Height : Int) : Boolean; {$ELSE} (Pilot, Mode : Int; BGIPath : String) : Boolean; {$ENDIF} external 'dmath'; { Enters graphic mode } procedure SetWindow({$IFDEF DELPHI}Canvas : TCanvas;{$ENDIF} X1, X2, Y1,Y2 : Int; GraphBorder:Boolean); external 'dmath'; { Sets the graphic window } procedure SetOxScale(Scale : TScale; OxMin, OxMax, OxStep : Float); external 'dmath'; { Sets the scale on the Ox axis } procedure SetOyScale(Scale : TScale; OyMin, OyMax, OyStep : Float); external 'dmath'; { Sets the scale on the Oy axis } procedure GetOxScale(var Scale : TScale; var OxMin, OxMax, OxStep : Float); external 'dmath'; { Returns the scale on the Ox axis } procedure GetOyScale(var Scale : TScale; var OyMin, OyMax, OyStep : Float); external 'dmath'; { Returns the scale on the Oy axis } procedure SetGraphTitle(Title : String); external 'dmath'; { Sets the title for the graph } procedure SetOxTitle(Title : String); external 'dmath'; { Sets the title for the Ox axis } procedure SetOyTitle(Title : String); external 'dmath'; { Sets the title for the Oy axis } function GetGraphTitle : String; external 'dmath'; { Returns the title for the graph } function GetOxTitle : String; external 'dmath'; { Returns the title for the Ox axis } function GetOyTitle : String; external 'dmath'; { Returns the title for the Oy axis } {$IFNDEF DELPHI} procedure SetTitleFont(FontIndex, Width, Height : Int); external 'dmath'; { Sets the font for the main graph title } procedure SetOxFont(FontIndex, Width, Height : Int); external 'dmath'; { Sets the font for the Ox axis (title and labels) } procedure SetOyFont(FontIndex, Width, Height : Int); external 'dmath'; { Sets the font for the Oy axis (title and labels) } procedure SetLgdFont(FontIndex, Width, Height : Int); external 'dmath'; { Sets the font for the legends } procedure SetClipping(Clip : Boolean); external 'dmath'; { Determines whether drawings are clipped at the current viewport boundaries, according to the value of the Boolean parameter Clip } {$ENDIF} procedure PlotOxAxis{$IFDEF DELPHI}(Canvas : TCanvas){$ENDIF}; external 'dmath'; { Plots the horizontal axis } procedure PlotOyAxis{$IFDEF DELPHI}(Canvas : TCanvas){$ENDIF}; external 'dmath'; { Plots the vertical axis } procedure PlotGrid({$IFDEF DELPHI}Canvas:TCanvas;{$ENDIF} Grid:TGrid); external 'dmath'; { Plots a grid on the graph } procedure WriteGraphTitle{$IFDEF DELPHI}(Canvas : TCanvas){$ENDIF}; external 'dmath'; { Writes the title of the graph } procedure SetMaxCurv(NCurv : Byte); external 'dmath'; { Sets the maximum number of curves and re-initializes their parameters } procedure SetPointParam {$IFDEF DELPHI} (CurvIndex, Symbol, Size : Int; Color : TColor); {$ELSE} (CurvIndex, Symbol, Size, Color : Int); {$ENDIF} external 'dmath'; { Sets the point parameters for curve # CurvIndex } procedure SetLineParam {$IFDEF DELPHI} (CurvIndex : Int; Style : TPenStyle; Width : Int; Color : TColor); {$ELSE} (CurvIndex, Style, Width, Color : Int); {$ENDIF} external 'dmath'; { Sets the line parameters for curve # CurvIndex } procedure SetCurvLegend(CurvIndex : Int; Legend : String); external 'dmath'; { Sets the legend for curve # CurvIndex } procedure SetCurvStep(CurvIndex, Step : Int); external 'dmath'; { Sets the step for curve # CurvIndex } function GetMaxCurv : Byte; external 'dmath'; { Returns the maximum number of curves } procedure GetPointParam {$IFDEF DELPHI} (CurvIndex : Int; var Symbol, Size : Int; var Color : TColor); {$ELSE} (CurvIndex : Int; var Symbol, Size, Color : Int); {$ENDIF} external 'dmath'; { Returns the point parameters for curve # CurvIndex } procedure GetLineParam {$IFDEF DELPHI} (CurvIndex : Int; var Style : TPenStyle; var Width : Int; var Color : TColor); {$ELSE} (CurvIndex : Int; var Style, Width, Color : Int); {$ENDIF} external 'dmath'; { Returns the line parameters for curve # CurvIndex } function GetCurvLegend(CurvIndex : Int) : String; external 'dmath'; { Returns the legend for curve # CurvIndex } function GetCurvStep(CurvIndex : Int) : Int; external 'dmath'; { Returns the step for curve # CurvIndex } {$IFDEF DELPHI} procedure PlotPoint(Canvas : TCanvas; X, Y : Float; CurvIndex : Int); external 'dmath'; {$ELSE} procedure PlotPoint(Xp, Yp, CurvIndex : Int); external 'dmath'; {$ENDIF} { Plots a point on the screen } procedure PlotCurve({$IFDEF DELPHI}Canvas : TCanvas;{$ENDIF} X, Y : TVector; Lb, Ub, CurvIndex : Int); external 'dmath'; { Plots a curve } procedure PlotCurveWithErrorBars({$IFDEF DELPHI}Canvas : TCanvas;{$ENDIF} X, Y, S : TVector; Ns, Lb, Ub, CurvIndex : Int); external 'dmath'; { Plots a curve with error bars } procedure PlotFunc({$IFDEF DELPHI}Canvas : TCanvas;{$ENDIF} Func : TFunc; Xmin, Xmax : Float; {$IFDEF DELPHI}Npt : Int;{$ENDIF} CurvIndex : Int); external 'dmath'; { Plots a function } procedure WriteLegend({$IFDEF DELPHI}Canvas : TCanvas;{$ENDIF} NCurv : Int; ShowPoints, ShowLines : Boolean); external 'dmath'; { Writes the legends for the plotted curves } procedure ConRec({$IFDEF DELPHI}Canvas : TCanvas;{$ENDIF} Nx, Ny, Nc : Int; X, Y, Z : TVector; F : TMatrix); external 'dmath'; { Contour plot } function Xpixel(X : Float):Int; external 'dmath'; {Converts user abscissa X to screen coordinate } function Ypixel(Y : Float):Int; external 'dmath'; {Converts user ordinate Y to screen coordinate } function Xuser(X : Int):Float; external 'dmath'; {Converts screen coordinate X to user abscissa } function Yuser(Y : Int):Float; external 'dmath'; {Converts screen coordinate Y to user ordinate } {$IFNDEF DELPHI} procedure LeaveGraphics; external 'dmath'; { Quits graphic mode } {$ENDIF} { ------------------------------------------------------------------ LaTeX graphics ------------------------------------------------------------------ } function TeX_InitGraphics(FileName : String; PgWidth, PgHeight : Int; Header : Boolean) : Boolean; external 'dmath'; { Initializes the LaTeX file } procedure TeX_SetWindow(X1, X2, Y1, Y2 : Int; GraphBorder : Boolean); external 'dmath'; { Sets the graphic window } procedure TeX_LeaveGraphics(Footer : Boolean); external 'dmath'; { Close the LaTeX file } procedure TeX_SetOxScale(Scale : TScale; OxMin, OxMax, OxStep : Float); external 'dmath'; { Sets the scale on the Ox axis } procedure TeX_SetOyScale(Scale : TScale; OyMin, OyMax, OyStep : Float); external 'dmath'; { Sets the scale on the Oy axis } procedure TeX_SetGraphTitle(Title : String); external 'dmath'; { Sets title for the graph } procedure TeX_SetOxTitle(Title : String); external 'dmath'; { Sets title for the Ox axis } procedure TeX_SetOyTitle(Title : String); external 'dmath'; { Sets title for the Oy axis } procedure TeX_PlotOxAxis; external 'dmath'; { Plots horizontal axis } procedure TeX_PlotOyAxis; external 'dmath'; { Plots vertical axis } procedure TeX_PlotGrid(Grid : TGrid); external 'dmath'; { Plots a grid on the graph } procedure TeX_WriteGraphTitle; external 'dmath'; Writes the title of the graph } procedure TeX_SetMaxCurv(NCurv : Byte); external 'dmath'; { Sets the maximum number of curves and re-initializes their parameters } procedure TeX_SetPointParam(CurvIndex, Symbol, Size : Int); external 'dmath'; { Sets the point parameters for curve # CurvIndex } procedure TeX_SetLineParam(CurvIndex, Style : Int; Width : Float; Smooth : Boolean); external 'dmath'; { Sets the line parameters for curve # CurvIndex } procedure TeX_SetCurvLegend(CurvIndex : Int; Legend : String); external 'dmath'; { Sets the legend for curve # CurvIndex } procedure TeX_SetCurvStep(CurvIndex, Step : Int); external 'dmath'; { Sets the step for curve # CurvIndex } procedure TeX_PlotCurve(X, Y : TVector; Lb, Ub, CurvIndex : Int); external 'dmath'; { Plots a curve } procedure TeX_PlotCurveWithErrorBars(X, Y, S : TVector;Ns, Lb, Ub, CurvIndex : Int); external 'dmath'; { Plots a curve with error bars } procedure TeX_PlotFunc(Func : TFunc; X1, X2 : Float; Npt : Int; CurvIndex : Int); external 'dmath'; { Plots a function } procedure TeX_WriteLegend(NCurv : Int; ShowPoints, ShowLines : Boolean); external 'dmath'; { Writes the legends for the plotted curves } procedure TeX_ConRec(Nx, Ny, Nc : Int; X, Y, Z : TVector; F : TMatrix); external 'dmath'; { Contour plot } function Xcm(X : Float) : Float; external 'dmath'; { Converts user coordinate X to cm } function Ycm(Y : Float) : Float; external 'dmath'; { Converts user coordinate Y to cm } //*****************************************************unit uPSI_SynPdf; Function RawUTF8ToPDFString( const Value : RawUTF8) : PDFString Function _DateTimeToPdfDate( ADate : TDateTime) : TPdfDate Function _PdfDateToDateTime( const AText : TPdfDate) : TDateTime Function PdfRect( Left, Top, Right, Bottom : Single) : TPdfRect; Function PdfRect1( const Box : TPdfBox) : TPdfRect; Function PdfBox( Left, Top, Width, Height : Single) : TPdfBox //Function _GetCharCount( Text : PAnsiChar) : Int //Procedure L2R( W : PWideChar; L : Int) Function PdfCoord( MM : single) : Int Function CurrentPrinterPaperSize : TPDFPaperSize Function CurrentPrinterRes : TPoint Procedure GDICommentBookmark( MetaHandle : HDC; const aBookmarkName : RawUTF8) Procedure GDICommentOutline( MetaHandle : HDC; const aTitle : RawUTF8; aLevel : Int) Procedure GDICommentLink( MetaHandle:HDC; const aBookmarkName:RawUTF8; const aRect : TRect) Const('Usp10','String 'usp10.dll AddTypeS('TScriptState_enum', '( r0, r1, r2, r3, r4, fOverrideDirection, fInhibitSymSwap, 'fCharShape, fDigitSubstitute,fInhibitLigate,fDisplayZWG, fArabicNumContext, fGcpClusters ) TScriptState_set', 'set of TScriptState_enum //********************************************************************** procedure SIRegister_PMrand(CL: TPSPascalCompiler); //ParkMiller begin Procedure PMrandomize( I : word) Function PMrandom : longint Function Rrand : extended Function Irand( N : word) : word Function Brand( P : extended) : boolean Function Nrand : extended end; procedure SIRegister_Spring_Cryptography_Utils(CL: TPSPascalCompiler); begin Function Endian( x : LongWord) : LongWord Function Endian64( x : Int64) : Int64 Function spRol( x : LongWord; y : Byte) : LongWord Function spRor( x : LongWord; y : Byte) : LongWord Function Ror64( x : Int64; y : Byte) : Int64 end; procedure SIRegister_MapReader(CL: TPSPascalCompiler); begin Procedure ClearModules Procedure ReadMapFile( Fname : string) Function AddressInfo( Address : dword) : string end; procedure SIRegister_LibTar(CL: TPSPascalCompiler); begin TTarPermission', '( tpReadByOwner, tpWriteByOwner, tpExecuteByOw' +ner, tpReadByGroup, tpWriteByGroup, tpExecuteByGroup, tpReadByOther, tpWriteByOther, tpExecuteByOther ) TTarPermissions', 'set of TTarPermission TFileType', '( ftNormal, ftLink, ftSymbolicLink, ftCharacter, ft' +'Block, ftDirectory, ftFifo, ftContiguous, ftDumpDir, ftMultiVolume, ftVolumeHeader; TTarMode', '( tmSetUid, tmSetGid, tmSaveText ) TTarModes', 'set of TTarMode TTarDirRec', 'record Name : STRING; Size : INT64; DateTime : TDa' +teTime; Permissions : TTarPermissions; FileType : TFileType; LinkName : ST' +RING; UID : Int; GID : Int; UserName : STRING; GroupName : STRING;' + ChecksumOK : BOOLEAN; Mode : TTarModes; Magic : STRING; MajorDevNo : INTE' +GER; MinorDevNo : Int; FilePos : INT64; end SIRegister_TTarArchive(CL); SIRegister_TTarWriter(CL); Function PermissionString( Permissions : TTarPermissions) : STRING Function ConvertFilename( Filename : STRING) : STRING Function FileTimeGMT( FileName : STRING) : TDateTime; Function FileTimeGMT1( SearchRec : TSearchRec) : TDateTime; Procedure ClearDirRec( var DirRec : TTarDirRec) end; //***************************************************unit uPSI_TlHelp32; procedure SIRegister_TlHelp32(CL: TPSPascalCompiler); begin Const('MAX_MODULE_NAME32','LongInt'( 255); Function CreateToolhelp32Snapshot( dwFlags, th32ProcessID : DWORD) : THandle Const('TH32CS_SNAPHEAPLIST',LongWord( $00000001); Const('TH32CS_SNAPPROCESS','LongWord').SetUInt( $00000002); Const('TH32CS_SNAPTHREAD','LongWord').SetUInt( $00000004); Const('TH32CS_SNAPMODULE','LongWord').SetUInt( $00000008); Const('TH32CS_INHERIT','LongWord').SetUInt( $80000000); tagHEAPLIST32','record dwSize:DWORD;th32ProcessID:DWORD;th32HeapID:DWORD;dwFlags:DWORD;end'; AddTypeS('HEAPLIST32', 'tagHEAPLIST32 AddTypeS('THeapList32', 'tagHEAPLIST32 Const('HF32_DEFAULT','LongInt'( 1); Const('HF32_SHARED','LongInt'( 2); Function Heap32ListFirst( hSnapshot : THandle; var lphl : THeapList32) : BOOL Function Heap32ListNext( hSnapshot : THandle; var lphl : THeapList32) : BOOL AddTypeS(tagHEAPENTRY32', 'record dwSize : DWORD; hHandle : THandle; dwAd' +'dress : DWORD; dwBlockSize : DWORD; dwFlags : DWORD; dwLockCount : DWORD; ' +dwResvd : DWORD; th32ProcessID : DWORD; th32HeapID : DWORD; end AddTypeS('HEAPENTRY32', 'tagHEAPENTRY32 AddTypeS('THeapEntry32', 'tagHEAPENTRY32 Const('LF32_FIXED','LongWord').SetUInt( $00000001); Const('LF32_FREE','LongWord').SetUInt( $00000002); Const('LF32_MOVEABLE','LongWord').SetUInt( $00000004); Function Heap32First( var lphe : THeapEntry32; th32ProcessID, th32HeapID : DWORD) : BOOL Function Heap32Next( var lphe : THeapEntry32) : BOOL DWORD; var lpNumberOfBytesRead : DWORD) : BOOL AddTypeS('tagTHREADENTRY32', 'record dwSize : DWORD; cntUsage : DWORD; th3' +'2ThreadID : DWORD; th32OwnerProcessID : DWORD; tpBasePri : Longint; tpDelt' +'aPri : Longint; dwFlags : DWORD; end AddTypeS('THREADENTRY32', 'tagTHREADENTRY32 AddTypeS('TThreadEntry32', 'tagTHREADENTRY32 Function Thread32First( hSnapshot : THandle; var lpte : TThreadEntry32) : BOOL Function Thread32Next( hSnapshot: THandle; var lpte : TThreadENtry32) : BOOL end; Const('EW_RESTARTWINDOWS','LongWord').SetUInt( $0042); Const('EW_REBOOTSYSTEM','LongWord( $0043); Const('EW_EXITANDEXECAPP','LongWord( $0044); Const('ENDSESSION_LOGOFF','LongWord').SetUInt( DWORD ( $80000000 )); Const('EWX_LOGOFF','LongInt'( 0); Const('EWX_SHUTDOWN','LongInt'( 1); Const('EWX_REBOOT','LongInt'( 2); Const('EWX_FORCE','LongInt'( 4); Const('EWX_POWEROFF','LongInt'( 8); Const('EWX_FORCEIFHUNG','LongWord').SetUInt( $10); Function GET_APPCOMMAND_LPARAM( const lParam : LongInt) : Shortint Function GET_DEVICE_LPARAM( const lParam : LongInt) : Word Function GET_MOUSEORKEY_LPARAM( const lParam : LongInt) : Word Function GET_FLAGS_LPARAM( const lParam : LongInt) : Word Function GET_KEYSTATE_LPARAM( const lParam : LongInt) : Word Function GetWindowWord( hWnd : HWND; nIndex : Int) : Word Function SetWindowWord( hWnd : HWND; nIndex : Int; wNewWord : Word) : Word Function GetWindowLong( hWnd : HWND; nIndex : Int) : Longint Function SetWindowLong( hWnd : HWND; nIndex : Int; dwNewLong : Longint) : Longint Function GetClassWord( hWnd : HWND; nIndex : Int) : Word Function SetClassWord( hWnd : HWND; nIndex : Int; wNewWord : Word) : Word Function GetClassLong( hWnd : HWND; nIndex : Int) : DWORD Function SetClassLong( hWnd : HWND; nIndex : Int; dwNewLong : Longint) : DWORD Function GetDesktopWindow : HWND Function GetParent( hWnd : HWND) : HWND Function SetParent( hWndChild, hWndNewParent : HWND) : HWND Function GetTopWindow( hWnd : HWND) : HWND Function GetNextWindow( hWnd : HWND; uCmd : UINT) : HWND Function GetWindow( hWnd : HWND; uCmd : UINT) : HWND //Delphi DFM Function LoadDFMFile2Strings(const AFile:string; AStrings:TStrings; var WasText:boolean):Int Function SaveStrings2DFMFile( AStrings : TStrings; const AFile : string) : Int procedure GetHighlighters(AOwner: TComponent; AHighlighters: TStringList; AppendToList: boolean); function GetHighlightersFilter(AHighlighters: TStringList): string; function GetHighlighterFromFileExt(AHighlighters: TStringList;Extension: string):TSynCustomHighlighter; Function ShowOwnedPopups( hWnd : HWND; fShow : BOOL) : BOOL Function OpenIcon( hWnd : HWND) : BOOL Function CloseWindow( hWnd : HWND) : BOOL Function MoveWindow( hWnd : HWND; X, Y, nWidth, nHeight : Int; bRepaint : BOOL) : BOOL Function SetWindowPos(hWnd: HWND;hWndInsertAfter:HWND; X,Y,cx,cy:Int;uFlags:UINT) : BOOL Function IsWindowVisible( hWnd : HWND) : BOOL Function IsIconic( hWnd : HWND) : BOOL Function AnyPopup : BOOL Function BringWindowToTop( hWnd : HWND) : BOOL Function IsZoomed( hWnd : HWND) : BOOL Function IsWindow( hWnd : HWND) : BOOL Function IsMenu( hMenu : HMENU) : BOOL Function IsChild( hWndParent, hWnd : HWND) : BOOL Function DestroyWindow( hWnd : HWND) : BOOL Function ShowWindow( hWnd : HWND; nCmdShow : Int) : BOOL Function AnimateWindow( hWnd : HWND; dwTime : DWORD; dwFlags : DWORD) : BOOL Function ShowWindowAsync( hWnd : HWND; nCmdShow : Int) : BOOL Function FlashWindow( hWnd : HWND; bInvert : BOOL) : BOOL Function IsWindowUnicode( hWnd : HWND) : BOOL Function EnableWindow( hWnd : HWND; bEnable : BOOL) : BOOL Function IsWindowEnabled( hWnd : HWND) : BOOL procedure SIRegister_IDECmdLine(CL: TPSPascalCompiler); begin const('ShowSetupDialogOptLong','String '--setup PrimaryConfPathOptLong','String '--primary-config-path= PrimaryConfPathOptShort','String '--pcp= SecondaryConfPathOptLong','String '--secondary-config-path= SecondaryConfPathOptShort','String '--scp= NoSplashScreenOptLong','String '--no-splash-screen NoSplashScreenOptShort','String '--nsc StartedByStartLazarusOpt','String '--started-by-startlazarus SkipLastProjectOpt','String '--skip-last-project DebugLogOpt','String '--debug-log= DebugLogOptEnable','String '--debug-enable= LanguageOpt','String '--language= LazarusDirOpt','String '--lazarusdir= Procedure ParseCommandLine(aCmdLineParams:TStrings;out IDEPid:Int;out ShowSplashScreen:bool); Function GetCommandLineParameters( aCmdLineParams : TStrings; isStartLazarus:Boolean) : string Function ExtractPrimaryConfigPath( aCmdLineParams : TStrings) : string Function IsHelpRequested : Boolean Function IsVersionRequested : boolean Function GetLanguageSpecified : string Function ParamIsOption( ParamIndex : Int; const Option : string) : boolean Function ParamIsOptionPlusValue(ParamIndex:int;const Option:string;out AValue:string):bool; Procedure ParseNoGuiCmdLineParams Function ExtractCmdLineFilenames : TStrings end; procedure SIRegister_LazFileUtils(CL: TPSPascalCompiler); begin Function CompareFilenames( const Filename1, Filename2 : string) : Int Function CompareFilenamesIgnoreCase( const Filename1, Filename2 : string) : Int Function CompareFileExt( const Filename, Ext : string; CaseSensitive : boolean) : Int; Function CompareFileExt1( const Filename, Ext : string) : Int; Function CompareFilenameStarts( const Filename1, Filename2 : string) : Int Function CompareFilenames(Filename1:PChar;Len1:Int; Filename2:PChar;Len2:Int):Int Function CompareFilenamesP( Filename1, Filename2 : PChar; IgnoreCase : boolean) : Int Function DirPathExists( DirectoryName : string) : boolean Function DirectoryIsWritable( const DirectoryName : string) : boolean Function ExtractFileNameOnly( const AFilename : string) : string Function FilenameIsAbsolute( const TheFilename : string) : boolean Function FilenameIsWinAbsolute( const TheFilename : string) : boolean Function FilenameIsUnixAbsolute( const TheFilename : string) : boolean Function ForceDirectory( DirectoryName : string) : boolean Procedure CheckIfFileIsExecutable( const AFilename : string) Procedure CheckIfFileIsSymlink( const AFilename : string) Function FileIsText( const AFilename : string) : boolean Function FileIsText2( const AFilename : string; out FileReadable : boolean): boolean Function FilenameIsTrimmed( const TheFilename : string) : boolean Function FilenameIsTrimmed2( StartPos : PChar; NameLen : Int) : boolean Function TrimFilename( const AFilename : string) : string Function ResolveDots( const AFilename : string) : string Procedure ForcePathDelims( var FileName : string) Function GetForcedPathDelims( const FileName : string) : String Function CleanAndExpandFilename( const Filename : string) : string Function CleanAndExpandDirectory( const Filename : string) : string Function TrimAndExpandFilename( const Filename : string; const BaseDir : string) : string Function TrimAndExpandDirectory( const Filename : string; const BaseDir : string) : string Function TryCreateRelativePath(const Dest,Source:String; UsePointDirectory:bool; AlwaysRequireSharedBaseFolder: Boolean; out RelPath : String) : Boolean Function CreateRelativePath(const Filename,BaseDirectory:string;UsePointDirectory:boolean;AlwaysRequireSharedBaseFolder: Boolean) : string Function FileIsInPath( const Filename, Path : string) : boolean Function AppendPathDelim( const Path : string) : string Function ChompPathDelim( const Path : string) : string Function CreateAbsoluteSearchPath( const SearchPath, BaseDirectory : string) : string Function CreateRelativeSearchPath( const SearchPath, BaseDirectory : string) : string Function MinimizeSearchPath( const SearchPath : string) : string Function FindPathInSearchPath(APath:PChar;APathLen:int;SearchPath:PChar;SearchPathLen:int):PChar; (*Function FileExistsUTF8( const Filename : string) : boolean Function FileAgeUTF8( const FileName : string) : Longint Function DirectoryExistsUTF8( const Directory : string) : Boolean Function ExpandFileNameUTF8( const FileName : string; BaseDir : string) : string Function FindFirstUTF8(const Path:string; Attr: Longint; out Rslt : TSearchRec) : Longint Function FindNextUTF8( var Rslt : TSearchRec) : Longint Procedure FindCloseUTF8( var F : TSearchrec) Function FileSetDateUTF8( const FileName : String; Age : Longint) : Longint Function FileGetAttrUTF8( const FileName : String) : Longint Function FileSetAttrUTF8( const Filename : String; Attr : longint) : Longint Function DeleteFileUTF8( const FileName : String) : Boolean Function RenameFileUTF8( const OldName, NewName : String) : Boolean Function FileSearchUTF8( const Name, DirList : String; ImplicitCurrentDir : Boolean) : String Function FileIsReadOnlyUTF8( const FileName : String) : Boolean Function GetCurrentDirUTF8 : String Function SetCurrentDirUTF8( const NewDir : String) : Boolean Function CreateDirUTF8( const NewDir : String) : Boolean Function RemoveDirUTF8( const Dir : String) : Boolean Function ForceDirectoriesUTF8( const Dir : string) : Boolean Function FileOpenUTF8( const FileName : string; Mode : Int) : THandle Function FileCreateUTF8( const FileName : string) : THandle; Function FileCreateUTF81( const FileName : string; Rights : Cardinal) : THandle; Function FileCreateUtf82( const FileName : String; ShareMode : Int; Rights : Cardinal) : THandle; Function FileSizeUtf8( const Filename : string) : int64 Function GetFileDescription( const AFilename : string) : string Function GetAppConfigDirUTF8( Global : Boolean; Create : boolean) : string Function GetAppConfigFileUTF8( Global: Boolean; SubDir: boolean; CreateDir: boolean) : string Function GetTempFileNameUTF8( const Dir, Prefix : String) : String*) Function IsUNCPath( const Path : String) : Boolean Function ExtractUNCVolume( const Path : String) : String Function ExtractFileRoot( FileName : String) : String Function GetDarwinSystemFilename( Filename : string) : string Procedure SplitCmdLineParams( const Params : string; ParamList : TStrings; ReadBackslash : boolean) Function StrToCmdLineParam( const Param : string) : string Function MergeCmdLineParams( ParamList : TStrings) : string Procedure InvalidateFileStateCache( const Filename : string) Function FindAllFiles(const SearchPath:String;SearchMask:String;SearchSubDirs:Boolean):TStringList); Function FindAllDirectories( const SearchPath : string; SearchSubDirs : Boolean) : TStringList Function FindAllDocs(const Root, extmask: string): TStringlist; Function ReadFileToString( const Filename : string) : string procedure Inc1(var X: longint; N: Longint); type TCopyFileFlag = ( cffOverwriteFile, cffCreateDestDirectory, cffPreserveTime ); TCopyFileFlags = set of TCopyFileFlag;*) TCopyFileFlag', '(cffOverwriteFile, cffCreateDestDirectory, cffPreserveTime) TCopyFileFlags', 'set of TCopyFileFlag Function CopyDirTree( const SourceDir, TargetDir : string; Flags : TCopyFileFlags) : Boolean end; procedure SIRegister_lazMasks(CL: TPSPascalCompiler); begin TMaskCharType', '( mcChar, mcCharSet, mcAnyChar, mcAnyText ) SIRegister_TMask(CL); SIRegister_TParseStringList(CL); SIRegister_TMaskList(CL); Function MatchesMask( const FileName, Mask : String; const CaseSensitive : Boolean) : Boolean Function MatchesWindowsMask(const FileName,Mask:String;const CaseSensitive : Boolean) : Bool; Function MatchesMaskList(const FileName,Mask:String;Separator:Char;const CaseSensitive:Boolean):Bool; Function MatchesWindowsMaskList(const FileName,Mask:String;Separat:Char;const CaseSensitive:Bool):Bool; end; procedure SIRegister_JvShellHook(CL: TPSPascalCompiler); begin //PShellHookInfo', '^TShellHookInfo // will not work TShellHookInfo', 'record hwnd : THandle; rc : TRect; end SHELLHOOKINFO', 'TShellHookInfo LPSHELLHOOKINFO', 'PShellHookInfo TJvShellHookEvent', 'Procedure ( Sender : TObject; var Msg : TMessage) SIRegister_TJvShellHook(CL); Function InitJvShellHooks : Boolean Procedure UnInitJvShellHooks end; procedure SIRegister_JvExControls(CL: TPSPascalCompiler); begin TDlgCode', '( dcWantAllKeys, dcWantArrows, dcWantChars, dcButton, dcHasSetSel, dcWantTab, dcNative ) TDlgCodes', 'set of TDlgCodedcWantMessage',' dcWantAllKeys); SIRegister_IJvExControl(CL); SIRegister_IJvDenySubClassing(CL); SIRegister_TStructPtrMessage(CL); Procedure SetDotNetFrameColors( FocusedColor, UnfocusedColor : TColor) Procedure DrawDotNetControl( Control : TWinControl; AColor : TColor; InControl : Boolean); Procedure DrawDotNetControl1(DC: HDC; R : TRect; AColor : TColor; UseFocusedColor : Boolean); Procedure HandleDotNetHighlighting(Control:TWinControl;const Msg:TMessage;MouseOver:Boolean;Color:TColor); Function CreateWMMessage( Msg : Int; WParam : Int; LParam : Longint) : TMessage; Function CreateWMMessage1( Msg : Int; WParam : Int; LParam : TControl) : TMessage; Function SmallPointToLong( const Pt : TSmallPoint) : Longint Function ShiftStateToKeyData( Shift : TShiftState) : Longint Function GetFocusedControl( AControl : TControl) : TWinControl Function DlgcToDlgCodes( Value : Longint) : TDlgCodes Function DlgCodesToDlgc( Value : TDlgCodes) : Longint Procedure GetHintColor( var HintInfo : THintInfo; AControl : TControl; HintColor : TColor) Function DispatchIsDesignMsg( Control : TControl; var Msg : TMessage) : Boolean SIRegister_TJvExControl(CL); SIRegister_TJvExWinControl(CL); SIRegister_TJvExCustomControl(CL); SIRegister_TJvExGraphicControl(CL); SIRegister_TJvExHintWindow(CL); SIRegister_TJvExPubGraphicControl(CL); end; (*----------------------------------------------------------------------------*) procedure SIRegister_EncdDecd(CL: TPSPascalCompiler); begin Procedure EncodeStream( Input, Output : TStream) Procedure DecodeStream( Input, Output : TStream) Function EncodeString1( const Input : string) : string Function DecodeString1( const Input : string) : string end; (*----------------------------------------------------------------------------*) procedure SIRegister_SockAppReg(CL: TPSPascalCompiler); begin SIRegister_TWebAppRegInfo(CL); SIRegister_TWebAppRegList(CL); Procedure GetRegisteredWebApps( AList : TWebAppRegList) Procedure RegisterWebApp( const AFileName, AProgID : string) Procedure UnregisterWebApp( const AProgID : string) Function FindRegisteredWebApp( const AProgID : string) : string Function CreateRegistry( InitializeNewFile : Boolean) : TCustomIniFilesUDPPort',String 'UDPPort end; procedure SIRegister_PJEnvVars(CL: TPSPascalCompiler); begin // TStringDynArray', 'array of string Function GetEnvVarValue( const VarName : string) : string Function SetEnvVarValue( const VarName, VarValue : string) : Int Function DeleteEnvVar( const VarName : string) : Int Function CreateEnvBlock(const NewEnv:TStrings;const IncludeCurrent:Bool;const Buffer:str;const BufSize:Int):Int; Function ExpandEnvVars( const Str : string) : string Function GetAllEnvVars( const Vars : TStrings) : Int Procedure GetAllEnvVarNames( const Names : TStrings); Function GetAllEnvVarNames1 : TStringDynArray; Function EnvBlockSize : Int TPJEnvVarsEnum', 'Procedure ( const VarName : string; Data : TObject) SIRegister_TPJEnvVarsEnumerator(CL); SIRegister_TPJEnvVars(CL); FindClass('TOBJECT'),'EPJEnvVars FindClass('TOBJECT'),'EPJEnvVars //Procedure Register end; (*----------------------------------------------------------------------------*) procedure SIRegister_PJConsoleApp(CL: TPSPascalCompiler); begin 'cOneSecInMS','LongInt'( 1000); //'cDefTimeSlice','LongInt'( 50); //'cDefMaxExecTime',' cOneMinInMS); 'cAppErrorMask','LongInt'( 1 shl 29); Function IsApplicationError( const ErrCode : LongWord) : Boolean TPJConsoleAppPriority', '( cpDefault, cpHigh, cpNormal, cpIdle, cpRealTime ) TPJConsoleColors', 'record Foreground : TPJConsoleColor; Background:TPJConsoleColor; end; Function MakeConsoleColors(const AForeground, ABackground: TPJConsoleColor):TPJConsoleColors; Function MakeConsoleColors1( const AForeground, ABackground : TColor) : TPJConsoleColors; Function MakeConsoleColors2(const AForeground ABackground: TAlphaColor) : TPJConsoleColors; Function MakeSize( const ACX, ACY : LongInt) : TSize SIRegister_TPJCustomConsoleApp(CL); SIRegister_TPJConsoleApp(CL); end; procedure SIRegister_ip_misc(CL: TPSPascalCompiler); begin INVALID_IP_ADDRESS','LongWord').SetUInt( $ffffffff); t_encoding', '( uuencode, base64, mime ) Function internet_date( date : TDateTime) : string Function lookup_hostname( const hostname : string) : longint Function my_hostname : string Function my_ip_address : longint Function ip2string( ip_address : longint) : string Function resolve_hostname( ip : longint) : string Function address_from( const s : string; count : Int) : string Function encode_base64( data : TStream) : TStringList Function decode_base64( source : TStringList) : TMemoryStream Function posn( const s, t : string; count : Int) : Int Function poscn( c : char; const s : string; n : Int) : Int Function filename_of( const s : string) : string //Function trim( const s : string) : string //Procedure setlength( var s : string; l : byte) Function TimeZoneBias : longint Function eight2seven_quoteprint( const s : string) : string Function eight2seven_german( const s : string) : string Function seven2eight_quoteprint( const s : string) : string end; type in_addr', 'record s_bytes : array[1..4] of byte; end; Function socketerror : cint Function fpsocket( domain : cint; xtype : cint; protocol : cint) : cint Function fprecv( s : cint; buf : ___pointer; len : size_t; flags : cint) : ssize_t Function fpsend( s : cint; msg : ___pointer; len : size_t; flags : cint) : ssize_t //Function fpbind( s : cint; addrx : psockaddr; addrlen : tsocklen) : cint Function fplisten( s : cint; backlog : cint) : cint //Function fpaccept( s : cint; addrx : psockaddr; addrlen : plongint) : cint //Function fpconnect( s : cint; name : psockaddr; namelen : tsocklen) : cint //Function fpgetsockname( s : cint; name : psockaddr; namelen : psocklen) : cint Function NetAddrToStr( Entry : in_addr) : String Function HostAddrToStr( Entry : in_addr) : String Function StrToHostAddr( IP : String) : in_addr Function StrToNetAddr( IP : String) : in_addr SOL_SOCKET','LongWord').SetUInt( $ffff); cint8', 'shortint cuint8', 'byte cchar', 'cint8 cschar', 'cint8 cuchar', 'cuint8 cint16', 'smallint cuint16', 'word cshort', 'cint16 csshort', 'cint16 cushort', 'cuint16 cint32', 'longint cuint32', 'longword cint', 'cint32 csint', 'cint32 cuint', 'cuint32 csigned', 'cint cunsigned', 'cuint cint64', 'int64 clonglong', 'cint64 cslonglong', 'cint64 cbool', 'longbool cfloat', 'single cdouble', 'double clongdouble', 'extended procedure SIRegister_uLkJSON(CL: TPSPascalCompiler); begin TlkJSONtypes','(jsBase,jsNumber,jsString,jsBoolean,jsNull,jsList,jsObject ) SIRegister_TlkJSONdotnetclass(CL); SIRegister_TlkJSONbase(CL); SIRegister_TlkJSONnumber(CL); SIRegister_TlkJSONstring(CL); SIRegister_TlkJSONboolean(CL); SIRegister_TlkJSONnull(CL); TlkJSONFuncEnum', 'Procedure (ElName: string; Elem: TlkJSONbase; data: TObject; var Continue: Boolean) SIRegister_TlkJSONcustomlist(CL); SIRegister_TlkJSONlist(CL); SIRegister_TlkJSONobjectmethod(CL); TlkHashItem', 'record hash : cardinal; index : Int; end TlkHashFunction', 'Function ( const ws : WideString) : cardinal SIRegister_TlkHashTable(CL); SIRegister_TlkBalTree(CL); SIRegister_TlkJSONobject(CL); SIRegister_TlkJSON(CL); SIRegister_TlkJSONstreamed(CL); Function GenerateReadableText( vObj : TlkJSONbase; var vLevel : Int): string end; Ex: js:= TlkJSON.create; jsonObject:= js.ParseText(jsonstring) as TlkJSONobject; try writeln('get message: '+jsonObject.Field['amessage'].value); writeln(vartostr(jsonobject.Field['book'].Child[3].field['ISBN'].value)); procedure SIRegister_ZSysUtils(CL: TPSPascalCompiler); begin TZListSortCompare', 'Function (Item1, Item2 : TObject): Int SIRegister_TZSortedList(CL); Function zFirstDelimiter( const Delimiters, Str : string) : Int Function zLastDelimiter( const Delimiters, Str : string) : Int //Function MemLCompUnicode( P1, P2 : PWideChar; Len : Int) : Boolean //Function MemLCompAnsi( P1, P2 : PAnsiChar; Len : Int) : Boolean Function zStartsWith( const Str, SubStr : WideString) : Boolean; Function StartsWith1( const Str, SubStr : RawByteString) : Boolean; Function EndsWith( const Str, SubStr : WideString) : Boolean; Function EndsWith1( const Str, SubStr : RawByteString) : Boolean; Function SQLStrToFloatDef( Str : RawByteString; Def : Extended) : Extended; Function SQLStrToFloatDef1( Str : String; Def : Extended) : Extended; Function SQLStrToFloat( const Str : AnsiString) : Extended //Function BufferToStr( Buffer : PWideChar; Length : LongInt) : string; //Function BufferToStr1( Buffer : PAnsiChar; Length : LongInt) : string; Function BufferToBytes( Buffer : TObject; Length : LongInt) : TByteDynArray Function StrToBoolEx( Str : string) : Boolean Function BoolToStrEx( Bool : Boolean) : String Function IsIpAddr( const Str : string) : Boolean //IsIP() Function zSplitString( const Str, Delimiters : string) : TStrings Procedure PutSplitString( List : TStrings; const Str, Delimiters : string) Procedure AppendSplitString( List : TStrings; const Str, Delimiters : string) Function ComposeString( List : TStrings; const Delimiter : string) : string Function FloatToSQLStr( Value : Extended) : string Procedure PutSplitStringEx( List : TStrings; const Str, Delimiter : string) Function SplitStringEx( const Str, Delimiter : string) : TStrings Procedure AppendSplitStringEx( List : TStrings; const Str, Delimiter : string) Function zBytesToStr( const Value : TByteDynArray) : AnsiString Function zStrToBytes( const Value : AnsiString) : TByteDynArray; Function StrToBytes1( const Value : UTF8String) : TByteDynArray; Function StrToBytes2( const Value : RawByteString) : TByteDynArray; Function StrToBytes3( const Value : WideString) : TByteDynArray; Function StrToBytes4( const Value : UnicodeString) : TByteDynArray; Function BytesToVar( const Value : TByteDynArray) : Variant Function VarToBytes( const Value : Variant) : TByteDynArray Function AnsiSQLDateToDateTime( const Value : string) : TDateTime Function TimestampStrToDateTime( const Value : string) : TDateTime Function DateTimeToAnsiSQLDate( Value : TDateTime; WithMMSec : Boolean) : string Function EncodeCString( const Value : string) : string Function DecodeCString( const Value : string) : string Function zReplaceChar( const Source, Target : Char; const Str : string) : string Function MemPas( Buffer : PChar; Length : LongInt) : string Procedure DecodeSQLVersioning(const FullVersion:Int;out MajorVersion:Int;out MinorVersion:Int;out SubVersion:Int); Function EncodeSQLVersioning(const MajorVersion:Int;const MinorVersion:Int;const SubVersion:Int):Int; Function FormatSQLVersion( const SQLVersion : Int) : String Function ZStrToFloat( Value : AnsiChar) : Extended; Function ZStrToFloat1( Value : AnsiString) : Extended; Procedure ZSetString( const Src : AnsiChar; var Dest : AnsiString); Procedure ZSetString1( const Src : AnsiChar; const Len : Cardinal; var Dest : AnsiString); Procedure ZSetString2( const Src : AnsiChar; var Dest : UTF8String); Procedure ZSetString3( const Src : AnsiChar; const Len : Cardinal; var Dest : UTF8String); Procedure ZSetString4( const Src : AnsiChar; const Len : Cardinal; var Dest : WideString); Procedure ZSetString5( const Src : AnsiChar; var Dest : RawByteString); Procedure ZSetString6( const Src : AnsiChar; const Len : Cardinal; var Dest : RawByteString); end; unit uPSI_ZEncoding; Function StringToAnsiEx( const s : String; const FromCP, ToCP : Word) : RawByteString Function AnsiToStringEx( const s : RawByteString; const FromCP, ToCP : Word) : String Function ZRawToUnicode( const S : RawByteString; const CP : Word) : WideString Function ZUnicodeToRaw( const US : WideString; CP : Word) : RawByteString Function ZConvertAnsiToRaw( const Src : AnsiString; const RawCP : Word) : RawByteString Function ZConvertRawToAnsi( const Src : RawByteString; const RawCP : Word) : AnsiString Function ZConvertAnsiToUTF8( const Src : AnsiString) : UTF8String Function ZConvertUTF8ToAnsi( const Src : UTF8String) : AnsiString Function ZConvertRawToUTF8( const Src : RawByteString; const CP : Word) : UTF8String Function ZConvertUTF8ToRaw( const Src : UTF8String; const CP : Word) : RawByteString Function ZConvertRawToString(const Src:RawByteString; const RawCP, StringCP : Word):String Function ZConvertStringToRaw( const Src : String; const StringCP, RawCP : Word) : RawByteString Function ZConvertStringToRawWithAutoEncode(const Src:String;const StringCP,RawCP:Word):RawByteString; Function ZConvertUTF8ToString( const Src : UTF8String; const StringCP : Word) : String Function ZConvertStringToUTF8( const Src : String; const StringCP : Word) : UTF8String Function ZConvertStringToUTF8WithAutoEncode( const Src : String; const StringCP: Word): UTF8String Function ZConvertStringToAnsi( const Src : String; const StringCP : Word) : AnsiString Function ZConvertStringToAnsiWithAutoEncode( const Src : String; const StringCP: Word): AnsiString Function ZConvertAnsiToString( const Src : AnsiString; const StringCP : Word) : String Function ZConvertUnicodeToString( const Src : WideString; const StringCP : Word) : String Function ZConvertUnicodeToString_CPUTF8(const Src:WideString; const StringCP : Word): String Function ZConvertStringToUnicode( const Src : String; const StringCP : Word) : WideString Function ZConvertString_CPUTF8ToUnicode( const Src : String; const StringCP : Word) : WideString Function ZConvertStringToUnicodeWithAutoEncode( const Src: String; const StringCP:Word):WideString Function ZMoveAnsiToRaw( const Src : AnsiString; const RawCP : Word) : RawByteString Function ZMoveRawToAnsi( const Src : RawByteString; const RawCP : Word) : AnsiString Function ZMoveAnsiToUTF8( const Src : AnsiString) : UTF8String Function ZMoveUTF8ToAnsi( const Src : UTF8String) : AnsiString Function ZMoveRawToUTF8( const Src : RawByteString; const CP : Word) : UTF8String Function ZMoveUTF8ToRaw( const Src : UTF8String; const CP : Word) : RawByteString Function ZMoveStringToAnsi( const Src : String; const StringCP : Word) : AnsiString Function ZMoveAnsiToString( const Src : AnsiString; const StringCP : Word) : String Function ZMoveRawToString( const Src : RawByteString; const RawCP, StringCP : Word) : String Function ZMoveStringToRaw( const Src : String; const StringCP, RawCP : Word) : RawByteString Function ZMoveUTF8ToString( const Src : UTF8String; StringCP : Word) : String Function ZMoveStringToUTF8( const Src : String; const StringCP : Word) : UTF8String Function ZUnknownRawToUnicode( const S : RawByteString; const CP : Word) : WideString Function ZUnknownRawToUnicodeWithAutoEncode( const S : RawByteString; const CP : Word) : WideString Function ZUnicodeToUnknownRaw( const US : WideString; CP : Word) : RawByteString Function ZDefaultSystemCodePage : Word Function ZCompatibleCodePages( const CP1, CP2 : Word) : Boolean function MPing(const AHost: string;const ATimes:Int; out AvgMS:Double):Boolean; procedure SIRegister_BoldComUtils(CL: TPSPascalCompiler); begin 'RPC_C_AUTHN_LEVEL_DEFAULT','LongInt'( 0); ('RPC_C_AUTHN_LEVEL_NONE','LongInt'( 1); ('RPC_C_AUTHN_LEVEL_CONNECT','LongInt'( 2); ('RPC_C_AUTHN_LEVEL_CALL','LongInt'( 3); ('RPC_C_AUTHN_LEVEL_PKT','LongInt'( 4); ('RPC_C_AUTHN_LEVEL_PKT_INTEGRITY','LongInt'( 5); ('RPC_C_AUTHN_LEVEL_PKT_PRIVACY','LongInt'( 6); {('alDefault','1 RPC_C_AUTHN_LEVEL_DEFAULT); ('alNone','2 RPC_C_AUTHN_LEVEL_NONE); ('alConnect','3 RPC_C_AUTHN_LEVEL_CONNECT); ('alCall','4 RPC_C_AUTHN_LEVEL_CALL); ('alPacket','5 RPC_C_AUTHN_LEVEL_PKT); ('alPacketIntegrity','6 RPC_C_AUTHN_LEVEL_PKT_INTEGRITY); ('alPacketPrivacy','7 RPC_C_AUTHN_LEVEL_PKT_PRIVACY);} ('RPC_C_IMP_LEVEL_DEFAULT','LongInt'( 0); ('RPC_C_IMP_LEVEL_ANONYMOUS','LongInt'( 1); ('RPC_C_IMP_LEVEL_IDENTIFY','LongInt'( 2); ('RPC_C_IMP_LEVEL_IMPERSONATE','LongInt'( 3); ('RPC_C_IMP_LEVEL_DELEGATE','LongInt'( 4); {('ilDefault','0 RPC_C_IMP_LEVEL_DEFAULT); ('ilAnonymous','1 RPC_C_IMP_LEVEL_ANONYMOUS); ('ilIdentiry','2 RPC_C_IMP_LEVEL_IDENTIFY); ('ilImpersonate','3 RPC_C_IMP_LEVEL_IMPERSONATE); ('ilDelegate','4 RPC_C_IMP_LEVEL_DELEGATE);} ('EOAC_NONE','LongWord').SetUInt( $0); ('EOAC_DEFAULT','LongWord').SetUInt( $800); ('EOAC_MUTUAL_AUTH','LongWord').SetUInt( $1); ('EOAC_STATIC_CLOACKING','LongWord').SetUInt( $20); ('EOAC_DYNAMIC_CLOAKING','LongWord').SetUInt( $40); ('EOAC_ANY_AUTHORITY','LongWord').SetUInt( $80); ('RPC_C_AUTHN_WINNT','LongInt'( 10); ('RPC_C_AUTHNZ_NONE','LongInt'( 0); ('RPC_C_AUTHNZ_NAME','LongInt'( 1); ('RPC_C_AUTHNZ_DCE','LongInt'( 2); FindClass('TOBJECT'),'EBoldCom Function BoldVariantIsType( V : OleVariant; TypeCode : Int) : Boolean Function BoldMemoryToVariant( const Buffer, BufSize : Int) : OleVariant Function BoldStreamToVariant( Stream : TStream) : OleVariant Function BoldStringsToVariant( Strings : TStrings) : OleVariant Function BoldVariantToMemory( V : OleVariant; var Buffer, BufSize : Int) : Int Function BoldVariantToStream( V : OleVariant; Stream : TStream) : Int Function BoldVariantArrayOfArraysOfStringToStrings(V:OleVariant;Strings: TStrings) : Int Function BoldVariantIsNamedValues( V : OleVariant) : Boolean Function BoldCreateNamedValues(const Names:array of string;const Values:array of OleVariant):OleVariant; Function BoldGetNamedValue( Data : OleVariant; const Name : string) : OleVariant Procedure BoldSetNamedValue( Data : OleVariant; const Name : string; Value : OleVariant) Function BoldCreateGUID : TGUID Function BoldCreateComObject( const ClsId, IId : TGUID; out Obj : variant; out Res : HResult) : Boolean Function BoldCreateRemoteComObject(const HostName:string;const ClsId,IId:TGUID;out Obj:variant;out Res:HRes):Bool; Procedure BoldInitializeComSecurity( AuthenticationLevel, ImpersonationLevel : longint) Procedure BoldSetSecurityForInterface(AuthenticationLevel,ImpersonationLevel:longint;Unk:IUnknown); end; (*----------------------------------------------------------------------------*) procedure SIRegister_BoldIsoDateTime(CL: TPSPascalCompiler); begin Function ParseISODate( s : string) : TDateTime Function ParseISODateTime( s : string) : TDateTime Function ParseISOTime( str : string) : TDateTime end; (*----------------------------------------------------------------------------*) procedure SIRegister_BoldGUIDUtils(CL: TPSPascalCompiler); begin Function BoldCreateGUIDAsString( StripBrackets : Boolean) : string Function BoldCreateGUIDWithBracketsAsString : string end; procedure SIRegister_BoldFileHandler(CL: TPSPascalCompiler); begin FindClass('TOBJECT'),'TBoldFileHandler FindClass('TOBJECT'),'TBoldDiskFileHandler //TBoldFileHandlerClass', 'class of TBoldFileHandler TBoldInitializeFileContents', 'Procedure ( StringList : TStringList) SIRegister_TBoldFileHandler(CL); SIRegister_TBoldDiskFileHandler(CL); Procedure BoldCloseAllFilehandlers Procedure BoldRemoveUnchangedFilesFromEditor Function BoldFileHandlerList : TBoldObjectArray Function BoldFileHandlerForFile(path,FileName:String; ModuleType:TBoldModuleType;ShowInEditor:Bool; OnInitializeFileContents : TBoldInitializeFileContents) : TBoldFileHandler end; procedure SIRegister_BoldWinINet(CL: TPSPascalCompiler); begin PCharArr', 'array of PChar Function BoldInternetOpen(Agent:String; AccessType:Int;Proxy:string;ProxyByPass:String;Flags:Int):ptr); Function BoldInternetOpenUrl(iNet:Pointer;URL:string; Headers:String;Flags,Context:cardinal):Pointer Function BoldInternetReadFile(hFile:Pointer;Buff:Ptr;NumbOfBytesToRead:Card;var NumberOfBytesRead:Card):LongBool; Function BoldInternetCloseHandle( HINet : Pointer) : LongBool Function BoldHttpQueryInfo(hRequest:Pointer;InfoLevel:Cardinal;Buffer:Pointer;BufferLength:Cardinal;Reserved:Cardinal) : LongBool Function BoldInternetQueryDataAvailable(hFile:Pointer;var NumberOfBytesAvailable:Cardinal; flags:Cardinal; Context:Cardinal): LongBool Function BoldHttpOpenRequest(hConnect:Pointer;Verb,ObjectName,Version,Referrer:String;AcceptTypes:PCharArr;Flags,Context:Cardinal):Pointer Function BoldHttpSendRequest(hRequest:Ptr;Headers:string;Optional:Ptr;OptionalLength:Cardinal): LongBool Function BoldInternetErrorDlg(hWnd:HWND;hRequest:HINTERNET;dwError,dwFlags:DWORD;var lppvData:Ptr):DWORD Function BoldInternetAttemptConnect( dwReserved : DWORD) : DWORD Function BoldInternetConnect(hInet: HINTERNET;ServerName:string; nServerPort:INTERNET_PORT; Username:string; Password : string; dwService : DWORD; dwFlags : DWORD; dwContext : DWORD):HINTERNET Function BoldInternetCrackUrl(Url:PChar;UrlLength,dwFlags:DWORD;var lpUrlComponents:TURLComponents):BOOL; end; procedure SIRegister_BoldQueryUserDlg(CL: TPSPascalCompiler); begin TBoldQueryResult', '( qrYesAll, qrYes, qrNo, qrNoAll ) SIRegister_TfrmBoldQueryUser(CL); Function QueryUser( const Title, Query : string) : TBoldQueryResult end; (*----------------------------------------------------------------------------*) procedure SIRegister_BoldQueue(CL: TPSPascalCompiler); begin //('befIsInDisplayList',' BoldElementFlag0); //('befStronglyDependedOfPrioritized',' BoldElementFlag1); //('befFollowerSelected',' BoldElementFlag2); FindClass('TOBJECT'),'TBoldQueue FindClass('TOBJECT'),'TBoldQueueable TBoldQueueDisplayMode', '( dmDisplayOne, dmDisplayAll ) SIRegister_TBoldQueueable(CL); SIRegister_TBoldQueue(CL); Function BoldQueueFinalized : Boolean Function BoldInstalledQueue : TBoldQueue end; procedure SIRegister_Barcode(CL: TPSPascalCompiler); begin const mmPerInch','Extended).setExtended( 25.4); TBarcodeType', '( bcCode_2_5_interleaved, bcCode_2_5_industrial,' + bcCode_2_5_matrix, bcCode39, bcCode39Extended, bcCode128A, bcCode128B, bc' +Code128C, bcCode93, bcCode93Extended, bcCodeMSI, bcCodePostNet, bcCodeCoda' +bar, bcCodeEAN8, bcCodeEAN13, bcCodeUPC_A, bcCodeUPC_E0, bcCodeUPC_E1, bcC' +odeUPC_Supp2, bcCodeUPC_Supp5, bcCodeEAN128A, bcCodeEAN128B, bcCodeEAN128C TBarLineType', '( white, black, black_half ) TBarcodeOption', '( bcoNone, bcoCode, bcoTyp, bcoBoth ) TShowTextPosition', '( stpTopLeft, stpTopRight, stpTopCenter, stpBottomLeft, stpBottomRight, stpBottomCenter ) TCheckSumMethod', '( csmNone, csmModulo10 ) SIRegister_TAsBarcode(CL); Function CheckSumModulo10( const data : string) : string Function ConvertMmToPixelsX( const Value : Double) : Int Function ConvertMmToPixelsY( const Value : Double) : Int Function ConvertInchToPixelsX( const Value : Double) : Int Function ConvertInchToPixelsY( const Value : Double) : Int end; procedure SIRegister_Geometry(CL: TPSPascalCompiler); //OpenGL begin THomogeneousByteVector', 'array[0..3] of Byte THomogeneousWordVector', 'array[0..3] of Word THomogeneousIntVector', 'array[0..3] of Int THomogeneousFltVector', 'array[0..3] of single THomogeneousDblVector', 'array[0..3] of double THomogeneousExtVector', 'array[0..3] of extended TAffineByteVector', 'array[0..2] of Byte TAffineWordVector', 'array[0..2] of Word TAffineIntVector', 'array[0..2] of Int TAffineFltVector', 'array[0..2] of single TAffineDblVector', 'array[0..2] of double TAffineExtVector', 'array[0..2] of extended THomogeneousByteMatrix', 'array[0..3] of THomogeneousByteVector THomogeneousWordMatrix', 'array[0..3] of THomogeneousWordVector THomogeneousIntMatrix', 'array[0..3] of THomogeneousIntVector THomogeneousFltMatrix', 'array[0..3] of THomogeneousFltVector THomogeneousDblMatrix', 'array[0..3] of THomogeneousDblVector THomogeneousExtMatrix', 'array[0..3] of THomogeneousExtVector TAffineByteMatrix', 'array[0..2] of TAffineByteVector TAffineWordMatrix', 'array[0..2] of TAffineWordVector TAffineIntMatrix', 'array[0..2] of TAffineIntVector TAffineFltMatrix', 'array[0..3] of TAffineFltVector TAffineDblMatrix', 'array[0..3] of TAffineDblVector TAffineExtMatrix', 'array[0..3] of TAffineExtVector TMatrix4b', 'THomogeneousByteMatrix TMatrix4w', 'THomogeneousWordMatrix TMatrix4i', 'THomogeneousIntMatrix TMatrix4f', 'THomogeneousFltMatrix TMatrix4d', 'THomogeneousDblMatrix TMatrix4e', 'THomogeneousExtMatrix TMatrix3b', 'TAffineByteMatrix TMatrix3w', 'TAffineWordMatrix TMatrix3i', 'TAffineIntMatrix TMatrix3f', 'TAffineFltMatrix TMatrix3d', 'TAffineDblMatrix TMatrix3e', 'TAffineExtMatrix //'PMatrix', '^TMatrix // will not work TMatrixGL', 'THomogeneousFltMatrix THomogeneousMatrix', 'THomogeneousFltMatrix TAffineMatrix', 'TAffineFltMatrix TQuaternion', 'record Vector : TVector4f; end TRectangle', 'record Left : Int; Top : Int; Width : inte' +ger; Height : Int; end TTransType', '( ttScaleX, ttScaleY, ttScaleZ, ttShearXY, ttShear' +'XZ, ttShearYZ, ttRotateX, ttRotateY, ttRotateZ, ttTranslateX, ttTranslateY' +', ttTranslateZ, ttPerspectiveX, ttPerspectiveY, ttPerspectiveZ, ttPerspectiveW ) 'EPSILON','Extended').setExtended( 1E-100); 'EPSILON2','Extended').setExtended( 1E-50); Function VectorAddGL( V1, V2 : TVectorGL) : TVectorGL Function VectorAffineAdd( V1, V2 : TAffineVector) : TAffineVector Function VectorAffineCombine(V1,V2:TAffineVector; F1, F2 : Single) : TAffineVector Function VectorAffineDotProduct( V1, V2 : TAffineVector) : Single Function VectorAffineLerp( V1, V2 : TAffineVector; t : Single) : TAffineVector Function VectorAffineSubtract( V1, V2 : TAffineVector) : TAffineVector Function VectorAngle( V1, V2 : TAffineVector) : Single Function VectorCombine( V1, V2 : TVectorGL; F1, F2 : Single) : TVectorGL Function VectorCrossProduct( V1, V2 : TAffineVector) : TAffineVector Function VectorDotProduct( V1, V2 : TVectorGL) : Single Function VectorLength( V : array of Single) : Single Function VectorLerp( V1, V2 : TVectorGL; t : Single) : TVectorGL Procedure VectorNegate( V : array of Single) Function VectorNorm( V : array of Single) : Single Function VectorNormalize( V : array of Single) : Single Function VectorPerpendicular( V, N : TAffineVector) : TAffineVector Function VectorReflect( V, N : TAffineVector) : TAffineVector Procedure VectorRotate( var Vector : TVector4f; Axis : TVector3f; Angle : Single) Procedure VectorScale( V : array of Single; Factor : Single) Function VectorSubtractGL( V1, V2 : TVectorGL) : TVectorGL Function CreateRotationMatrixX( Sine, Cosine : Single) : TMatrixGL Function CreateRotationMatrixY( Sine, Cosine : Single) : TMatrixGL Function CreateRotationMatrixZ( Sine, Cosine : Single) : TMatrixGL Function CreateScaleMatrix( V : TAffineVector) : TMatrixGL Function CreateTranslationMatrix( V : TVectorGL) : TMatrixGL Procedure MatrixAdjoint( var M : TMatrixGL) Function MatrixAffineDeterminant( M : TAffineMatrix) : Single Procedure MatrixAffineTranspose( var M : TAffineMatrix) Function MatrixDeterminant( M : TMatrixGL) : Single Procedure MatrixInvert( var M : TMatrixGL) Function MatrixMultiply( M1, M2 : TMatrixGL) : TMatrixGL Procedure MatrixScale( var M : TMatrixGL; Factor : Single) Procedure MatrixTranspose( var M : TMatrixGL) Function QuaternionConjugate( Q : TQuaternion) : TQuaternion Function QuaternionFromPoints( V1, V2 : TAffineVector) : TQuaternion Function QuaternionMultiply( qL, qR : TQuaternion) : TQuaternion Function QuaternionSlerp( QStart,QEnd:TQuaternion; Spin:Int; t:Single):TQuaternion Function QuaternionToMatrix( Q : TQuaternion) : TMatrixGL Procedure QuaternionToPoints( Q : TQuaternion; var ArcFrom, ArcTo : TAffineVector) Function ConvertRotation( Angles : TAffineVector) : TVectorGL Function CreateRotationMatrix( Axis : TVector3f; Angle : Single) : TMatrixGL //Function MatrixDecompose( M : TMatrixGL; var Tran : TTransformations) : Boolean Function VectorAffineTransform( V : TAffineVector; M : TAffineMatrix) : TAffineVector Function VectorTransform( V : TVector4f; M : TMatrixGL) : TVector4f; Function VectorTransform1( V : TVector3f; M : TMatrixGL) : TVector3f; Function MakeAffineDblVector( V : array of Double) : TAffineDblVector Function MakeDblVector( V : array of Double) : THomogeneousDblVector Function MakeAffineVector( V : array of Single) : TAffineVector Function MakeQuaternion( Imag : array of Single; Real : Single) : TQuaternion Function MakeVector( V : array of Single) : TVectorGL Function PointInPolygonGL( xp, yp : array of Single; x, y : Single) : Boolean Function VectorAffineDblToFlt( V : TAffineDblVector) : TAffineVector Function VectorDblToFlt( V : THomogeneousDblVector) : THomogeneousVector Function VectorAffineFltToDbl( V : TAffineVector) : TAffineDblVector Function VectorFltToDbl( V : TVectorGL) : THomogeneousDblVector Function ArcCosGL( X : Extended) : Extended Function ArcSinGL( X : Extended) : Extended Function ArcTan2GL( Y, X : Extended) : Extended Function CoTanGL( X : Extended) : Extended Function DegToRadGL( Degrees : Extended) : Extended Function RadToDegGL( Radians : Extended) : Extended Procedure SinCosGL( Theta : Extended; var Sin, Cos : Extended) Function TanGL( X : Extended) : Extended Function Turn( Matrix : TMatrixGL; Angle : Single) : TMatrixGL; Function Turn1( Matrix : TMatrixGL; MasterUp : TAffineVector; Angle: Single): TMatrixGL; Function Pitch( Matrix : TMatrixGL; Angle : Single) : TMatrixGL; Function Pitch1( Matrix : TMatrixGL; MasterRight:TAffineVector;Angle:Single):TMatrixGL; Function Roll( Matrix : TMatrixGL; Angle : Single) : TMatrixGL; Function Roll1( Matrix:TMatrixGL; MasterDirection:TAffineVector;Angle:Single):TMatrixGL; end; procedure SIRegister_JclRegistry(CL: TPSPascalCompiler); begin Function RegCreateKey( const RootKey : HKEY; const Key, Value : string) : Longint Function RegDeleteEntry( const RootKey : HKEY; const Key, Name : string) : Boolean Function RegDeleteKeyTree( const RootKey : HKEY; const Key : string) : Boolean Function RegReadBool( const RootKey : HKEY; const Key, Name : string) : Boolean Function RegReadBoolDef(const RootKey:HKEY; const Key, Name: string; Def: Boolean) : Boolean Function RegReadInt( const RootKey : HKEY; const Key, Name : string) : Int Function RegReadIntDef( const RootKey : HKEY; const Key, Name : string; Def : Int) : Int Function RegReadString( const RootKey : HKEY; const Key, Name : string) : string Function RegReadStringDef( const RootKey : HKEY; const Key, Name, Def : string) : string Function RegReadDWORD( const RootKey : HKEY; const Key, Name : string) : Int64 Function RegReadDWORDDef(const RootKey: HKEY; const Key, Name : string; Def:int64) : Int64 Procedure RegWriteBool( const RootKey : HKEY; const Key, Name : string; Value : Boolean) Procedure RegWriteInt( const RootKey : HKEY; const Key, Name : string; Value : Int) Procedure RegWriteString( const RootKey : HKEY; const Key, Name, Value : string) Procedure RegWriteDWORD( const RootKey : HKEY; const Key, Name : string; Value : Int64) Function RegGetValueNames(const RootKey:HKEY; const Key: string; const List : TStrings) : Boolean Function RegGetKeyNames( const RootKey: HKEY; const Key: string; const List : TStrings) : Boolean Function RegHasSubKeys( const RootKey : HKEY; const Key : string) : Boolean Function RegKeyExists( const RootKey : HKEY; const Key : string) : Boolean AddTypeS('TExecKind', (ekMachineRun, ekMachineRunOnce, ekUserRun, ekUserRunOnce, ekServiceRun,ekServiceRunOnce ) AddClassN(FindClass('TOBJECT'),'EJclRegistryError Function UnregisterAutoExec( ExecKind : TExecKind; const Name : string) : Boolean Function RegisterAutoExec( ExecKind : TExecKind; const Name, Cmdline : string) : Boolean Function RegSaveList(const RootKey:HKEY;const Key:string;const ListName:string;const Items:TStrings):Bool; Function RegLoadList(const RootKey:HKEY;const Key:str;const ListName:string;const SaveTo:TStrings):Bool; Function RegDelList( const RootKey:HKEY;const Key:string;const ListName:string): Boolean end; procedure SIRegister_JclCOM(CL: TPSPascalCompiler); begin CLSID_StdComponentCategoriesMgr','TGUID '{0002E005-0000-0000-C000-000000000046} CATID_SafeForInitializing','TGUID '{7DD95802-9882-11CF-9FA9-00AA006C42C4} CATID_SafeForScripting','TGUID '{7DD95801-9882-11CF-9FA9-00AA006C42C4} icMAX_CATEGORY_DESC_LEN','LongInt'( 128); FindClass('TOBJECT'),'EInvalidParam Function IsDCOMInstalled : Boolean Function IsDCOMEnabled : Boolean Function GetDCOMVersion : string Function GetMDACVersion : string Function GetMDACVersion2 : string Function MarshalInterThreadInterfaceInVarArray(const iid:TIID;unk:IUnknown;var VarArray:OleVariant):HResult; Function MarshalInterProcessInterfaceInStream(const iid:TIID;unk:IUnknown;var stm:IStream):HResult; Function MarshalInterProcessInterfaceInVarArray(const iid:TIID;unk:IUnknown;var VarArray:OleVariant):HResult; Function MarshalInterMachineInterfaceInStream( const iid:TIID;unk:IUnknown;var stm:IStream):HResult; Function MarshalInterMachineInterfaceInVarArray(const iid:TIID;unk:IUnknown;var VarArray:OleVariant):HResult; Function CreateComponentCategory( const CatID:TGUID; const sDescription:string): HResult Function RegisterCLSIDInCategory( const ClassID : TGUID; const CatID : TGUID): HResult Function UnRegisterCLSIDInCategory(const ClassID: TGUID; const CatID : TGUID): HResult Function ResetIStreamToStart( Stream : IStream) : Boolean Function SizeOfIStreamContents( Stream : IStream) : Largeint Function StreamToVariantArray( Stream : TStream) : OleVariant; Function StreamToVariantArray1( Stream : IStream) : OleVariant; Procedure VariantArrayToStream( VarArray : OleVariant; var Stream : TStream); Procedure VariantArrayToStream1( VarArray : OleVariant; var Stream : IStream); end; procedure SIRegister_JclUnitConv_mX2(CL: TPSPascalCompiler); begin Const('CelsiusFreezingPoint','Extended').setExtended( 0.0); FahrenheitFreezingPoint','Extended').setExtended( 32.0); KelvinFreezingPoint','Extended').setExtended( 273.15); CelsiusAbsoluteZero','Extended').setExtended( - 273.15); FahrenheitAbsoluteZero','Extended').setExtended( - 459.67); KelvinAbsoluteZero','Extended').setExtended( 0.0); DegPerCycle','Extended').setExtended( 360.0); DegPerGrad','Extended').setExtended( 0.9); DegPerRad','Extended').setExtended( 57.295779513082320876798154814105); GradPerCycle','Extended').setExtended( 400.0); GradPerDeg','Extended').setExtended( 1.1111111111111111111111111111111); GradPerRad','Extended').setExtended( 63.661977236758134307553505349006); RadPerCycle','Extended').setExtended( 6.283185307179586476925286766559); RadPerDeg','Extended').setExtended( 0.017453292519943295769236907684886); RadPerGrad','Extended').setExtended( 0.015707963267948966192313216916398); CyclePerDeg','Extended').setExtended( 0.0027777777777777777777777777777778); CyclePerGrad','Extended').setExtended( 0.0025); CyclePerRad','Extended').setExtended( 0.15915494309189533576888376337251); ArcMinutesPerDeg','Extended').setExtended( 60.0); ArcSecondsPerArcMinute','Extended').setExtended( 60.0); Function HowAOneLinerCanBiteYou( const Step, Max : Longint) : Longint Function MakePercentage( const Step, Max : Longint) : Longint Function CelsiusToKelvin( const T : double) : double Function CelsiusToFahrenheit( const T : double) : double Function KelvinToCelsius( const T : double) : double Function KelvinToFahrenheit( const T : double) : double Function FahrenheitToCelsius( const T : double) : double Function FahrenheitToKelvin( const T : double) : double Function CycleToDeg( const Cycles : double) : double Function CycleToGrad( const Cycles : double) : double Function CycleToRad( const Cycles : double) : double Function DegToCycle( const Degrees : double) : double Function DegToGrad( const Degrees : double) : double Function DegToRad( const Degrees : double) : double Function GradToCycle( const Grads : double) : double Function GradToDeg( const Grads : double) : double Function GradToRad( const Grads : double) : double Function RadToCycle( const Radians : double) : double Function RadToDeg( const Radians : double) : double Function RadToGrad( const Radians : double) : double Function DmsToDeg( const D, M : Int; const S : double) : double Function DmsToRad( const D, M : Int; const S : double) : double Procedure DegToDms( const Degrees : double; out D, M : Int; out S : double) Function DegToDmsStr( const Degrees : double; const SecondPrecision : Cardinal) : string Procedure CartesianToPolar( const X, Y : double; out R, Phi : double) Procedure PolarToCartesian( const R, Phi : double; out X, Y : double) Procedure CartesianToCylinder( const X, Y, Z : double; out R, Phi, Zeta : double) Procedure CartesianToSpheric( const X, Y, Z : double; out Rho, Phi, Theta : double) Procedure CylinderToCartesian( const R, Phi, Zeta : double; out X, Y, Z : double) Procedure SphericToCartesian( const Rho, Theta, Phi : double; out X, Y, Z : double) Function CmToInch( const Cm : double) : double Function InchToCm( const Inch : double) : double Function FeetToMetre( const Feet : double) : double Function MetreToFeet( const Metre : double) : double Function YardToMetre( const Yard : double) : double Function MetreToYard( const Metre : double) : double Function NmToKm( const Nm : double) : double Function KmToNm( const Km : double) : double Function KmToSm( const Km : double) : double Function SmToKm( const Sm : double) : double Function LitreToGalUs( const Litre : double) : double Function GalUsToLitre( const GalUs : double) : double Function GalUsToGalCan( const GalUs : double) : double Function GalCanToGalUs( const GalCan : double) : double Function GalUsToGalUk( const GalUs : double) : double Function GalUkToGalUs( const GalUk : double) : double Function LitreToGalCan( const Litre : double) : double Function GalCanToLitre( const GalCan : double) : double Function LitreToGalUk( const Litre : double) : double Function GalUkToLitre( const GalUk : double) : double Function KgToLb( const Kg : double) : double Function LbToKg( const Lb : double) : double Function KgToOz( const Kg : double) : double Function OzToKg( const Oz : double) : double Function CwtUsToKg( const Cwt : double) : double Function CwtUkToKg( const Cwt : double) : double Function KaratToKg( const Karat : double) : double Function KgToCwtUs( const Kg : double) : double Function KgToCwtUk( const Kg : double) : double Function KgToKarat( const Kg : double) : double Function KgToSton( const Kg : double) : double Function KgToLton( const Kg : double) : double Function StonToKg( const STon : double) : double Function LtonToKg( const Lton : double) : double Function QrUsToKg( const Qr : double) : double Function QrUkToKg( const Qr : double) : double Function KgToQrUs( const Kg : double) : double Function KgToQrUk( const Kg : double) : double Function PascalToBar( const Pa : double) : double Function PascalToAt( const Pa : double) : double Function PascalToTorr( const Pa : double) : double Function BarToPascal( const Bar : double) : double Function AtToPascal( const At : double) : double Function TorrToPascal( const Torr : double) : double Function KnotToMs( const Knot : double) : double Function HpElectricToWatt( const HpE : double) : double Function HpMetricToWatt( const HpM : double) : double Function MsToKnot( const ms : double) : double Function WattToHpElectric( const W : double) : double Function WattToHpMetric( const W : double) : double function getBigPI: string; //PI of 1000 numbers procedure SIRegister_devcutils(CL: TPSPascalCompiler); begin Function CDExecuteFile( const FileName, Params, DefaultDir : string; ShowCmd : Int) : THandle Procedure CDCopyFile( const FileName, DestName : string) Procedure CDMoveFile( const FileName, DestName : string) Function MakeCommaTextToColor( Text : string; Index : Int; DefaultColor : TColor) : TColor Procedure CDDeleteFiles( Sender : TObject; s : string) Function CDGetTempDir : string Function CDGetFileSize( FileName : string) : longint Function GetFileTime( FileName : string) : longint Function GetShortName( FileName : string) : string Function GetFullName( FileName : string) : string Function WinReboot : boolean Function WinDir : String Function RunFile( FileToRun : string; Params : string; Dir : string; Wait : boolean) : cardinal Function RunFile_( Cmd, WorkDir : string; Wait : boolean) : Boolean Function devExecutor : TdevExecutor end; procedure SIRegister_FileAssocs(CL: TPSPascalCompiler); begin Procedure CheckAssociations // AssociationsCount','LongInt'( 7); Procedure Associate( Index : Int) Procedure UnAssociate( Index : Int) Function IsAssociated( Index : Int) : boolean Function CheckFiletype( const extension, filetype, description, verb, serverapp : string) : boolean Procedure RegisterFiletype(const extension,filetype,description,verb,serverapp,IcoNum:string) Procedure RegisterDDEServer( const filetype, verb, topic, servername, macro : string) procedure RefreshIcons; function GetShadeColor(ACanvas: TCanvas; clr: TColor; Value: Int): TColor; function MergColor(Colors: Array of TColor): TColor; function NewColor(ACanvas: TCanvas; clr: TColor; Value: Int): TColor; procedure DimBitmap(ABitmap: TBitmap; Value: Int); function GrayColor(ACanvas: TCanvas; clr: TColor; Value: Int): TColor; function GetInverseColor(AColor: TColor): TColor; procedure GrayBitmap(ABitmap: TBitmap; Value: Int); procedure DrawBitmapShadow(B: TBitmap; ACanvas: TCanvas;X,Y: Int;ShadowColor: TColor); procedure DrawCheckMark(ACanvas: TCanvas; X, Y: Int); Procedure GetSystemMenuFont(Font: TFont); end; //***************************unit uPSI_JvHLParser;******************************* function IsStringConstant(const St: string): Boolean; function IsIntConstant(const St: string): Boolean; function IsRealConstant(const St: string): Boolean; function IsIdentifier(const ID: string): Boolean; function GetStringValue(const St: string): string; procedure ParseString(const S: string; Ss: TStrings); function IsStringConstantW(const St: WideString): Boolean; function IsIntConstantW(const St: WideString): Boolean; function IsRealConstantW(const St: WideString): Boolean; function IsIdentifierW(const ID: WideString): Boolean; function GetStringValueW(const St: WideString): WideString; procedure ParseStringW(const S: WideString; Ss: TStrings); //***************************unit uPSI_JclMapi;******************************* Function JclSimpleSendMail( const ARecipient,AName,ASubject, ABody : string; const AAttachment : TFileName; ShowDialog : Boolean; AParentWND : HWND) : Boolean Function JclSimpleSendFax( const ARecipient, AName,ASubject,ABody:string;const AAttachment: TFileName; ShowDialog : Boolean; AParentWND : HWND) : Boolean Function JclSimpleBringUpSendMailDialog(const ASubject,ABody:string;const AAttach:TFileName;AParentWND:HWND):Bool Function MapiCheck( const Res : DWORD; IgnoreUserAbort : Boolean) : DWORD Function MapiErrorMessage( const ErrorCode : DWORD) : string procedure SIRegister_IdNTLM(CL: TPSPascalCompiler); begin //'Pdes_key_schedule', '^des_key_schedule // will not work Function BuildType1Message( ADomain, AHost : String) : String Function BuildType3Message(ADomain,AHost,AUsername:WideString;APassword,ANonce:String):String Procedure RegisterAuthenticationMethod( MethodName : String; AuthClass : TIdAuthenticationClass) Function FindAuthClass( AuthName : String) : TIdAuthenticationClass GBase64CodeTable','string'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ GXXECodeTable','string'+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz GUUECodeTable','string'`!"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ end; procedure SIRegister_WDosSocketUtils(CL: TPSPascalCompiler); begin ('IpAny','LongWord').SetUInt( $00000000); IpLoopBack','LongWord').SetUInt( $7F000001); IpBroadcast','LongWord').SetUInt( $FFFFFFFF); IpNone','LongWord').SetUInt( $FFFFFFFF); PortAny','LongWord( $0000); SocketMaxConnections','LongInt'( 5); TIpAddr', 'LongWord TIpRec', 'record IpB1 : byte; IpB2 : byte; IpB3 : byte; IpB4 : Byte; end Function HostToNetLong( HostLong : LongWord) : LongWord Function HostToNetShort( HostShort : Word) : Word Function NetToHostLong( NetLong : LongWord) : LongWord Function NetToHostShort( NetShort : Word) : Word Function StrToIp( Ip : string) : TIpAddr Function IpToStr( Ip : TIpAddr) : string end; (*----------------------------------------------------------------------------*) procedure SIRegister_ALSMTPClient(CL: TPSPascalCompiler); begin TAlSmtpClientAuthType', '( AlsmtpClientAuthNone, alsmtpClientAut' +'hPlain, AlsmtpClientAuthLogin, AlsmtpClientAuthCramMD5, AlsmtpClientAuthCr' +'amSha1, AlsmtpClientAuthAutoSelect ) TAlSmtpClientAuthTypeSet', 'set of TAlSmtpClientAuthType SIRegister_TAlSmtpClient(CL); end; procedure SIRegister_WDosPlcUtils(CL: TPSPascalCompiler); begin TBitNo', 'IntTStByteNo', 'IntTStationNo', 'IntTInOutNo', 'IntTIo', '( EE, AA, NE, NA ) TBitSet', 'set of TBitNo TAddrKind', 'set of ( akBit0, akBit1, akBit2, akOut, akNot, akBus ) TBitAddrRec', 'record Kind : TAddrKind; InOutNo : TInOutNo; ByteNo : Byte; end TBitAddr', 'LongInt TByteAddrRec', 'record Kind : TAddrKind; ByteNo : Byte; end TByteAddr', 'SmallInt TInOutState', '( iosInit, iosHalt, iosRun, iosError ) Function BitAddr(aIo: TIo; aInOutNo : TInOutNo; aByteNo : Byte; aBitNo : TBitNo) : TBitAddr Function BusBitAddr(aIo:TIo;aInOutNo:TInOutNo;aStat:TStatNo;aStByteNo:TStByteNo;aBitNo:TBitNo):TBitAddr; Procedure BitAddrToValues(aBitAdr:TBitAdr;var aIo:TIo;var aInOutNo:TInOutNo;var aByteNo:Byte;var aBitNo:TBitNo); Function BitAddrToStr( Value : TBitAddr) : string Function StrToBitAddr( const Value : string) : TBitAddr Function ByteAddr( aIo : TIo; aInOutNo : TInOutNo; aByteNo : Byte) : TByteAddr Function BusByteAddr(aIo:TIo;aInOutNo:TInOutNo;aStation:TStationNo;aStByteNo: TStByteNo):TByteAddr Procedure ByteAddrToValues(aByteAddr:TByteAddr;var aIo:TIo;var aInOutNo:TInOutNo;var aByteNo:Byte) Function ByteAddrToStr( Value : TByteAddr) : string Function StrToByteAddr( const Value : string) : TByteAddr Procedure IncByteAddr( var ByteAddr : TByteAddr; Increment : Int) Procedure DecByteAddr( var ByteAddr : TByteAddr; Decrement : Int) Function InOutStateToStr( State : TInOutState) : string Function MasterErrorToStr( ErrorCode : TErrorCode) : string Function SlaveErrorToStr( ErrorCode : TErrorCode) : string end; procedure SIRegister_WDosTimers(CL: TPSPascalCompiler); begin TIntFreq', '( ifNone, if32768, if16384, if8192, if4096, if2048, ' +'if1024, if512, if256, if128, if64, if32, if16, if8, if4, if2 ) DpmiPmVector', 'Int64 'DInterval','LongInt'( 1000); //'DEnabled','Boolean')BoolToStr( True); 'DIntFreq','string' if64 //'DMessages','Boolean if64); SIRegister_TwdxCustomTimer(CL); SIRegister_TwdxTimer(CL); SIRegister_TwdxRtcTimer(CL); SIRegister_TCustomIntTimer(CL); SIRegister_TIntTimer(CL); SIRegister_TRtcIntTimer(CL); Function RealNow : TDateTime Function MsToDateTime( MilliSecond : LongInt) : TDateTime Function DateTimeToMs( Time : TDateTime) : LongInt end; procedure SIRegister_IdSysLogMessage(CL: TPSPascalCompiler); begin TIdSyslogPRI', 'Int TIdSyslogFacility', '( sfKernel, sfUserLevel, sfMailSystem, sfSy' +'stemDaemon, sfSecurityOne, sfSysLogInternal, sfLPR, sfNNTP, sfUUCP, sfCloc' +'kDaemonOne, sfSecurityTwo, sfFTPDaemon, sfNTP, sfLogAudit, sfLogAlert, sfC' +'lockDaemonTwo, sfLocalUseZero, sfLocalUseOne, sfLocalUseTwo, sfLocalUseThr' +'ee, sfLocalUseFour, sfLocalUseFive, sfLocalUseSix, sfLocalUseSeven ) TIdSyslogSeverity','(slEmergency,slAlert,slCritical,slError,slWarning,slNotice,slInformational,slDebug) SIRegister_TIdSysLogMsgPart(CL); SIRegister_TIdSysLogMessage(CL); Function FacilityToString( AFac : TIdSyslogFacility) : string Function SeverityToString( ASec : TIdsyslogSeverity) : string Function NoToSeverity( ASev : Word) : TIdSyslogSeverity Function logSeverityToNo( ASev : TIdSyslogSeverity) : Word Function NoToFacility( AFac : Word) : TIdSyslogFacility Function logFacilityToNo( AFac : TIdSyslogFacility) : Word end; procedure SIRegister_TextUtils(CL: TPSPascalCompiler); begin 'UWhitespace','String '(?:\s*) Function StripSpaces( const AText : string) : string Function CharCount( const AText : string; Ch : Char) : Int Function BalancedText(const AText: string; const Ch1,Ch2: Char; const Count: Int) : string Function BalancedTextReg( const AText:string; const Ch1, Ch2 : Char; const Count : Int) : string end; procedure SIRegister_ExtPascalUtils(CL: TPSPascalCompiler); begin ExtPascalVersion','String '0.9.8 AddTypeS('TBrowser', '( brUnknown, brIE, brFirefox, brChrome, brSafari, br' +'Opera, brKonqueror, brMobileSafari ) AddTypeS('TCSSUnit', ( cssPX, cssPerc, cssEM, cssEX, cssIN, cssCM, cssMM, cssPT, cssPC, cssnone ) AddTypeS('TExtProcedure', 'Procedure Function DetermineBrowser( const UserAgentStr : string) : TBrowser Function ExtExtract(const Delims:array of string;var S:string;var Matches:TStringList;Remove:bool):bool; Function ExtExplode( Delim : char; const S : string; Separator : char) : TStringList Function FirstDelimiter( const Delimiters, S : string; Offset : Int) : Int Function RPosEx( const Substr, Str : string; Offset : Int) : Int Function CountStr( const Substr, Str : string; UntilStr : string) : Int Function StrToJS( const S : string; UseBR : boolean) : string Function CaseOf( const S : string; const Cases : array of string) : Int Function RCaseOf( const S : string; const Cases : array of string) : Int Function EnumToJSString( TypeInfo : PTypeInfo; Value : Int) : string Function SetPaddings(Top:Int;Right:int;Bottom:intr;Left:int;CSSUnit:TCSSUnit;Header:bool):string; Function SetMargins(Top:Int;Right:int;Bottom:int;Left:Int;CSSUnit:TCSSUnit;Header:bool): string; Function ExtBefore( const BeforeS, AfterS, S : string) : boolean Function IsUpperCase( S : string) : boolean Function BeautifyJS(const AScript:string;const StartingLevel:Int;SplitHTMLNewLine: boolean):string; Function BeautifyCSS( const AStyle : string) : string Function LengthRegExp( Rex : string; CountAll : Boolean) : Int Function JSDateToDateTime( JSDate : string) : TDateTime end; procedure SIRegister_JclShell(CL: TPSPascalCompiler); begin TSHDeleteOption', '( doSilent, doAllowUndo, doFilesOnly ) TSHDeleteOptions', 'set of TSHDeleteOption TSHRenameOption', '( roSilent, roRenameOnCollision ) TSHRenameOptions', 'set of TSHRenameOption Function SHDeleteFiles(Parent:HWND;const Files:string;Options:TSHDeleteOptions):Boolean Function SHDeleteFolder( Parent : HWND; const Folder : string; Options : TSHDeleteOptions) : Boolean Function SHRenameFile( const Src, Dest : string; Options : TSHRenameOptions) : Boolean TEnumFolderFlag', '( efFolders, efNonFolders, efIncludeHidden ) TEnumFolderFlags', 'set of TEnumFolderFlag TEnumFolderRec', 'record DisplayName : string; Attributes : DWORD; IconLarge : HICON; IconSmall : HICON; Item : PItemIdList; EnumIdList : IEnumIdList; Folder : IShellFolder; end Function SHEnumFolderFirst(const Folder:string;Flags:TEnumFolderFlags;var F:TEnumFolderRec):Boolean; Function SHEnumSpecialFolderFirst(SpecFolder:DWORD;Flags:TEnumFolderFlags;var F:TEnumFolderRec):Bool; Procedure SHEnumFolderClose( var F : TEnumFolderRec) Function SHEnumFolderNext( var F : TEnumFolderRec) : Boolean Function GetSpecialFolderLocation( const Folder : Int) : string Function DisplayPropDialog( const Handle : HWND; const FileName : string) : Boolean; Function DisplayPropDialog1( const Handle : HWND; const Item : PItemIdList) : Boolean; Function DisplayContextMenu(const Handle:HWND; const FileName: string; Pos:TPoint): Boolean Function OpenFolder( const Path : string; Parent : HWND) : Boolean Function OpenSpecialFolder( FolderID : Int; Parent : HWND) : Boolean Function SHReallocMem( var P : Pointer; Count : Int) : Boolean Function SHAllocMem( out P : Pointer; Count : Int) : Boolean Function SHGetMem( var P : Pointer; Count : Int) : Boolean Function SHFreeMem( var P : Pointer) : Boolean Function DriveToPidlBind( const DriveName : string; out Folder : IShellFolder) : PItemIdList Function PathToPidl( const Path : string; Folder : IShellFolder) : PItemIdList Function PathToPidlBind( const FileName : string; out Folder : IShellFolder) : PItemIdList Function PidlBindToParent(const IdList:PItemIdList;out Folder:IShellFolder;out Last:PItemIdList):Bool; Function PidlCompare( const Pidl1, Pidl2 : PItemIdList) : Boolean Function PidlCopy( const Source : PItemIdList; out Dest : PItemIdList) : Boolean Function PidlFree( var IdList : PItemIdList) : Boolean Function PidlGetDepth( const Pidl : PItemIdList) : Int Function PidlGetLength( const Pidl : PItemIdList) : Int Function PidlGetNext( const Pidl : PItemIdList) : PItemIdList Function PidlToPath( IdList : PItemIdList) : string Function StrRetFreeMem( StrRet : TStrRet) : Boolean Function StrRetToString( IdList : PItemIdList; StrRet : TStrRet; Free : Boolean) : string PShellLink', '^TShellLink // will not work TShellLink', 'record Arguments : string; ShowCmd : Int; Work' +'ingDirectory : string; IdList : PItemIDList; Target : string; Description ' +': string; IconLocation : string; IconIndex : Int; HotKey : Word; end Procedure ShellLinkFree( var Link : TShellLink) Function ShellLinkResolve( const FileName : string; var Link : TShellLink) : HRESULT Function ShellLinkCreate( const Link : TShellLink; const FileName : string) : HRESULT Function ShellLinkCreateSystem(const Link:TShellLink;const Folder:Int; const FileName:string):HRESULT; Function ShellLinkGetIcon( const Link : TShellLink; const Icon : TIcon) : Boolean Function SHDllGetVersion( const FileName : string; var Version : TDllVersionInfo) : Boolean Function GetSystemIcon( IconIndex : Int; Flags : Cardinal) : HICON Function OverlayIcon( var Icon : HICON; Overlay : HICON; Large : Boolean) : Boolean Function OverlayIconShortCut( var Large, Small : HICON) : Boolean Function OverlayIconShared( var Large, Small : HICON) : Boolean Function SHGetItemInfoTip( const Folder : IShellFolder; Item : PItemIdList) : string Function ShellExecEx(const FileName:string;const Paramtrs:string;const Verb:string; CmdShow:Int):Bool; Function ShellExec(Wnd: Int;const Operati,FileName,Paramtrs,Directy:string;ShowCommand:Int):Bool; Function ShellExecAndWait(const FileName:string;const Paramets:string;const Verb:string;CmdShow:Int):Bool; Function ShellOpenAs( const FileName : string) : Boolean Function ShellRasDial( const EntryName : string) : Boolean Function ShellRunControlPanel( const NameOrFileName:string; AppletNumber:Int):Boolean Function GetFileNameIcon( const FileName : string; Flags : Cardinal) : HICON TJclFileExeType', '( etError, etMsDos, etWin16, etWin32Gui, etWin32Con ) Function GetFileExeType( const FileName : TFileName) : TJclFileExeType Function ShellFindExecutable( const FileName, DefaultDir : string) : string Procedure keybd_event( bVk : Byte; bScan : Byte; dwFlags, dwExtraInfo : DWORD) Function OemKeyScan( wOemChar : Word) : DWORD Procedure mouse_event( dwFlags, dx, dy, dwData, dwExtraInfo : DWORD) end; procedure SIRegister_cXMLFunctions(CL: TPSPascalCompiler); begin xmlVersion','String '1.0 FindClass('TOBJECT'),'Exml //Function xmlValidChar( const Ch : AnsiChar) : Boolean; Function xmlValidChar1( const Ch : UCS4Char) : Boolean; Function xmlValidChar2( const Ch : WideChar) : Boolean; Function xmlIsSpaceChar( const Ch : WideChar) : Boolean Function xmlIsLetter( const Ch : WideChar) : Boolean Function xmlIsDigit( const Ch : WideChar) : Boolean Function xmlIsNameStartChar( const Ch : WideChar) : Boolean Function xmlIsNameChar( const Ch : WideChar) : Boolean Function xmlIsPubidChar( const Ch : WideChar) : Boolean Function xmlValidName( const Text : UnicodeString) : Boolean //xmlSpace','Char #$20 or #$9 or #$D or #$A); //Function xmlSkipSpace( var P : PWideChar) : Boolean //Function xmlSkipEq( var P : PWideChar) : Boolean //Function xmlExtractQuotedText( var P : PWideChar; var S : UnicodeString) : Boolean //Function xmlGetEntityEncoding(const Buf:Pointer;const BufSize:Int;out HeaderSize:Int):TUnicodeCodecClass Function xmlResolveEntityReference( const RefName : UnicodeString) : WideChar Function xmlTag( const Tag : UnicodeString) : UnicodeString Function xmlEndTag( const Tag : UnicodeString) : UnicodeString Function xmlAttrTag( const Tag : UnicodeString; const Attr : UnicodeString) : UnicodeString Function xmlEmptyTag( const Tag, Attr : UnicodeString) : UnicodeString Procedure xmlSafeTextInPlace( var Txt : UnicodeString) Function xmlSafeText( const Txt : UnicodeString) : UnicodeString Function xmlSpaceIndent( const IndentLength : Int; const IndentLevel : Int):UnicodeString Function xmlTabIndent( const IndentLevel : Int) : UnicodeString Function xmlComment( const Comment : UnicodeString) : UnicodeString Procedure SelfTestcXMLFunctions end; (*----------------------------------------------------------------------------*) procedure SIRegister_DepWalkUtils(CL: TPSPascalCompiler); begin Function AWaitCursor : IUnknown Function ChangeCursor( NewCursor : TCursor) : IUnknown Procedure SuspendRedraw( AControl : TWinControl; Suspend : boolean) Function YesNo( const ACaption, AMsg : string) : boolean Procedure strTokenize( const S : string; Delims : TSysCharSet; Results : TStrings) Function GetBorlandLibPath( Version : Int; ForDelphi : boolean) : string Function GetExpandedLibRoot( Version : Int; ForDelphi : boolean) : string Procedure GetPathList( Version : Int; ForDelphi : boolean; Strings : TStrings) Procedure GetSystemPaths( Strings : TStrings) Procedure MakeEditNumeric( EditHandle : Int) end; procedure SIRegister_yuvconverts(CL: TPSPascalCompiler); begin AddTypeS('TVideoCodec','(vcUnknown,vcRGB,vcYUY2,vcUYVY,vcBTYUV,vcYV,U9,vcYUV12,vcY8,vcY211) 'BI_YUY2','LongWord( $32595559); 'BI_UYVY','LongWord').SetUInt( $59565955); 'BI_BTYUV','LongWord').SetUInt( $50313459); 'BI_YVU9','LongWord').SetUInt( $39555659); 'BI_YUV12','LongWord( $30323449); 'BI_Y8','LongWord').SetUInt( $20203859); 'BI_Y211','LongWord').SetUInt( $31313259); Function BICompressionToVideoCodec( Value : DWord) : TVideoCodec Function ConvertCodecToRGB(Codec:TVideoCodec;Src,Dst:Pointer;AWidth,AHeight:Int):Boolean; end; (*----------------------------------------------------------------------------*) procedure SIRegister_AviCap(CL: TPSPascalCompiler); begin 'WM_USER','LongWord').SetUInt( $0400); 'WM_CAP_START','LongWord').SetUint($0400); 'WM_CAP_END','longword').SetUint($0400+85); //WM_CAP_START+ 85 // WM_CAP_SET_CALLBACK_CAPCONTROL = (WM_CAP_START+ 85); Function capSetCallbackOnError( hwnd : THandle; fpProc : LongInt) : LongInt Function capSetCallbackOnStatus( hwnd : THandle; fpProc : LongInt) : LongInt Function capSetCallbackOnYield( hwnd : THandle; fpProc : LongInt) : LongInt Function capSetCallbackOnFrame( hwnd : THandle; fpProc : LongInt) : LongInt Function capSetCallbackOnVideoStream( hwnd : THandle; fpProc : LongInt) : LongInt Function capSetCallbackOnWaveStream( hwnd : THandle; fpProc : LongInt) : LongInt Function capSetCallbackOnCapControl( hwnd : THandle; fpProc : LongInt) : LongInt Function capSetUserData( hwnd : THandle; lUser : LongInt) : LongInt Function capGetUserData( hwnd : THandle) : LongInt Function capDriverConnect( hwnd : THandle; I : Word) : LongInt Function capDriverDisconnect( hwnd : THandle) : LongInt Function capDriverGetName( hwnd : THandle; szName : LongInt; wSize : Word) : LongInt Function capDriverGetVersion( hwnd : THandle; szVer : LongInt; wSize : Word) : LongInt Function capDriverGetCaps( hwnd : THandle; s : LongInt; wSize : Word) : LongInt Function capFileSetCaptureFile( hwnd : THandle; szName : LongInt) : LongInt Function capFileGetCaptureFile( hwnd : THandle; szName : LongInt; wSize : Word):LongInt Function capFileAlloc( hwnd : THandle; dwSize : LongInt) : LongInt Function capFileSaveAs( hwnd : THandle; szName : LongInt) : LongInt Function capFileSetInfoChunk( hwnd : THandle; lpInfoChunk : LongInt) : LongInt Function capFileSaveDIB( hwnd : THandle; szName : LongInt) : LongInt Function capEditCopy( hwnd : THandle) : LongInt Function capSetAudioFormat( hwnd : THandle; s : LongInt; wSize : Word) : LongInt Function capGetAudioFormat( hwnd : THandle; s : LongInt; wSize : Word) : LongInt Function capGetAudioFormatSize( hwnd : THandle) : LongInt Function capDlgVideoFormat( hwnd : THandle) : LongInt Function capDlgVideoSource( hwnd : THandle) : LongInt Function capDlgVideoDisplay( hwnd : THandle) : LongInt Function capDlgVideoCompression( hwnd : THandle) : LongInt Function capGetVideoFormat( hwnd : THandle; s : LongInt; wSize : Word) : LongInt Function capGetVideoFormatSize( hwnd : THandle) : LongInt Function capSetVideoFormat( hwnd : THandle; s : LongInt; wSize : Word) : LongInt Function capPreview( hwnd : THandle; f : Word) : LongInt Function capPreviewRate( hwnd : THandle; wMS : Word) : LongInt Function capOverlay( hwnd : THandle; f : Word) : LongInt Function capPreviewScale( hwnd : THandle; f : Word) : LongInt Function capGetStatus( hwnd : THandle; s : LongInt; wSize : Word) : LongInt Function capSetScrollPos( hwnd : THandle; lpP : LongInt) : LongInt Function capGrabFrame( hwnd : THandle) : LongInt Function capGrabFrameNoStop( hwnd : THandle) : LongInt Function capCaptureSequence( hwnd : THandle) : LongInt Function capCaptureSequenceNoFile( hwnd : THandle) : LongInt Function capCaptureStop( hwnd : THandle) : LongInt Function capCaptureAbort( hwnd : THandle) : LongInt Function capCaptureSingleFrameOpen( hwnd : THandle) : LongInt Function capCaptureSingleFrameClose( hwnd : THandle) : LongInt Function capCaptureSingleFrame( hwnd : THandle) : LongInt Function capCaptureGetSetup( hwnd : THandle; s : LongInt; wSize : Word) : LongInt Function capCaptureSetSetup( hwnd : THandle; s : LongInt; wSize : Word) : LongInt Function capSetMCIDeviceName( hwnd : THandle; szName : LongInt) : LongInt Function capGetMCIDeviceName( hwnd : THandle; szName : LongInt; wSize : Word) : LongInt Function capPaletteOpen( hwnd : THandle; szName : LongInt) : LongInt Function capPaletteSave( hwnd : THandle; szName : LongInt) : LongInt Function capPalettePaste( hwnd : THandle) : LongInt Function capPaletteAuto( hwnd : THandle; iFrames : Word; iColors : LongInt) : LongInt Function capPaletteManual( hwnd : THandle; fGrab : Word; iColors : LongInt) : LongInt //PCapDriverCaps', '^TCapDriverCaps // will not work TCapDriverCaps', 'record wDeviceIndex : WORD; fHasOverlay : BOOL' +'; fHasDlgVideoSource : BOOL; fHasDlgVideoFormat : BOOL; fHasDlgVideoDispla' +'y : BOOL; fCaptureInitialized : BOOL; fDriverSuppliesPalettes : BOOL; hVid' +'eoIn : THANDLE; hVideoOut : THANDLE; hVideoExtIn:THANDLE; hVideoExtOut:THANDLE; end //PCapStatus', '^TCapStatus // will not work TCapStatus', 'record uiImageWidth : UINT; uiImageHeight : UINT; ' +'fLiveWindow : BOOL; fOverlayWindow : BOOL; fScale : BOOL; ptScroll : TPOIN' +'T; fUsingDefaultPalette : BOOL; fAudioHardware : BOOL; fCapFileExists : BO' +'OL; dwCurrentVideoFrame : DWORD; dwCurrentVideoFramesDropped : DWORD; dwCu' +'rrentWaveSamples : DWORD; dwCurrentTimeElapsedMS : DWORD; hPalCurrent : HP' +'ALETTE; fCapturingNow : BOOL; dwReturn : DWORD; wNumVideoAllocated : WORD;' +' wNumAudioAllocated : WORD; end //PCaptureParms', '^TCaptureParms // will not work TCaptureParms', 'record dwRequestMicroSecPerFrame : DWORD; fMake' +'UserHitOKToCapture : BOOL; wPercentDropForError : WORD; fYield : BOOL; dwI' +'ndexSize : DWORD; wChunkGranularity : WORD; fUsingDOSMemory : BOOL; wNumVi' +'deoRequested : WORD; fCaptureAudio : BOOL; wNumAudioRequested : WORD; vKey' +'Abort : WORD; fAbortLeftMouse : BOOL; fAbortRightMouse : BOOL; fLimitEnabl' +'ed : BOOL; wTimeLimit : WORD; fMCIControl : BOOL; fStepMCIDevice : BOOL; d' +'wMCIStartTime : DWORD; dwMCIStopTime : DWORD; fStepCaptureAt2x : BOOL; wSt' +'epCaptureAverageFrames : WORD; dwAudioBufferSize : DWORD; fDisableWriteCac' +'he : BOOL; AVStreamMaster : WORD; end // PCapInfoChunk', '^TCapInfoChunk // will not work //TCapInfoChunk', 'record fccInfoID : FOURCC; lpData : LongInt; cbData : LongInt; end 'CONTROLCALLBACK_PREROLL','LongInt'( 1); 'CONTROLCALLBACK_CAPTURING','LongInt'( 2); Function capCreateCaptureWindow( lpszWindowName: PChar; dwStyle : DWord; x, y : Int; nWidth, nHeight : Int; hwndParent : THandle; nID : Int) : THandle Function capGetDriverDescription(wDriverIndex:DWord;lpszName:PChar;cbName:Int;lpszVer:PChar;cbVer:Int):Bool; 'IDS_CAP_BEGIN','LongInt'( 300); 'IDS_CAP_END','LongInt'( 301); 'IDS_CAP_INFO','LongInt'( 401); 'IDS_CAP_OUTOFMEM','LongInt'( 402); 'IDS_CAP_FILEEXISTS','LongInt'( 403); 'IDS_CAP_ERRORPALOPEN','LongInt'( 404); 'IDS_CAP_ERRORPALSAVE','LongInt'( 405); 'IDS_CAP_ERRORDIBSAVE','LongInt'( 406); 'IDS_CAP_DEFAVIEXT','LongInt'( 407); 'IDS_CAP_DEFPALEXT','LongInt'( 408); 'IDS_CAP_CANTOPEN','LongInt'( 409); 'IDS_CAP_SEQ_MSGSTART','LongInt'( 410); 'IDS_CAP_SEQ_MSGSTOP','LongInt'( 411); 'IDS_CAP_VIDEDITERR','LongInt'( 412); 'IDS_CAP_READONLYFILE','LongInt'( 413); 'IDS_CAP_WRITEERROR','LongInt'( 414); 'IDS_CAP_NODISKSPACE','LongInt'( 415); 'IDS_CAP_SETFILESIZE','LongInt'( 416); 'IDS_CAP_SAVEASPERCENT','LongInt'( 417); 'IDS_CAP_DRIVER_ERROR','LongInt'( 418); 'IDS_CAP_WAVE_OPEN_ERROR','LongInt'( 419); 'IDS_CAP_WAVE_ALLOC_ERROR','LongInt'( 420); 'IDS_CAP_WAVE_PREPARE_ERROR','LongInt'( 421); 'IDS_CAP_WAVE_ADD_ERROR','LongInt'( 422); 'IDS_CAP_WAVE_SIZE_ERROR','LongInt'( 423); 'IDS_CAP_VIDEO_OPEN_ERROR','LongInt'( 424); 'IDS_CAP_VIDEO_ALLOC_ERROR','LongInt'( 425); 'IDS_CAP_VIDEO_PREPARE_ERROR','LongInt'( 426); 'IDS_CAP_VIDEO_ADD_ERROR','LongInt'( 427); 'IDS_CAP_VIDEO_SIZE_ERROR','LongInt'( 428); 'IDS_CAP_FILE_OPEN_ERROR','LongInt'( 429); 'IDS_CAP_FILE_WRITE_ERROR','LongInt'( 430); 'IDS_CAP_RECORDING_ERROR','LongInt'( 431); 'IDS_CAP_RECORDING_ERROR2','LongInt'( 432); 'IDS_CAP_AVI_INIT_ERROR','LongInt'( 433); 'IDS_CAP_NO_FRAME_CAP_ERROR','LongInt'( 434); 'IDS_CAP_NO_PALETTE_WARN','LongInt'( 435); 'IDS_CAP_MCI_CONTROL_ERROR','LongInt'( 436); 'IDS_CAP_MCI_CANT_STEP_ERROR','LongInt'( 437); 'IDS_CAP_NO_AUDIO_CAP_ERROR','LongInt'( 438); 'IDS_CAP_AVI_DRAWDIB_ERROR','LongInt'( 439); 'IDS_CAP_COMPRESSOR_ERROR','LongInt'( 440); 'IDS_CAP_AUDIO_DROP_ERROR','LongInt'( 441); 'IDS_CAP_STAT_LIVE_MODE','LongInt'( 500); 'IDS_CAP_STAT_OVERLAY_MODE','LongInt'( 501); 'IDS_CAP_STAT_CAP_INIT','LongInt'( 502); 'IDS_CAP_STAT_CAP_FINI','LongInt'( 503); 'IDS_CAP_STAT_PALETTE_BUILD','LongInt'( 504); 'IDS_CAP_STAT_OPTPAL_BUILD','LongInt'( 505); 'IDS_CAP_STAT_I_FRAMES','LongInt'( 506); 'IDS_CAP_STAT_L_FRAMES','LongInt'( 507); 'IDS_CAP_STAT_CAP_L_FRAMES','LongInt'( 508); 'IDS_CAP_STAT_CAP_AUDIO','LongInt'( 509); 'IDS_CAP_STAT_VIDEOCURRENT','LongInt'( 510); 'IDS_CAP_STAT_VIDEOAUDIO','LongInt'( 511); 'IDS_CAP_STAT_VIDEOONLY','LongInt'( 512); 'IDS_CAP_STAT_FRAMESDROPPED','LongInt'( 513); 'AVICAP32','String 'AVICAP32.dll end; procedure SIRegister_ALFcnMisc(CL: TPSPascalCompiler); begin Function AlBoolToInt( Value : Boolean) : Int Function ALMediumPos( LTotal, LBorder, LObject : Int) : Int Function AlIsValidEmail( const Value : AnsiString) : boolean Function AlLocalDateTimeToGMTDateTime( const aLocalDateTime : TDateTime) : TdateTime Function ALInc( var x : Int; Count : Int) : Int function ALCopyStr(const aSourceString: AnsiString; aStart, aLength: Int): AnsiString function ALGetStringFromFile(filename: AnsiString; const ShareMode: Word= fmShareDenyWrite):AnsiString; procedure ALSaveStringtoFile(Str: AnsiString; filename: AnsiString); Function ALIsInt(const S: AnsiString): Boolean; function ALIsDecimal(const S: AnsiString): boolean; Function ALStringToWideString(const S: AnsiString; const aCodePage: Word): WideString; function AlWideStringToString(const WS: WideString; const aCodePage: Word): AnsiString; function ALQuotedStr(const S: AnsiString; const Quote: AnsiChar = ''''): AnsiString; function ALDequotedStr(const S: AnsiString; AQuote: AnsiChar): AnsiString; function AlUTF8removeBOM(const S: AnsiString): AnsiString; Function ALRandomStr1(const aLength: Longint; const aCharset: Array of Char): AnsiString; Function ALRandomStr(const aLength: Longint): AnsiString; Function ALRandomStrU1(const aLength: Longint; const aCharset: Array of Char): String; Function ALRandomStrU(const aLength: Longint): String; end; procedure SIRegister_ALJSONDoc(CL: TPSPascalCompiler); begin Procedure ALJSONToTStrings(const AJsonStr:AnsiString;aLst:TALStrings; const aNullStr:AnsiString;const aTrueStr:AnsiString; const aFalseStr: AnsiString) end; procedure SIRegister_ALWindows(CL: TPSPascalCompiler); begin _ALMEMORYSTATUSEX', 'record dwLength : DWORD; dwMemoryLoad : DWO' +RD; ullTotalPhys : Int64; ullAvailPhys : Int64; ullTotalPageFile : Int64; ' +ullAvailPageFile : Int64; ullTotalVirtual : Int64; ullAvailVirtual : Int64' +; ullAvailExtendedVirtual : Int64; end TALMemoryStatusEx', '_ALMEMORYSTATUSEX Function ALGlobalMemoryStatusEx( var lpBuffer : TALMEMORYSTATUSEX) : BOOL Function ALInterlockedExchange64( var Target : LONGlONG; Value : LONGLONG) : LONGLONG 'INVALID_SET_FILE_POINTER','LongInt'( DWORD ( - 1 )); 'QUOTA_LIMITS_HARDWS_MIN_DISABLE','LongWord').SetUInt( $2); 'QUOTA_LIMITS_HARDWS_MIN_ENABLE','LongWord').SetUInt( $1); 'QUOTA_LIMITS_HARDWS_MAX_DISABLE','LongWord').SetUInt( $8); 'QUOTA_LIMITS_HARDWS_MAX_ENABLE','LongWord').SetUInt( $4); end; procedure SIRegister_IPCThrd(CL: TPSPascalCompiler); begin SIRegister_THandledObject(CL); SIRegister_TEvent(CL); SIRegister_TMutex(CL); SIRegister_TSharedMem(CL); 'TRACE_BUF_SIZE','LongInt'( 200 * 1024); 'TRACE_BUFFER','String 'TRACE_BUFFER 'TRACE_MUTEX','String 'TRACE_MUTEX //PTraceEntry', '^TTraceEntry // will not work SIRegister_TIPCTracer(CL); 'MAX_CLIENTS','LongInt'( 6); 'IPCTIMEOUT','LongInt'( 2000); 'IPCBUFFER_NAME','String 'BUFFER_NAME 'BUFFER_MUTEX_NAME','String 'BUFFER_MUTEX 'MONITOR_EVENT_NAME','String 'MONITOR_EVENT 'CLIENT_EVENT_NAME','String 'CLIENT_EVENT 'CONNECT_EVENT_NAME','String 'CONNECT_EVENT 'CLIENT_DIR_NAME','String 'CLIENT_DIRECTORY 'CLIENT_DIR_MUTEX','String 'DIRECTORY_MUTEX FindClass('TOBJECT'),'EMonitorActive FindClass('TOBJECT'),'TIPCThread TEventKind', '( evMonitorAttach, evMonitorDetach, evMonitorSigna' +'l, evMonitorExit, evClientStart, evClientStop, evClientAttach, evClientDet' +'ach, evClientSwitch, evClientSignal, evClientExit ) TClientFlag', '( cfError, cfMouseMove, cfMouseDown, cfResize, cfAttach ) TClientFlags', 'set of TClientFlag //PEventData', '^TEventData // will not work TEventData', 'record X : SmallInt; Y : SmallInt; Flag : TClientFlag; Flags : TClientFlags; end TConnectEvent', 'Procedure ( Sender : TIPCThread; Connecting : Boolean) TDirUpdateEvent', 'Procedure ( Sender : TIPCThread) TIPCNotifyEvent', 'Procedure ( Sender : TIPCThread; Data : TEventData) //PIPCEventInfo', '^TIPCEventInfo // will not work TIPCEventInfo','record FID:Int;FKind:TEventKind;FData:TEventData;end SIRegister_TIPCEvent(CL); //PClientDirRecords', '^TClientDirRecords // will not work SIRegister_TClientDirectory(CL); TIPCState', '( stInActive, stDisconnected, stConnected ) SIRegister_TIPCThread(CL); SIRegister_TIPCMonitor(CL); SIRegister_TIPCClient(CL); Function IsMonitorRunning( var Hndl : THandle) : Boolean end; (*----------------------------------------------------------------------------*) procedure SIRegister_ALGSMComm(CL: TPSPascalCompiler); begin SIRegister_TAlGSMComm(CL); Function AlGSMComm_BuildPDUMessage( aSMSCenter, aSMSAddress, aMessage : AnsiString) : AnsiString Procedure AlGSMComm_DecodePDUMessage(aPDUMessage:AnsiStr;var aSMSCenter,aSMSAddress,AMessage:AnsiString); Function AlGSMComm_UnicodeToGSM7BitDefaultAlphabet( aMessage : WideString) : AnsiString Function AlGSMComm_GSM7BitDefaultAlphabetToUnicode(aMess:AnsiString;const UseGreekAlphabet:Bool):Widestring; function ALMatchesMask(const Filename, Mask: AnsiString): Boolean; end; procedure SIRegister_ALHttpCommon(CL: TPSPascalCompiler); begin TALHTTPPropertyChangeEvent','Procedure(sender:Tobject;const PropertyIndex:Int; TALHTTPProtocolVersion', '( HTTPpv_1_0, HTTPpv_1_1 ) TALHTTPMethod','(HTTPmt_Get,HTTPmt_Post,HTTPmt_Head,HTTPmt_Trace,HTTPmt_Put,HTTPmt_Delete); TInternetScheme', 'Int TALIPv6Binary', 'array[1..16] of Char; // TALIPv6Binary = array[1..16] of ansiChar; // TInternetScheme = Int; SIRegister_TALHTTPRequestHeader(CL); SIRegister_TALHTTPCookie(CL); SIRegister_TALHTTPCookieCollection(CL); SIRegister_TALHTTPResponseHeader(CL); Function ALHTTPDecode( const AStr : AnsiString) : AnsiString Procedure ALHTTPEncodeParamNameValues( ParamValues : TALStrings) //Procedure ALExtractHTTPFields(Separators,WhiteSpace,Quotes:TSysCharSet;Content:PAnsiChar;Strings:TALStrings;StripQuotes:Bool; //Procedure ALExtractHeaderFields(Separators,WhiteSpace,Quotes:TSysCharSet;Content:PAnsiChar; Strings:TALStrings;Decode:Bool;StripQuotes:Bool) //Procedure ALExtractHeaderFieldsWithQuoteEscaped(Separators,WhiteSpace,Quotes:TSysCharSet;Content:PAnsiChar;Strings:TALStrings;Decode:Bool;StripQuotes:Bool) Function AlRemoveShemeFromUrl( aUrl : AnsiString) : ansiString Function AlExtractShemeFromUrl( aUrl : AnsiString) : TInternetScheme Function AlExtractHostNameFromUrl( aUrl : AnsiString) : AnsiString Function AlExtractDomainNameFromUrl( aUrl : AnsiString) : AnsiString Function AlExtractUrlPathFromUrl( aUrl : AnsiString) : AnsiString Function AlInternetCrackUrl(aUrl:AnsiString;var SchemeName,HostName,UserName,Password,UrlPath,ExtraInfo: AnsiString; var PortNumber:Int):Bool; Function AlInternetCrackUrl1(aUrl:AnsiString;var SchemeNam,HostName,UserName,Password,UrlPath,Anchor:AnsiString;Query:TALStrings;var PortNumber:Int):Bool Function AlInternetCrackUrl2(var Url:AnsiString;var Anchor:AnsiString;Query:TALStrings):Bool; Function AlRemoveAnchorFromUrl( aUrl : AnsiString; var aAnchor : AnsiString) : AnsiString; Function AlRemoveAnchorFromUrl1( aUrl : AnsiString) : AnsiString; Function AlCombineUrl( RelativeUrl, BaseUrl : AnsiString) : AnsiString; Function AlCombineUrl1(RelativeUrl,BaseUrl,Anchor:AnsiString; Query:TALStrings): AnsiString; Function ALGmtDateTimeToRfc822Str( const aValue : TDateTime) : AnsiString Function ALDateTimeToRfc822Str( const aValue : TDateTime) : AnsiString Function ALTryRfc822StrToGMTDateTime( const S : AnsiString; out Value : TDateTime) : Boolean Function ALRfc822StrToGMTDateTime( const s : AnsiString) : TDateTime Function ALTryIPV4StrToNumeric( aIPv4Str : ansiString; var aIPv4Num : Cardinal) : Boolean Function ALIPV4StrToNumeric( aIPv4 : ansiString) : Cardinal Function ALNumericToIPv4Str( aIPv4 : Cardinal) : ansiString Function ALZeroIpV6 : TALIPv6Binary Function ALTryIPV6StrToBinary( aIPv6Str : ansiString; var aIPv6Bin : TALIPv6Binary) : Boolean Function ALIPV6StrTobinary( aIPv6 : ansiString) : TALIPv6Binary Function ALBinaryToIPv6Str( aIPv6 : TALIPv6Binary) : ansiString Function ALBinaryStrToIPv6Binary( aIPV6BinaryStr : ansiString) : TALIPv6Binary end; procedure SIRegister_ALFcnHTML(CL: TPSPascalCompiler); //JavaScript begin Procedure ALUTF8ExtractHTMLText(HtmlCont:AnsiStr;LstExtractedResourceText:TALStrings;const DecodeHTMLText:Bool; Function ALUTF8ExtractHTMLText1(HtmlContent:AnsiString;const DecodeHTMLText:Bool):AnsiString; Function ALXMLCDataElementEncode( Src : AnsiString) : AnsiString Function ALXMLTextElementEncode(Src:AnsiString;const useNumericReference:bool):AnsiString Function ALUTF8XMLTextElementDecode( const Src : AnsiString) : AnsiString Function ALUTF8HTMLEncode(const Src:AnsiStr;const EncodeASCIIHtmlEntities:Bool;const useNumRef:bool):AnsiString); Function ALUTF8HTMLDecode( const Src : AnsiString) : AnsiString Function ALJavascriptEncode(const Src:AnsiString;const useNumericReference:bool):AnsiString Function ALUTF8JavascriptDecode( const Src : AnsiString) : AnsiString Procedure ALHideHtmlUnwantedTagForHTMLHandleTagfunct(var HtmlContent:AnsiString;const DeleteBodyOfUnwantedTag:Bool;const ReplaceUnwantedTagCharBy:AnsiChar) Procedure ALCompactHtmlTagParams( TagParams : TALStrings) Procedure ALUTF8JavascriptDecodeV( var Str : AnsiString)'); //'Function ALUTF8JavascriptDecode( const Src : AnsiString) : AnsiString'); {This function evaluates the Javascript code given in the parameter "aCode" and returns result. The function works similar to browser's console, so you can send even the code like this "2+2" => returns "4".} Example: writeln('runJScript: '+runJS('Math.pow(2, 64)')) Function ALRunJavascript( const aCode : AnsiString) : AnsiString'); Function RunJavascript( const aCode : AnsiString) : AnsiString'); Function RunJavascript2( const aCode : AnsiString) : AnsiString'); //no CoInitialize of COM-Server Function RunJS( const aCode : AnsiString) : AnsiString'); //no CoInitialize of COM-Server //CL.AddDelphiFunction('Procedure ALHideHtmlUnwantedTagForHTMLHandleTagfunct( var HtmlContent : AnsiString; const DeleteBodyOfUnwantedTag : Boolean; const ReplaceUnwantedTagCharBy : AnsiChar)'); //CL.AddDelphiFunction('Procedure ALCompactHtmlTagParams( TagParams : TALStrings)'); Function ALJavascriptEncodeU( const Src : String; const useNumericReference : boolean) : String'); Procedure ALJavascriptDecodeVU( var Str : String)'); Function ALJavascriptDecodeU( const Src : String): String'); end; procedure SIRegister_ALInternetMessageCommon(CL: TPSPascalCompiler); begin SIRegister_TALEMailHeader(CL); SIRegister_TALNewsArticleHeader(CL); Function AlParseEmailAddress(FriendlyEmail:AnsiString;var RealName:AString;const decodeRealName:Bool):AnsiString; Function AlExtractEmailAddress( FriendlyEmail : AnsiString) : AnsiString Function ALMakeFriendlyEmailAddress( aRealName, aEmail : AnsiString) : AnsiString Function ALEncodeRealName4FriendlyEmailAddress( aRealName : AnsiString) : AnsiString Function AlGenerateInternetMessageID : AnsiString; Function AlGenerateInternetMessageID1( ahostname : AnsiString) : AnsiString; Function ALDecodeQuotedPrintableString( src : AnsiString) : AnsiString Function AlDecodeInternetMessageHeaderInUTF8(aHeaderStr:AnsiString;aDefaultCodePage:Int):AnsiString; end; (*----------------------------------------------------------------------------*) procedure SIRegister_ALFcnWinSock(CL: TPSPascalCompiler); begin Function ALHostToIP( HostName : AnsiString; var Ip : AnsiString):Boolean Function ALIPAddrToName( IPAddr : AnsiString) : AnsiString Function ALgetLocalIPs : TALStrings Function ALgetLocalHostName : AnsiString end; procedure SIRegister_ALFcnCGI(CL: TPSPascalCompiler); begin Procedure AlCGIInitDefaultServerVariablesFromWebRequest(WebRequest : TALWebRequest;ServerVariables:TALStrings); Procedure AlCGIInitDefaultServerVariablesFromWebRequest1(WebRequest: TALWebRequest; ServerVariables : TALStrings; ScriptName, ScriptFileName : AnsiString; Url : AnsiString); Procedure ALCGIInitDefaultServerVariables( ServerVariables : TALStrings); Procedure AlCGIInitDefaultServerVariables1(ServerVars:TALStrings;ScriptName,ScriptFileName:AnsiString;Url:AnsiStr; Procedure AlCGIInitServerVariablesFromWebRequest(WebRequest:TALWebRequest;ServerVariables:TALStrings;ScriptName,ScriptFileName:AnsiString;Url: AnsiString); Procedure AlCGIExec( InterpreterFilename: AnsiString; ServerVariables: TALStrings; RequestContentStream: Tstream; ResponseContentStream: Tstream; ResponseHeader: TALHTTPResponseHeader); Procedure AlCGIExec1(ScriptName,ScriptFileName, Url, X_REWRITE_URL, InterpreterFilename:AnsiString; WebRequest : TALIsapiRequest; overloadedCookies:AnsiString;overloadedQueryString:AnsiString;overloadedReferer: AnsiString;' +'overloadedRequestContentStream:Tstream;var ResponseContentStr:AnsiString;ResponseHeader:TALHTTPResponseHeader; Procedure AlCGIExec2(ScriptName,ScriptFileName,Url,X_REWRITE_URL,InterpreterFilename:AnsiString;WebRequest: TALIsapiRequest; var ResponseContentString : AnsiString; ResponseHeader : TALHTTPResponseHeader); end; procedure SIRegister_ALFcnExecute(CL: TPSPascalCompiler); begin TStartupInfoA', 'TStartupInfo 'SE_CREATE_TOKEN_NAME','String'( 'SeCreateTokenPrivilege SE_ASSIGNPRIMARYTOKEN_NAME','String 'SeAssignPrimaryTokenPrivilege SE_LOCK_MEMORY_NAME','String)( 'SeLockMemoryPrivilege SE_INCREASE_QUOTA_NAME','String 'SeIncreaseQuotaPrivilege SE_UNSOLICITED_INPUT_NAME','String 'SeUnsolicitedInputPrivilege SE_MACHINE_ACCOUNT_NAME','String 'SeMachineAccountPrivilege SE_TCB_NAME','String 'SeTcbPrivilege SE_SECURITY_NAME','String 'SeSecurityPrivilege SE_TAKE_OWNERSHIP_NAME','String 'SeTakeOwnershipPrivilege SE_LOAD_DRIVER_NAME','String 'SeLoadDriverPrivilege SE_SYSTEM_PROFILE_NAME','String 'SeSystemProfilePrivilege SE_SYSTEMTIME_NAME','String 'SeSystemtimePrivilege SE_PROF_SINGLE_PROCESS_NAME','String 'SeProfileSingleProcessPrivilege SE_INC_BASE_PRIORITY_NAME','String 'SeIncreaseBasePriorityPrivilege SE_CREATE_PAGEFILE_NAME','String 'SeCreatePagefilePrivilege SE_CREATE_PERMANENT_NAME','String 'SeCreatePermanentPrivilege SE_BACKUP_NAME','String 'SeBackupPrivilege SE_RESTORE_NAME','String 'SeRestorePrivilege SE_SHUTDOWN_NAME','String 'SeShutdownPrivilege SE_DEBUG_NAME','String 'SeDebugPrivilege SE_AUDIT_NAME','String 'SeAuditPrivilege SE_SYSTEM_ENVIRONMENT_NAME','String 'SeSystemEnvironmentPrivilege SE_CHANGE_NOTIFY_NAME','String 'SeChangeNotifyPrivilege SE_REMOTE_SHUTDOWN_NAME','String 'SeRemoteShutdownPrivilege SE_UNDOCK_NAME','String 'SeUndockPrivilege SE_SYNC_AGENT_NAME','String 'SeSyncAgentPrivilege SE_ENABLE_DELEGATION_NAME','String 'SeEnableDelegationPrivilege SE_MANAGE_VOLUME_NAME','String 'SeManageVolumePrivilege Function AlGetEnvironmentString : AnsiString Function ALWinExec32(const FileName,CurrentDir,Environment:AnsiString;InStream:Tstream;OutStream:TStream):Dword; Function ALWinExec321(const FileName:AnsiString; InputStream:Tstream;OutputStream:TStream):Dword; Function ALWinExecAndWait32( FileName : AnsiString; Visibility : Int) : DWORD Function ALWinExecAndWait32V2( FileName : AnsiString; Visibility : Int) : DWORD Function ALNTSetPrivilege( sPrivilege : AnsiString; bEnabled : Boolean) : Boolean end; procedure SIRegister_ALFcnFile(CL: TPSPascalCompiler); begin Function AlEmptyDirectory(Directory:ansiString;SubDirectory:Bool;IgnoreFiles:array of AnsiString; const RemoveEmptySubDirectory : Boolean; const FileNameMask : ansiString; const MinFileAge : TdateTime):Boolean; Function AlEmptyDirectory1( Directory : ansiString; SubDirectory : Boolean; const RemoveEmptySubDirectory:Bool; const FileNameMask : ansiString; const MinFileAge : TdateTime) : Boolean; Function AlCopyDirectory(SrcDirectory,DestDirectory:ansiString;SubDirectory:Boolean; const FileNameMask: ansiString; const FailIfExists:Boolean): Boolean Function ALGetModuleName : ansistring Function ALGetModuleFileNameWithoutExtension : ansistring Function ALGetModulePath : ansiString Function AlGetFileSize( const AFileName : ansistring) : int64 Function AlGetFileVersion( const AFileName : ansistring) : ansiString Function ALGetFileCreationDateTime( const aFileName : Ansistring) : TDateTime Function ALGetFileLastWriteDateTime( const aFileName : Ansistring) : TDateTime Function ALGetFileLastAccessDateTime( const aFileName : Ansistring) : TDateTime Procedure ALSetFileCreationDateTime( const aFileName : Ansistring; const aCreationDateTime : TDateTime) Function ALIsDirectoryEmpty( const directory : ansiString) : boolean Function ALFileExists( const Path : ansiString) : boolean Function ALDirectoryExists( const Directory : Ansistring) : Boolean Function ALCreateDir( const Dir : Ansistring) : Boolean Function ALRemoveDir( const Dir : Ansistring) : Boolean Function ALDeleteFile( const FileName : Ansistring) : Boolean Function ALRenameFile( const OldName, NewName : ansistring) : Boolean end; procedure SIRegister_ALFcnMime(CL: TPSPascalCompiler); begin NativeInt', 'Int NativeUInt', 'Cardinal Function ALMimeBase64EncodeString( const S : AnsiString) : AnsiString Function ALMimeBase64EncodeStringNoCRLF( const S : AnsiString) : AnsiString Function ALMimeBase64DecodeString( const S : AnsiString) : AnsiString Function ALMimeBase64EncodedSize( const InputSize : NativeInt) : NativeInt Function ALMimeBase64EncodedSizeNoCRLF( const InputSize : NativeInt) : NativeInt Function ALMimeBase64DecodedSize( const InputSize : NativeInt) : NativeInt Procedure ALMimeBase64Encode( const InputBuffer : TByteDynArray; InputOffset : NativeInt; const InputByteCount : NativeInt; out OutputBuffer : TByteDynArray; OutputOffset : NativeInt) Procedure ALMimeBase64EncodeNoCRLF( const InputBuffer : TByteDynArray; InputOffset : NativeInt; const InputByteCount : NativeInt; out OutputBuffer : TByteDynArray; OutputOffset : NativeInt) Procedure ALMimeBase64EncodeFullLines( const InputBuffer : TByteDynArray; InputOffset : NativeInt;const InputByteCount:NativeInt;out OutputBuffer:TByteDynArray;OutputOffset:NativeInt) Function ALMimeBase64Decode(const InputBuffer:TByteDynArray;InputOffset:NativeInt;const InputByteCount:NativeInt;out OutputBuffer:TByteDynArray;OutputOffset:NativeInt): NativeInt; Function ALMimeBase64DecodePartial( const InputBuffer : TByteDynArray; InputOffset : NativeInt; const InputByteCount: NativeInt; out OutputBuffer: TByteDynArray; OutputOffset : NativeInt;' + var ByteBuffer : Cardinal; var ByteBufferSpace : Cardinal) : NativeInt; Function ALMimeBase64DecodePartialEnd(out OutputBuffer:TByteDynArray;OutputOffset:NativeInt;const ByteBuffer:Cardinal;const ByteBufferSpace:Cardinal):NativeInt; Procedure ALMimeBase64Encode(const InputBuf:TByteDynArray;const InputByteCnt:NatInt;out OutputBuf:TByteDynArray); Procedure ALMimeBase64EncodeNoCRLF(const InputBuffer:TByteDynArray;const InputByteCount:NativeInt;out OutputBuffer:TByteDynArray); Procedure ALMimeBase64EncodeFullLines(const InputBuffer:TByteDynArray;const InputByteCount:NativeInt;out OutputBuffer:TByteDynArray); Function ALMimeBase64Decode1(const InputBuffer:TByteDynArray;const InputByteCount:NativeInt;out OutputBuffer:TByteDynArray):NativeInt; Function ALMimeBase64DecodePartial1(const InputBuffer:TByteDynArray;const InputByteCount:NativeInt;out OutputBuffer: TByteDynArray; var ByteBuffer : Cardinal; var ByteBufferSpace : Cardinal) : NativeInt; Function ALMimeBase64DecodePartialEnd1(out OutputBuffer:TByteDynArray;const ByteBuffer:Cardinal;const ByteBufferSpace:Cardinal):NativeInt; Procedure ALMimeBase64EncodeFile( const InputFileName, OutputFileName : TFileName) Procedure ALMimeBase64EncodeFileNoCRLF( const InputFileName, OutputFileName : TFileName) Procedure ALMimeBase64DecodeFile( const InputFileName, OutputFileName : TFileName) Procedure ALMimeBase64EncodeStream( const InputStream : TStream; const OutputStream : TStream) Procedure ALMimeBase64EncodeStreamNoCRLF(const InputStream:TStream;const OutputStream:TStream) Procedure ALMimeBase64DecodeStream( const InputStream : TStream; const OutputStream : TStream) 'cALMimeBase64_ENCODED_LINE_BREAK','LongInt'( 76); 'cALMimeBase64_DECODED_LINE_BREAK','LongInt'(cALMimeBase64_ENCODED_LINE_BREAK div 4 * 3); 'cALMimeBase64_BUFFER_SIZE','LongInt'( cALMimeBase64_DECODED_LINE_BREAK * 3 * 4 * 4); Procedure ALFillMimeContentTypeByExtList( AMIMEList : TALStrings) Procedure ALFillExtByMimeContentTypeList( AMIMEList : TALStrings) Function ALGetDefaultFileExtFromMimeContentType( aContentType : AnsiString) : AnsiString Function ALGetDefaultMIMEContentTypeFromExt( aExt : AnsiString) : AnsiString end; procedure SIRegister_ALXmlDoc(CL: TPSPascalCompiler); begin 'cALXMLNodeMaxListSize','LongInt'( Maxint div 16); FindClass('TOBJECT'),TALXMLNode FindClass('TOBJECT'),TALXMLNodeList FindClass('TOBJECT'),TALXMLDocument TAlXMLParseProcessingInstructionEvent','Procedure (Sender:TObject; const Target,Data:AnsiString) TAlXMLParseTextEvent', 'Procedure ( Sender : TObject; const str: AnsiString) TAlXMLParseStartElementEvent','Procedure(Sender:TObject;const Name:AnsiString;const Attributes:TALStrings) TAlXMLParseEndElementEvent', 'Procedure ( Sender : TObject; const Name : AnsiString) TALXmlNodeType', '( ntReserved, ntElement, ntAttribute, ntText, ' +ntCData,ntEntityRef,ntEntity,ntProcessingInstr,ntComment,ntDocumentntDocType,ntDocFragment,ntNotation) TALXMLDocOption', '( doNodeAutoCreate, doNodeAutoIndent ) TALXMLDocOptions', 'set of TALXMLDocOption TALXMLParseOption', '( poPreserveWhiteSpace, poIgnoreXMLReferences ) TALXMLParseOptions', 'set of TALXMLParseOption TALXMLPrologItem', '( xpVersion, xpEncoding, xpStandalone ) PALPointerXMLNodeList', '^TALPointerXMLNodeList // will not work SIRegister_EALXMLDocError(CL); SIRegister_TALXMLNodeList(CL); SIRegister_TALXMLNode(CL); SIRegister_TALXmlElementNode(CL); SIRegister_TALXmlAttributeNode(CL); SIRegister_TALXmlTextNode(CL); SIRegister_TALXmlDocumentNode(CL); SIRegister_TALXmlCommentNode(CL); SIRegister_TALXmlProcessingInstrNode(CL); SIRegister_TALXmlCDataNode(CL); SIRegister_TALXmlEntityRefNode(CL); SIRegister_TALXmlEntityNode(CL); SIRegister_TALXmlDocTypeNode(CL); SIRegister_TALXmlDocFragmentNode(CL); SIRegister_TALXmlNotationNode(CL); SIRegister_TALXMLDocument(CL); cAlXMLUTF8EncodingStr','String 'UTF-8 cALXmlUTF8HeaderStr','String''+#13#10); CALNSDelim','String ': CALXML','String 'xml CALVersion','String 'version CALEncoding','String 'encoding CALStandalone','String 'standalone CALDefaultNodeIndent','String ' CALXmlDocument','String 'DOCUMENT Function ALCreateEmptyXMLDocument(const Rootname: AnsiString): TalXMLDocument Procedure ALClearXMLDocument(const rootname:AnsiString;xmldoc:TalXMLDocument;const EncodingStr:AnsiString); Function ALFindXmlNodeByChildNodeValue(xmlrec:TalxmlNode;const ChildNodeName,ChildNodeValue:AnsiString;const Recurse: Boolean):TalxmlNode Function ALFindXmlNodeByNameAndChildNodeValue( xmlrec : TalxmlNode; const NodeName : ansiString; const ChildNodeName, ChildNodeValue : AnsiString; const Recurse : Boolean) : TalxmlNode Function ALFindXmlNodeByAttribute(xmlrec:TalxmlNode;const AttributeName,AttributeValue:AnsiString;const Recurse:Bool):TalxmlNode Function ALFindXmlNodeByNameAndAttribute(xmlrec:TalxmlNode;const NodeName:ansiString;const AttributeName,AttributeValue:AnsiString;const Recurse:Bool):TalxmlNode Function ALExtractAttrValue(const AttrName,AttrLine:AnsiString;const Default:AnsiString): AnsiString end; (*----------------------------------------------------------------------------*) procedure SIRegister_TAlWebSpider(CL: TPSPascalCompiler); begin //with RegClassS(CL,'TObject', 'TAlWebSpider') do with CL.AddClassN(CL.FindClass('TObject'),'TAlWebSpider') do begin RegisterMethod('Procedure Crawl'); RegisterMethod('Procedure UpdateLinkToLocalPath'); OnCrawlBeforeDownload', 'TAlWebSpiderCrawlBeforeDownloadEvent', iptrw); OnCrawlAfterDownload', 'TAlWebSpiderCrawlAfterDownloadEvent', iptrw); OnCrawlDownloadSuccess', 'TAlWebSpiderCrawlDownloadSuccessEvent', iptrw); OnCrawlDownloadRedirect', 'TAlWebSpiderCrawlDownloadRedirectEvent', iptrw); OnCrawlDownloadError', 'TAlWebSpiderCrawlDownloadErrorEvent', iptrw); OnCrawlGetNextLink', 'TAlWebSpiderCrawlGetNextLinkEvent', iptrw); OnCrawlFindLink', 'TAlWebSpiderCrawlFindLinkEvent', iptrw); OnCrawlEnd', 'TAlWebSpiderCrawlEndEvent', iptrw); OnUpdateLinkToLocalPathGetNextFile','TAlWebSpiderUpdateLinkToLocalPathGetNextFileEvent',iptrw); OnUpdateLinkToLocalPathFindLink', 'TAlWebSpiderUpdateLinkToLocalPathFindLinkEvent', iptrw); OnUpdateLinkToLocalPathEnd', 'TAlWebSpiderUpdateLinkToLocalPathEndEvent', iptrw); RegisterProperty('HttpClient', 'TalHttpClient', iptrw); end; end; https://sourceforge.net/p/alcinoe/code/HEAD/tree/source/ALWebSpider.pas#l184 {----------------------------------} TAlTrivialWebSpider = Class(Tobject) Private FWebSpider: TalWebSpider; fStartUrl: AnsiString; fLstUrlCrawled: TALStrings; fLstErrorEncountered: TALStrings; FPageDownloadedBinTree: TAlStringKeyAVLBinaryTree; FPageNotYetDownloadedBinTree: TAlStringKeyAVLBinaryTree; FCurrentDeepLevel: Integer; FCurrentLocalFileNameIndex: Integer; fMaxDeepLevel: Integer; fOnCrawlBeforeDownload: TAlWebSpiderCrawlBeforeDownloadEvent; fUpdateLinkToLocalPath: boolean; fExcludeMask: AnsiString; fStayInStartDomain: Boolean; fSaveDirectory: AnsiString; fSplitDirectoryAmount: integer; FHttpClient: TalHttpClient; fIncludeMask: AnsiString; fOnCrawlAfterDownload: TAlWebSpiderCrawlAfterDownloadEvent; fOnCrawlFindLink: TAlTrivialWebSpiderCrawlFindLinkEvent; fDownloadImage: Boolean; fOnUpdateLinkToLocalPathProgress: TAlTrivialWebSpiderUpdateLinkToLocalPathProgressEvent; fOnCrawlProgress: TAlTrivialWebSpiderCrawlProgressEvent; procedure WebSpiderCrawlDownloadError(Sender: TObject; const URL, ErrorMessage: AnsiString; HTTPResponseHeader: TALHTTPResponseHeader; var StopCrawling: Boolean); procedure WebSpiderCrawlDownloadRedirect(Sender: TObject; const Url, RedirectedTo: AnsiString; HTTPResponseHeader: TALHTTPResponseHeader; var StopCrawling: Boolean); procedure WebSpiderCrawlDownloadSuccess(Sender: TObject; const Url: AnsiString; HTTPResponseHeader: TALHTTPResponseHeader; HttpResponseContent: TStream; var StopCrawling: Boolean); procedure WebSpiderCrawlFindLink(Sender: TObject; const HtmlTagString: AnsiString; HtmlTagParams: TALStrings; const URL: AnsiString); procedure WebSpiderCrawlGetNextLink(Sender: TObject; var Url: AnsiString); procedure WebSpiderUpdateLinkToLocalPathFindLink(Sender: TObject; const HtmlTagString: AnsiString; HtmlTagParams: TALStrings; const URL: AnsiString; var LocalPath: AnsiString); procedure WebSpiderUpdateLinkToLocalPathGetNextFile(Sender: TObject; var FileName, BaseHref: AnsiString); function GetNextLocalFileName(const aContentType: AnsiString): AnsiString; Protected Public Constructor Create; Destructor Destroy; override; Procedure Crawl(const aUrl: AnsiString); overload; {Launch the Crawling of the page} procedure Crawl(const aUrl: AnsiString; LstUrlCrawled: TALStrings; LstErrorEncountered: TALStrings); overload; Property HttpClient: TalHttpClient Read FHttpClient write FHttpClient; Property DownloadImage: Boolean read fDownloadImage write fDownloadImage default false; Property StayInStartDomain: Boolean read fStayInStartDomain write fStayInStartDomain default true; Property UpdateLinkToLocalPath: boolean read fUpdateLinkToLocalPath write fUpdateLinkToLocalPath default True; Property MaxDeepLevel: Integer read fMaxDeepLevel write fMaxDeepLevel default -1; Property ExcludeMask: AnsiString read fExcludeMask write fExcludeMask; Property IncludeMask: AnsiString read fIncludeMask write fIncludeMask; Property SaveDirectory: AnsiString read fSaveDirectory write fSaveDirectory; Property SplitDirectoryAmount: integer read fSplitDirectoryAmount write fSplitDirectoryAmount default 5000; Property OnCrawlBeforeDownload: TAlWebSpiderCrawlBeforeDownloadEvent read fOnCrawlBeforeDownload write fOnCrawlBeforeDownload; {When a page is successfully downloaded} Property OnCrawlAfterDownload: TAlWebSpiderCrawlAfterDownloadEvent read fOnCrawlAfterDownload write fOnCrawlAfterDownload; {When a page is successfully downloaded} Property OnCrawlFindLink: TAlTrivialWebSpiderCrawlFindLinkEvent read fOnCrawlFindLink write fOnCrawlFindLink; {When a a link is found} Property OnCrawlProgress: TAlTrivialWebSpiderCrawlProgressEvent read fOnCrawlProgress write fOnCrawlProgress; Property OnUpdateLinkToLocalPathProgress: TAlTrivialWebSpiderUpdateLinkToLocalPathProgressEvent read fOnUpdateLinkToLocalPathProgress write fOnUpdateLinkToLocalPathProgress; end; procedure SIRegister_ALOpenOffice(CL: TPSPascalCompiler); begin CL.AddClassN(CL.FindClass('TOBJECT'),'EALOpenOfficeException'); Procedure ConnectOpenOffice'); Procedure DisconnectOpenOffice( aTerminateOpenOffice : boolean)'); Function IsOpenOfficeConnected : boolean'); Function CreateUnoService( const aServiceName : AnsiString) : Variant'); Function CreateUnoStruct( const aStructureName : AnsiString; const aMaxIndex : integer) : Variant'); Function HasUnoInterfaces( aObject : Variant; aInterfaceList : array of AnsiString) : boolean'); Function CreateOOProperties( aPropertyList : array of Variant) : Variant'); Function MakeOOPropertyValue( aPropertyName : AnsiString; aPropertyValue : Variant) : Variant'); Function CreateOOCalcDocument : Variant'); Function CreateOOWordDocument: Variant; Function CreateOOImpressDocument : Variant'); Function CreateOODrawDocument : Variant'); Procedure SaveOODocument( aDocument : Variant; aFileName : AnsiString; aFileType : AnsiString)'); Procedure CreateOOSheet( aDocument : Variant; const aSheetName : AnsiString)'); Procedure SetColumnWidth( aSheet : Variant; const aColumnIndex : integer; const aWidthInCentimetres : integer);'); Procedure SetColumnWidth1( aSheet : Variant; aColumn : Variant; const aWidthInCentimetres : integer);'); Procedure SetCellBold( aCell : Variant)'); Procedure SetCellBorder( aCellRange : Variant; const aBorderColor : Longword)'); Function IsVariantNullOrEmpty( aVariant : Variant) : boolean'); Function VarDummyArray : Variant'); Function ConvertToURL( aWinAddress : AnsiString) : AnsiString'); Function ConvertFromURL( aUrlAddress : AnsiString) : AnsiString'); Function OORGB( aRedByte, aGreenByte, aBlueByte : byte) : Longword'); function ALCopyStr2(const aSourceString: AnsiString; aStart, aLength: Integer): AnsiString;'); end; procedure SIRegister_ALExecute2(CL: TPSPascalCompiler); begin //CL.AddTypeS('TStartupInfoA', 'TStartupInfo'); CL.AddConstantN('SE_CREATE_TOKEN_NAME','String').SetString( 'SeCreateTokenPrivilege'); SE_ASSIGNPRIMARYTOKEN_NAME','String').SetString( 'SeAssignPrimaryTokenPrivilege'); SE_LOCK_MEMORY_NAME','String').SetString( 'SeLockMemoryPrivilege'); SE_INCREASE_QUOTA_NAME','String').SetString( 'SeIncreaseQuotaPrivilege'); SE_UNSOLICITED_INPUT_NAME','String').SetString( 'SeUnsolicitedInputPrivilege'); SE_MACHINE_ACCOUNT_NAME','String').SetString( 'SeMachineAccountPrivilege'); Function AlGetEnvironmentStringX : AnsiString'); Function ALWinExec0X(const aCommandLine : AnsiString; const aCurrentDirectory : AnsiString; const aEnvironment : AnsiString; const aInputStream : Tstream; const aOutputStream : TStream; const aOwnerThread : TThread) : Dword;'); Function ALWinExec1X(const aCommandLine: AnsiString; const aInputStream: Tstream; const aOutputStream: TStream; const aOwnerThread: TThread): Dword;'); Procedure ALWinExec2X( const aCommandLine : AnsiString; const aCurrentDirectory : AnsiString);'); Procedure ALWinExec3X( const aUserName:ANSIString; const aPassword:ANSIString; const aCommandLine:ANSIString;const aCurrentDirectory : AnsiString; const aLogonFlags : dword);'); Function ALWinExecAndWait4X(const aCommandLine: AnsiString;const aCurrentDirectory:AnsiString;const aEnvironment:AnsiString;const aVisibility:integer): DWORD;'); Function ALWinExecAndWait5X( const aCommandLine : AnsiString; const aVisibility : integer) : DWORD;'); Function ALWinExecAndWaitV2X( const aCommandLine : AnsiString; const aVisibility : integer) : DWORD'); Function ALNTSetPrivilegeX( const sPrivilege : AnsiString; bEnabled : Boolean) : Boolean'); Function ALStartServiceX(const aServiceName:AnsiString;const aComputerName:AnsiString;const aTimeOut:integer):bool; Function ALStopServiceX(const aServiceName:AnsiString;const aComputerName:AnsiString;const aTimeOut:integer):bool; Function ALMakeServiceAutorestartingX( const aServiceName : AnsiString; const aComputerName : AnsiString; const aTimeToRestartInSec:integer; const aTimeToResetInSec : integer) : boolean'); end; procedure SIRegister_ALIsapiHTTP(CL: TPSPascalCompiler); begin CL.AddClassN(CL.FindClass('TOBJECT'),'EALIsapiRequestContentSizeTooBig'); CL.AddClassN(CL.FindClass('TOBJECT'),'EALIsapiRequestConnectionDropped'); SIRegister_TALWebRequest(CL); SIRegister_TALISAPIRequest(CL); SIRegister_TALWebResponse(CL); SIRegister_TALISAPIResponse(CL); Function ALIsapiHttpStatusString( StatusCode : Integer) : AnsiString'); CL.AddConstantN('HSE_IO_SYNC','LongWord').SetUInt( $00000001); 'HSE_IO_ASYNC','LongWord').SetUInt( $00000002); 'HSE_IO_DISCONNECT_AFTER_SEND','LongWord').SetUInt( $00000004); 'HSE_IO_SEND_HEADERS','LongWord').SetUInt( $00000008); end; procedure SIRegister_uUsb(CL: TPSPascalCompiler); begin //CL.AddTypeS('PDevBroadcastHdr', '^DEV_BROADCAST_HDR // will not work'); CL.AddTypeS('DEV_BROADCAST_HDR','record dbch_size: DWORD; dbch_devicetype: DWORD; dbch_reserved:DWORD; end'); CL.AddTypeS('TDevBroadcastHdr', 'DEV_BROADCAST_HDR'); //CL.AddTypeS('PDevBroadcastDeviceInterface', '^DEV_BROADCAST_DEVICEINTERFACE//+'/ will not work'); CL.AddTypeS('DEV_BROADCAST_DEVICEINTERFACE', 'record dbcc_size : DWORD; dbcc_' +'devicetype : DWORD; dbcc_reserved : DWORD; dbcc_classguid : TGUID; dbcc_name : Char; end'); CL.AddTypeS('TDevBroadcastDeviceInterface', 'DEV_BROADCAST_DEVICEINTERFACE'); //CL.AddConstantN('GUID_DEVINTERFACE_USB_DEVICE','TGUID').SetString( '{A5DCBF10-6530-11D2-901F-00C04FB951ED}'); 'DBT_DEVICEARRIVAL','LongWord').SetUInt( $8000); 'DBT_DEVICEREMOVECOMPLETE','LongWord').SetUInt( $8004); 'DBT_DEVTYP_DEVICEINTERFACE','LongWord').SetUInt( $00000005); CL.AddTypeS('TUsbNotifyProc', 'Procedure ( Sender : TObject; const DeviceName: String)'); SIRegister_TUsbNotifier(CL); end; procedure SIRegister_uWebcam(CL: TPSPascalCompiler); begin CL.AddConstantN('WM_CAP_START','LongWord').SetUInt( $0400); 'WM_CAP_DRIVER_CONNECT','LongInt').SetInt( $0400 + 10); 'WM_CAP_DRIVER_DISCONNECT','LongInt').SetInt( $0400 + 11); 'WM_CAP_SAVEDIB','LongInt').SetInt( $0400 + 25); 'WM_CAP_GRAB_FRAME','LongInt').SetInt( $0400 + 60); 'WM_CAP_STOP','LongInt').SetInt( $0400 + 68); Function Connectwebcam( WebcamID : integer) : boolean'); Procedure CaptureWebCam( FilePath : String)'); Procedure CloseWebcam( ); Procedure WebcamInit; Function WebcamList: TStringlist; end; procedure WebcamInit; begin LibHandle := LoadLibrary('avicap32.dll'); CapGetDriverDescriptionA := GetProcAddress(LibHandle,'capGetDriverDescriptionA'); CapCreateCaptureWindowA := GetProcAddress(LibHandle,'capCreateCaptureWindowA'); end; Example: webcaminit; writeln(webcamlist.text) if Connectwebcam(0) then CaptureWebCam(Exepath+'foto4.png'); CloseWebcam(); Top5 Functions mX4.7.1.80 procedure LoadResourceFile3HTML(aFile:string; ms:TMemoryStream); function VarArrayToStr(const vArray: variant): string; function VarStrNull(const V:OleVariant):string; //avoid problems with null strings function GetWMIObject(const objectName: String): IDispatch; //create the Wmi instance function GetAntiVirusProductInfo: TStringlist; function EnDeCrypt(const Value : String) : String; //http://www.delphibasics.info/home/delphibasicssnippets/executingpreparedshellcodeindelphi procedure SIRegister_TeCanvas(CL: TPSPascalCompiler); //based on TEEProc, TeCanvas, TEEngine, TChart begin 'TeePiStep','Double').setExtended( Pi / 180.0); 'TeeDefaultPerspective','LongInt'( 100); 'TeeMinAngle','LongInt'( 270); 'teeclMoneyGreen','LongWord').SetUInt( TColor ( $C0DCC0 )); 'teeclSkyBlue','LongWord').SetUInt( TColor ( $F0CAA6 )); 'teeclCream','LongWord( TColor ( $F0FBFF )); 'teeclMedGray','LongWord').SetUInt( TColor ( $A4A0A0 )); 'teeclMoneyGreen','LongWord').SetUInt( TColor ( $C0DCC0 )); 'teeclSkyBlue','LongWord').SetUInt( TColor ( $F0CAA6 )); 'teeclCream','LongWord').SetUInt( TColor ( $F0FBFF )); 'teeclMedGray','LongWord').SetUInt( TColor ( $A4A0A0 )); 'TA_LEFT','LongInt'( 0); 'TA_RIGHT','LongInt'( 2); 'TA_CENTER','LongInt'( 6); 'TA_TOP','LongInt'( 0); 'TA_BOTTOM','LongInt'( 8); 'teePATCOPY','LongInt'( 0); 'NumCirclePoints','LongInt'( 64); 'teeDEFAULT_CHARSET','LongInt'( 1); 'teeANTIALIASED_QUALITY','LongInt'( 4); 'TA_LEFT','LongInt'( 0); 'bs_Solid','LongInt'( 0); 'teepf24Bit','LongInt'( 0); 'teepfDevice','LongInt'( 1); 'CM_MOUSELEAVE','LongInt'( 10000); 'CM_SYSCOLORCHANGE','LongInt'( 10001); 'DC_BRUSH','LongInt'( 18); 'DC_PEN','LongInt'( 19); teeCOLORREF', 'LongWord TLogBrush', 'record lbStyle : Int; lbColor : TColor; lbHatch: Int; end //TNotifyEvent', 'Procedure ( Sender : TObject) SIRegister_TFilterRegion(CL); SIRegister_IFormCreator(CL); SIRegister_TTeeFilter(CL); //TFilterClass', 'class of TTeeFilter SIRegister_TFilterItems(CL); SIRegister_TConvolveFilter(CL); SIRegister_TBlurFilter(CL); SIRegister_TTeePicture(CL); TPenEndStyle', '( esRound, esSquare, esFlat ) SIRegister_TChartPen(CL); SIRegister_TChartHiddenPen(CL); SIRegister_TDottedGrayPen(CL); SIRegister_TDarkGrayPen(CL); SIRegister_TWhitePen(CL); SIRegister_TChartBrush(CL); TTeeView3DScrolled', 'Procedure ( IsHoriz : Boolean) TTeeView3DChangedZoom', 'Procedure ( NewZoom : Int) SIRegister_TView3DOptions(CL); FindClass('TOBJECT'),'TTeeCanvas TTeeTransparency', 'Int SIRegister_TTeeBlend(CL); FindClass('TOBJECT'),'TCanvas3D SIRegister_TTeeShadow(CL); teeTGradientDirection','(gdTopBottom, gdBottomTop, gdLeftRight, gdRightLeft, gdFromCenter, gdFromTopLeft, gdFromBottomLeft, gdRadial,gdDiagonalUp,gdDiagonalDown ) FindClass('TOBJECT'),'TSubGradient SIRegister_TCustomTeeGradient(CL); SIRegister_TSubGradient(CL); SIRegister_TTeeGradient(CL); SIRegister_TTeeFontGradient(CL); SIRegister_TTeeFont(CL); TCanvasBackMode', '( cbmNone, cbmTransparent, cbmOpaque ) TCanvasTextAlign', 'Int TTeeCanvasHandle', 'HDC SIRegister_TTeeCanvas(CL); TPoint3DFloat', 'record X : Double; Y : Double; Z : Double; end SIRegister_TFloatXYZ(CL); TPoint3D', 'record x : Int; y : Int; z : Int; end TRGB', 'record blue: byte; green: byte; red: byte; end {TRGB=packed record Blue : Byte; Green : Byte; Red : Byte; //$IFDEF CLX //Alpha : Byte; // Linux end;} TTeeCanvasCalcPoints', 'Function ( x, z : Int; var P0, P1 : ' +'TPoint3D; var Color0, Color1 : TColor) : Boolean TTeeCanvasSurfaceStyle', '( tcsSolid, tcsWire, tcsDot ) TCanvas3DPlane', '( cpX, cpY, cpZ ) //IInterface', 'IUnknown SIRegister_TCanvas3D(CL); SIRegister_TTeeCanvas3D(CL); TTrianglePoints', 'Array[0..2] of TPoint; TFourPoints', 'Array[0..3] of TPoint; Function ApplyDark( Color : TColor; HowMuch : Byte) : TColor Function ApplyBright( Color : TColor; HowMuch : Byte) : TColor Function Point3D( const x, y, z : Int) : TPoint3D Procedure SwapDouble( var a, b : Double) Procedure SwapInt( var a, b : Int) Procedure RectSize( const R : TRect; var RectWidth, RectHeight : Int) Procedure teeRectCenter( const R : TRect; var X, Y : Int) Function RectFromPolygon( const Points : array of TPoint; NumPoints : Int): TRect Function RectFromTriangle( const Points : TTrianglePoints) : TRect Function RectangleInRectangle( const Small, Big : TRect) : Boolean Procedure ClipCanvas( ACanvas : TCanvas; const Rect : TRect) Procedure UnClipCanvas( ACanvas : TCanvas) Procedure ClipEllipse( ACanvas : TTeeCanvas; const Rect : TRect) Procedure ClipRoundRectangle(ACanvas:TTeeCanvas;const Rect : TRect; RoundSize : Int) Procedure ClipPolygon(ACanvas:TTeeCanvas;const Points:array of TPoint;NumPoints:Int) 'TeeCharForHeight','String 'W 'DarkerColorQuantity','Byte').SetUInt( 128); 'DarkColorQuantity','Byte').SetUInt( 64); TButtonGetColorProc', 'Function : TColor SIRegister_TTeeButton(CL); SIRegister_TButtonColor(CL); SIRegister_TComboFlat(CL); Procedure TeeSetTeePen(FPen:TPen; APen : TChartPen; AColor : TColor; Handle:TTeeCanvasHandle) Function TeePoint( const aX, aY : Int) : TPoint Function TEEPointInRect( const Rect : TRect; const P : TPoint) : Boolean; Function PointInRect1( const Rect : TRect; x, y : Int) : Boolean; Function TeeRect( Left, Top, Right, Bottom : Int) : TRect Function OrientRectangle( const R : TRect) : TRect Procedure TeeSetBitmapSize( Bitmap : TBitmap; Width, Height : Int) Function PolygonBounds( const P : array of TPoint) : TRect Function PolygonInPolygon( const A, B : array of TPoint) : Boolean Function RGBValue( const Color : TColor) : TRGB Function EditColor( AOwner : TComponent; AColor : TColor) : TColor Function EditColorDialog( AOwner : TComponent; var AColor : TColor) : Boolean Function PointAtDistance( AFrom, ATo : TPoint; ADist : Int) : TPoint Function TeeCull( const P : TFourPoints) : Boolean; Function TeeCull1( const P0, P1, P2 : TPoint) : Boolean; TSmoothStretchOption', '( ssBestQuality, ssBestPerformance ) Procedure SmoothStretch( Src, Dst : TBitmap); Procedure SmoothStretch1( Src, Dst : TBitmap; Option : TSmoothStretchOption); Function TeeDistance( const x, y : Double) : Double Function TeeLoadLibrary( const FileName : String) : HInst Procedure TeeFreeLibrary( hLibModule : HMODULE) Procedure TeeBlendBitmaps(const Percent:Double; ABitmap, BBitmap : TBitmap; BOrigin : TPoint) //Procedure TeeCalcLines( var Lines : TRGBArray; Bitmap : TBitmap) Procedure TeeShadowSmooth(Bitmap,Back:TBitmap;Left,Top,Width,Height,horz,vert:Int;Smoothness:Double;FullDraw:Boolean;ACanvas:TCanvas3D;Clip:Bool) SIRegister_ICanvasHyperlinks(CL); SIRegister_ICanvasToolTips(CL); Function Supports( const Instance : IInterface; const IID : TGUID) : Boolean end; procedure SIRegister_ovcmisc(CL: TPSPascalCompiler); begin TOvcHdc', 'Int TOvcHWND', 'Cardinal TOvcHdc', 'HDC TOvcHWND', 'HWND Function LoadBaseBitmap( lpBitmapName : PChar) : HBITMAP Function LoadBaseCursor( lpCursorName : PChar) : HCURSOR Function ovCompStruct( const S1, S2, Size : Cardinal) : Int Function DefaultEpoch : Int Function DrawButtonFrame(Canvas:TCanvas;const Client:TRect;IsDown,IsFlat:Bool;Style:TButtonStyle):TRect; Procedure FixRealPrim( P : PChar; DC : Char) Function GetDisplayString(Canvas: TCanvas; const S: string; MinChars, MaxWidth : Int) : string Function GetLeftButton : Byte Function GetNextDlgItem( Ctrl : TOvcHWnd) : hWnd Procedure GetRGB( Clr : TColor; var IR, IG, IB : Byte) Function GetShiftFlags : Byte Function ovCreateRotatedFont( F : TFont; Angle : Int) : hFont Function GetTopTextMargin(Font:TFont;BorderStyle:TBorderStyle; Height:Int;Ctl3D:Boolean): Int Function ovExtractWord( N : Int; const S : string; WordDelims : TCharSet) : string Function ovIsForegroundTask : Boolean Function ovTrimLeft( const S : string) : string Function ovTrimRight( const S : string) : string Function ovQuotedStr( const S : string) : string Function ovWordCount( const S : string; const WordDelims : TCharSet) : Int Function ovWordPosition(const N:Int;const S: string;const WordDelims : TCharSet) : Int Function PtrDiff( const P1, P2 : PChar) : Word Procedure PtrInc( var P, Delta : Word) Procedure PtrDec( var P, Delta : Word) Procedure FixTextBuffer( InBuf, OutBuf : PChar; OutSize : Int) Procedure TransStretchBlt(DstDC:TOvcHdc;DstX,DstY,DstW,DstH:Int;SrcDC:TOvcHdc;SrcX,SrcY,SrcW,SrcH:Int;MaskDC:TOvcHdc;MaskX,MaskY:Int) Function ovMinI( X, Y : Int) : Int Function ovMaxI( X, Y : Int) : Int Function ovMinL( X, Y : LongInt) : LongInt Function ovMaxL( X, Y : LongInt) : LongInt Function GenerateComponentName( PF : TWinControl; const Root : string) : string Function PartialCompare( const S1, S2 : string) : Boolean Function PathEllipsis( const S : string; MaxWidth : Int) : string Function ovCreateDisabledBitmap( FOriginal : TBitmap; OutlineColor : TColor) : TBitmap Procedure ovCopyParentImage( Control : TControl; Dest : TCanvas) Procedure ovDrawTransparentBitmap(Dest:TCanvas;X,Y,W,H:Int;Rect:TRect;Bitmap:TBitmap; TransparentColor:TColor) Procedure DrawTransparentBitmapPrim(DC:TOvcHdc;Bitmap:HBitmap;xStart,yStart,Width,Height:Int;Rect:TRect;TransparentColor : TColorRef) Function ovWidthOf( const R : TRect) : Int Function ovHeightOf( const R : TRect) : Int Procedure ovDebugOutput( const S : string) Function GetArrowWidth( Width, Height : Int) : Int Procedure StripCharSeq( CharSeq : string; var Str : string) Procedure StripCharFromEnd( aChr : Char; var Str : string) Procedure StripCharFromFront( aChr : Char; var Str : string) Function SystemParametersInfo(uiAction,uiParam: UINT; pvParam : UINT; fWinIni : UINT) : BOOL Function SystemParametersInfoNCM(uiAction,uiParam:UINT;pvParam:TNonClientMetrics;fWinIni:UINT):BOOL; Function SystemParametersInfoA(uiAction,uiParam: UINT; pvParam: UINT; fWinIni : UINT) : BOOL Function CreateEllipticRgn( p1, p2, p3, p4 : Int) : HRGN Function CreateEllipticRgnIndirect( const p1 : TRect) : HRGN Function CreateFontIndirect( const p1 : TLogFont) : HFONT Function CreateMetaFile( p1 : PChar) : HDC Function DescribePixelFormat(DC: HDC;p2:Int;p3:UINT;var p4:TPixelFormatDescriptor): BOOL Function DrawText(hDC:HDC;lpString:PChar;nCount:Int;var lpRect: TRect;uFormat:UINT):Int Function DrawTextS(hDC:HDC;lpString:string;nCount:Int;var lpRect:TRect;uFormat:UINT):Int Function SetMapperFlags( DC : HDC; Flag : DWORD) : DWORD Function SetGraphicsMode( hdc : HDC; iMode : Int) : Int Function SetMapMode( DC : HDC; p2 : Int) : Int Function SetMetaFileBitsEx( Size : UINT; const Data : PChar) : HMETAFILE //Function SetPaletteEntries(Palette:HPALETTE;StartIndex,NumEntries:UINT;var PaletteEntries):UINT Function SetPixel( DC : HDC; X, Y : Int; Color : COLORREF) : COLORREF Function SetPixelV( DC : HDC; X, Y : Int; Color : COLORREF) : BOOL //Function SetPixelFormat(DC:HDC;PixelFormat:Int;FormatDef:PPixelFormatDescriptor) : BOOL Function SetPolyFillMode( DC : HDC; PolyFillMode : Int) : Int Function StretchBlt(DestDC:HDC;X,Y,Width,Height:Int;SrcDC:HDC;XSrc,YSrc,SrcWidth,SrcHeight:Int;Rop:DWORD):BOOL Function SetRectRgn( Rgn : HRgn; X1, Y1, X2, Y2 : Int) : BOOL Function StretchDIBits(DC:HDC;DestX,DestY,DestWidth,DestHeight,SrcX,SrcY,SrcWidth,SrcHeight:Int;Bits:int;var BitsInfo:TBitmapInfo;Usage:UINT;Rop:DWORD):Int Function SetROP2( DC : HDC; p2 : Int) : Int Function SetStretchBltMode( DC : HDC; StretchMode : Int) : Int Function SetSystemPaletteUse( DC : HDC; p2 : UINT) : UINT Function SetTextCharacterExtra( DC : HDC; CharExtra : Int) : Int Function SetTextColor( DC : HDC; Color : COLORREF) : COLORREF Function SetTextAlign( DC : HDC; Flags : UINT) : UINT Function SetTextJustification( DC : HDC; BreakExtra, BreakCount : Int) : Int Function UpdateColors( DC : HDC) : BOOL Function GetViewportExtEx( DC : HDC; var Size : TSize) : BOOL Function GetViewportOrgEx( DC : HDC; var Point : TPoint) : BOOL Function GetWindowExtEx( DC : HDC; var Size : TSize) : BOOL Function GetWindowOrgEx( DC : HDC; var Point : TPoint) : BOOL Function IntersectClipRect( DC : HDC; X1, Y1, X2, Y2 : Int) : Int Function InvertRgn( DC : HDC; p2 : HRGN) : BOOL Function MaskBlt(DestDC:HDC;XDest,YDest,Width,Height:Int;SrcDC:HDC;XScr,YScr:Int; Mask:HBITMAP;xMask,yMask:Int;Rop: DWORD): BOOL Function PlgBlt(DestDC:HDC;const PtsArray,SrcDC:HDC;XSrc,YSrc,Widt,Heigh:Int;Mask:HBITMAP;xMask,yMask:Int):BOOL; Function OffsetClipRgn( DC : HDC; XOffset, YOffset : Int) : Int Function OffsetRgn( RGN : HRGN; XOffset, YOffset : Int) : Int Function PatBlt( DC : HDC; X, Y, Width, Height : Int; Rop : DWORD) : BOOL Function Pie( DC : HDC; X1, Y1, X2, Y2, X3, Y3, X4, Y4 : Int) : BOOL Function PlayMetaFile( DC : HDC; MF : HMETAFILE) : BOOL Function PaintRgn( DC : HDC; RGN : HRGN) : BOOL Function PtInRegion( RGN : HRGN; X, Y : Int) : BOOL Function PtVisible( DC : HDC; X, Y : Int) : BOOL Function RectInRegion( RGN : HRGN; const Rect : TRect) : BOOL Function RectVisible( DC : HDC; const Rect : TRect) : BOOL Function Rectangle( DC : HDC; X1, Y1, X2, Y2 : Int) : BOOL Function RestoreDC( DC : HDC; SavedDC : Int) : BOOL end; procedure SIRegister_ovcfiler(CL: TPSPascalCompiler); begin SIRegister_TOvcAbstractStore(CL); //PExPropInfo', '^TExPropInfo // will not work // TExPropInfo', 'record PI : TPropInfo; AObject : TObject; end SIRegister_TOvcPropertyList(CL); SIRegister_TOvcDataFiler(CL); Procedure UpdateStoredList(AForm: TWinControl; AStoredList : TStrings; FromForm : Boolean) Procedure UpdateStoredList1( AForm : TCustomForm; AStoredList: TStrings;FromForm: Boolean) Function CreateStoredItem( const CompName, PropName : string) : string Function ParseStoredItem( const Item : string; var CompName, PropName : string) : Boolean //Function GetPropType( PropInfo : PExPropInfo) : PTypeInfo end; procedure SIRegister_ovccoco(CL: TPSPascalCompiler); begin 'ovsetsize','LongInt'( 16); 'etSyntax','LongInt'( 0); 'etSymantic','LongInt'( 1); 'chCR',Char #13); 'chLF',Char #10); 'chLineSeparator', chCR); SIRegister_TCocoError(CL); SIRegister_TCommentItem(CL); SIRegister_TCommentList(CL); SIRegister_TSymbolPosition(CL); TGenListType', '( glNever, glAlways, glOnError ) TovBitSet', 'set of Int //PStartTable', '^TStartTable // will not work 'TovCharSet', 'set of AnsiChar TAfterGenListEvent', 'Procedure ( Sender : TObject; var PrintErrorCount : boolean) TCommentEvent', 'Procedure ( Sender : TObject; CommentList : TCommentList) TCustomErrorEvent', 'Function(Sender:TObject;const ErrorCode: longint;const Data:string): string TovErrorEvent', 'Procedure ( Sender : TObject; Error : TCocoError) TovErrorProc','Procedure (ErrorCode:Int;Symbol:TSymbolPosition;const Data:string;ErrorType:Int) TFailureEvent', 'Procedure ( Sender : TObject; NumErrors : Int) TGetCH', 'Function ( pos : longint) : char TStatusUpdateProc', 'Procedure ( Sender : TObject; Status: string; LineNum:Int) SIRegister_TCocoRScanner(CL); SIRegister_TCocoRGrammar(CL); '_EF','Char #0); '_TAB','Char').SetString( #09); '_CR','Char').SetString( #13); '_LF','Char').SetString( #10); '_EL','').SetString( _CR); '_EOF','Char').SetString( #26); 'LineEnds','TCharSet'(ord(_CR) or ord(_LF) or ord(_EF)); 'minErrDist','LongInt'( 2); Function ovPadL( S : string; ch : char; L : Int) : string end; TFormatSettings = record CurrencyFormat: Byte; NegCurrFormat: Byte; ThousandSeparator: Char; DecimalSeparator: Char; CurrencyDecimals: Byte; DateSeparator: Char; TimeSeparator: Char; ListSeparator: Char; CurrencyString: string; ShortDateFormat: string; LongDateFormat: string; TimeAMString: string; TimePMString: string; ShortTimeFormat: string; LongTimeFormat: string; ShortMonthNames: array[1..12] of string; LongMonthNames: array[1..12] of string; ShortDayNames: array[1..7] of string; LongDayNames: array[1..7] of string; TwoDigitYearCenturyWindow: Word; end; procedure SIRegister_OvcFormatSettings(CL: TPSPascalCompiler); begin Function ovFormatSettings : TFormatSettings end; procedure SIRegister_ovcstr(CL: TPSPascalCompiler); begin TOvcCharSet', 'set of Char ovBTable', 'array[0..255] of Byte //BTable = array[0..{$IFDEF UNICODE}{$IFDEF HUGE_UNICODE_BMTABLE}$FFFF{$ELSE}$FF{$ENDIF}{$ELSE}$FF{$ENDIF}] of Byte; Function BinaryBPChar( Dest : PChar; B : Byte) : PChar Function BinaryLPChar( Dest : PChar; L : LongInt) : PChar Function BinaryWPChar( Dest : PChar; W : Word) : PChar Procedure BMMakeTable( MatchString : PChar; var BT : ovBTable) Function BMSearch(var Buffer,BufLength:Cardinal;var BT:ovBTable;MatchString:PChar;var Pos:Cardinal):Bool; Function BMSearchUC(var Buffer,BufLength:Card;var BT:ovBTable;MatchString:PChar;var Pos:Card):Bool Function CharStrPChar( Dest : PChar; C : Char; Len : Cardinal) : PChar Function DetabPChar( Dest : PChar; Src : PChar; TabSize : Byte) : PChar Function HexBPChar( Dest : PChar; B : Byte) : PChar Function HexLPChar( Dest : PChar; L : LongInt) : PChar Function HexPtrPChar( Dest : PChar; P : TObject) : PChar Function HexWPChar( Dest : PChar; W : Word) : PChar Function LoCaseChar( C : Char) : Char Function OctalLPChar( Dest : PChar; L : LongInt) : PChar Function StrChDeletePrim( P : PChar; Pos : Cardinal) : PChar Function StrChInsertPrim( Dest : PChar; C : Char; Pos: Cardinal) : PChar Function StrChPos( P : PChar; C : Char; var Pos : Cardinal) : Boolean Procedure StrInsertChars( Dest : PChar; Ch : Char; Pos, Count : Word) Function StrStCopy( Dest, S : PChar; Pos, Count : Cardinal) : PChar Function StrStDeletePrim( P : PChar; Pos, Count : Cardinal) : PChar Function StrStInsert( Dest, S1, S2 : PChar; Pos : Cardinal) : PChar Function StrStInsertPrim( Dest, S : PChar; Pos : Cardinal) : PChar Function StrStPos( P, S : PChar; var Pos : Cardinal) : Boolean Function StrToLongPChar( S : PChar; var I : LongInt) : Boolean Procedure TrimAllSpacesPChar( P : PChar) Function TrimEmbeddedZeros( const S : string) : string Procedure TrimEmbeddedZerosPChar( P : PChar) Function TrimTrailPrimPChar( S : PChar) : PChar Function TrimTrailPChar( Dest, S : PChar) : PChar Function TrimTrailingZeros( const S : string) : string Procedure TrimTrailingZerosPChar( P : PChar) Function UpCaseChar( C : Char) : Char Function ovcCharInSet( C : Char; const CharSet : TOvcCharSet) : Boolean Function ovc32StringIsCurrentCodePage( const S : WideString) : Boolean; //Function ovc32StringIsCurrentCodePage1( const S:PWideChar; CP : Cardinal) : Boolean; end; procedure SIRegister_AfUtils(CL: TPSPascalCompiler); begin //PRaiseFrame', '^TRaiseFrame // will not work TRaiseFrame', 'record NextRaise : PRaiseFrame; ExceptAddr : ___Poin' +ter; ExceptObject : TObject; ExceptionRecord : PExceptionRecord; end Procedure SafeCloseHandle( var Handle : THandle) Procedure ExchangeInt( X1, X2 : Int) Procedure FillInt( const Buffer, Size, Value : Int) Function LongMulDiv( Mult1, Mult2, Div1 : Longint) : Longint Function afCompareMem( P1, P2 : TObject; Length : Int) : Boolean FILENAME_ADVAPI32 = 'ADVAPI32.DLL'; function AbortSystemShutdown; external advapi32 name 'AbortSystemShutdownW'; function AbortSystemShutdown(lpMachineName: PKOLChar): BOOL; stdcall; function AccessCheckAndAuditAlarm(SubsystemName: PKOLChar; HandleId: Pointer; ObjectTypeName, ObjectName: PKOLChar; SecurityDescriptor: PSecurityDescriptor; DesiredAccess: DWORD; const GenericMapping: TGenericMapping; ObjectCreation: BOOL; var GrantedAccess: DWORD; var AccessStatus, pfGenerateOnClose: BOOL): BOOL; stdcall; function AccessCheckByTypeAndAuditAlarm(SubsystemName: PKOLChar; HandleId: Pointer; ObjectTypeName, ObjectName: PKOLChar; SecurityDescriptor: PSecurityDescriptor; PrincipalSelfSid: PSID; DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE; Flags: DWORD; ObjectTypeList: PObjectTypeList; ObjectTypeListLength:DWORD;const GenericMapping: TGenericMapping; ObjectCreation: BOOL; var GrantedAccess: DWORD; var AccessStatus, pfGenerateOnClose: BOOL): BOOL; stdcall; function AccessCheckByTypeResultListAndAuditAlarm(SubsystemName: PKOLChar; HandleId: Pointer; ObjectTypeName, ObjectName: PKOLChar; SecurityDescriptor: PSecurityDescriptor; PrincipalSelfSid: PSID; DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE; Flags: DWORD; ObjectTypeList: PObjectTypeList; ObjectTypeListLength: DWORD;const GenericMapping:TGenericMapping; ObjectCreation: BOOL; var GrantedAccess:DWORD;var AccessStatusList:DWORD;var pfGenerateOnClose:BOOL):BOOL; stdcall; function BackupEventLog(hEventLog:THandle; lpBackupFileName: PKOLChar):BOOL; stdcall; function ClearEventLog(hEventLog: THandle; lpBackupFileName: PKOLChar): BOOL; stdcall; function CreateProcessAsUser(hToken: THandle; lpApplicationName: PKOLChar; lpCommandLine: PKOLChar; lpProcessAttributes: PSecurityAttributes; lpThreadAttributes: PSecurityAttributes; bInheritHandles: BOOL; dwCreationFlags: DWORD; lpEnvironment: Pointer; lpCurrentDirectory: PKOLChar; const lpStartupInfo: TStartupInfo;var lpProcessInformation: TProcessInformation):BOOL; stdcall; function GetCurrentHwProfile(var lpHwProfileInfo: THWProfileInfo): BOOL; stdcall; function GetFileSecurity(lpFileName: PKOLChar; RequestedInformation: SECURITY_INFORMATION; pSecurityDescriptor: PSecurityDescriptor;nLength:DWORD;var lpnLengthNeeded:DWORD):BOOL; stdcall; function GetUserName(lpBuffer: PKOLChar; var nSize: DWORD): BOOL; stdcall; function InitiateSystemShutdown(lpMachineName, lpMessage: PKOLChar; dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL): BOOL; stdcall; function LogonUser(lpszUsername, lpszDomain, lpszPassword: PKOLChar; dwLogonType, dwLogonProvider: DWORD; var phToken: THandle): BOOL; stdcall; function LookupAccountName(lpSystemName, lpAccountName: PKOLChar; Sid: PSID; var cbSid: DWORD; ReferencedDomainName: PKOLChar; var cbReferencedDomainName: DWORD; var peUse: SID_NAME_USE): BOOL; stdcall; function LookupAccountSid(lpSystemName: PKOLChar; Sid: PSID; Name: PKOLChar; var cbName: DWORD; ReferencedDomainName: PKOLChar; var cbReferencedDomainName: DWORD; var peUse: SID_NAME_USE): BOOL; stdcall; function LookupPrivilegeDisplayName(lpSystemName, lpName: PKOLChar; lpDisplayName: PKOLChar; var cbDisplayName, lpLanguageId: DWORD): BOOL; stdcall; function LookupPrivilegeName(lpSystemName: PKOLChar; var lpLuid: TLargeInt; lpName: PKOLChar; var cbName: DWORD): BOOL; stdcall; function LookupPrivilegeValue(lpSystemName, lpName: PKOLChar; var lpLuid: TLargeInt): BOOL; stdcall; function ObjectCloseAuditAlarm(SubsystemName: PKOLChar; HandleId: Pointer; GenerateOnClose: BOOL): BOOL; stdcall; function ObjectDeleteAuditAlarm(SubsystemName: PKOLChar; HandleId: Pointer; GenerateOnClose: BOOL): BOOL; stdcall; function ObjectOpenAuditAlarm(SubsystemName: PKOLChar; HandleId: Pointer; ObjectTypeName:PKOLChar; ObjectName: PKOLChar; pSecurityDescriptor: PSecurityDescriptor; ClientToken: THandle; DesiredAccess, GrantedAccess: DWORD; var Privileges: TPrivilegeSet; ObjectCreation, AccessGranted: BOOL; var GenerateOnClose: BOOL): BOOL; stdcall; function ObjectPrivilegeAuditAlarm(SubsystemName: PKOLChar; HandleId: Pointer; ClientToken: THandle; DesiredAccess: DWORD; var Privileges: TPrivilegeSet; AccessGranted: BOOL): BOOL; stdcall; function OpenBackupEventLog(lpUNCServerName, lpFileName: PKOLChar): THandle; stdcall; function OpenEventLog(lpUNCServerName, lpSourceName: PKOLChar): THandle; stdcall; function PrivilegedServiceAuditAlarm(SubsystemName, ServiceName: PKOLChar; ClientToken: THandle;var Privileges: TPrivilegeSet; AccessGranted: BOOL): BOOL; stdcall; function ReadEventLog(hEventLog: THandle; dwReadFlags, dwRecordOffset: DWORD; lpBuffer: Pointer; nNumberOfBytesToRead: DWORD; var pnBytesRead, pnMinNumberOfBytesNeeded: DWORD): BOOL; stdcall; function RegConnectRegistry(lpMachineName: PKOLChar; hKey: HKEY; var phkResult: HKEY): Longint; stdcall; function RegCreateKey(hKey: HKEY; lpSubKey: PKOLChar; var phkResult: HKEY): Longint; stdcall; function RegCreateKeyEx(hKey: HKEY; lpSubKey: PKOLChar; Reserved: DWORD; lpClass: PKOLChar; dwOptions: DWORD; samDesired: REGSAM; lpSecurityAttributes: PSecurityAttributes; var phkResult: HKEY; lpdwDisposition: PDWORD): Longint; stdcall; function RegDeleteKey(hKey: HKEY; lpSubKey: PKOLChar): Longint; stdcall; function RegDeleteValue(hKey: HKEY; lpValueName: PKOLChar): Longint; stdcall; function RegEnumKeyEx(hKey: HKEY; dwIndex: DWORD; lpName: PKOLChar; var lpcbName: DWORD; lpReserved: Pointer; lpClass: PKOLChar; lpcbClass: PDWORD; lpftLastWriteTime: PFileTime): Longint; stdcall; function RegEnumKey(hKey:HKEY;dwIndex:DWORD;lpName:PKOLChar;cbName:DWORD):Longint;stdcall; function RegEnumValue(hKey: HKEY; dwIndex: DWORD; lpValueName: PKOLChar; var lpcbValueName: DWORD; lpReserved: Pointer; lpType: PDWORD; lpData: PByte; lpcbData: PDWORD): Longint; stdcall; function RegLoadKey(hKey: HKEY; lpSubKey, lpFile: PKOLChar): Longint; stdcall; function RegOpenKey(hKey: HKEY; lpSubKey: PKOLChar;var phkResult: HKEY):Longint; stdcall; function RegOpenKeyEx(hKey: HKEY; lpSubKey: PKOLChar; ulOptions: DWORD; samDesired: REGSAM; var phkResult: HKEY): Longint; stdcall; function RegQueryInfoKey(hKey: HKEY; lpClass: PKOLChar; lpcbClass: PDWORD; lpReserved: Pointer; lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen, lpcbMaxValueLen, lpcbSecurityDescriptor: PDWORD; lpftLastWriteTime: PFileTime): Longint; stdcall; function RegQueryMultipleValues(hKey: HKEY; var ValList; NumVals: DWORD; lpValueBuf: PKOLChar; var ldwTotsize: DWORD): Longint; stdcall; function RegQueryValue(hKey: HKEY; lpSubKey: PKOLChar; lpValue: PKOLChar; var lpcbValue: Longint): Longint; stdcall; function RegQueryValueEx(hKey: HKEY; lpValueName: PKOLChar; lpReserved: Pointer; lpType: PDWORD; lpData: PByte; lpcbData: PDWORD): Longint; stdcall; function RegReplaceKey(hKey: HKEY; lpSubKey: PKOLChar; lpNewFile: PKOLChar; lpOldFile: PKOLChar): Longint; stdcall; function RegRestoreKey(hKey: HKEY; lpFile:PKOLChar; dwFlags: DWORD):Longint; stdcall; function RegSaveKey(hKey: HKEY; lpFile: PKOLChar; lpSecurityAttributes: PSecurityAttributes): Longint; stdcall; function RegSetValue(hKey: HKEY; lpSubKey: PKOLChar; dwType: DWORD; lpData: PKOLChar; cbData: DWORD): Longint; stdcall; function RegSetValueEx(hKey: HKEY; lpValueName: PKOLChar; Reserved: DWORD; dwType: DWORD; lpData: Pointer; cbData: DWORD): Longint; stdcall; function RegUnLoadKey(hKey: HKEY; lpSubKey: PKOLChar): Longint; stdcall; function RegisterEventSource(lpUNCServerName, lpSourceName: PKOLChar): THandle; stdcall; function ReportEvent(hEventLog: THandle; wType, wCategory: Word; dwEventID: DWORD; lpUserSid: Pointer; wNumStrings: Word; dwDataSize: DWORD; lpStrings, lpRawData: Pointer): BOOL; stdcall; function SetFileSecurity(lpFileName: PKOLChar; SecurityInformation: SECURITY_INFORMATION; pSecurityDescriptor: PSecurityDescriptor): BOOL; stdcall; Function wAddAtom( lpString : PKOLChar) : ATOM Function wBeginUpdateResource( pFileName : PKOLChar; bDeleteExistingResources : BOOL) : THandle //Function wCallNamedPipe( lpNamedPipeName : PKOLChar; lpInBuffer : Pointer; nInBufferSize : DWORD; lpOutBuffer:Pointer;nOutBufferSize:DWORD;var lpBytesRead:DWORD;nTimeOut: DWORD) : BOOL //Function wCommConfigDialog( lpszName : PKOLChar; hWnd : HWND; var lpCC : TCommConfig): BOOL Function wCompareString(Locale:LCID;dwCmpFlags:DWORD;lpString1:PKOLChar;cchCount1:Int;lpString2:PKOLChar;cchCount2:Int):Int Function wCopyFile( lpExistingFileName, lpNewFileName : PKOLChar; bFailIfExists : BOOL): BOOL //Function wCopyFileEx(lpExistingFileName,lpNewFileName:PKOLChar;lpProgressRoutine:TFNProgressRoutine;lpData:Pointer;pbCancel:PBool; dwCopyFlags:DWORD):BOOL Function wCreateDirectory(lpPathName:PKOLChar;lpSecurityAttributes:PSecurityAttributes):BOOL Function wCreateDirectoryEx(lpTemplateDirectory,lpNewDirectory:PKOLChar;lpSecAttrib:PSecurityAttribts):BOOL; Function wCreateEvent(lpEventAttribes:PSecurityAttrib;bManualReset,bInitialState:BOOL;lpName:PKOLChar):THandle; Function wCreateFile(lpFileName : PKOLChar; dwDesiredAccess, dwShareMode : DWORD; lpSecurityAttributes : PSecurityAttributes; dwCreationDisposition, dwFlagsAndAttributes:DWORD;hTemplateFile:THandle):THandle Function wCreateFileMapping(hFile:THandle;lpFileMappingAttributes:PSecurityAttributes; flProtect,dwMaximumSizeHigh,dwMaximumSizeLow:DWORD;lpName:PKOLChar):THandle Function wCreateHardLink(lpFileName,lpExistingFileName:PKOLChar;lpSecurityAttributes:PSecurityAttributes):BOOL Function CreateMailslot(lpName:PKOLChar;MaxMessSize:DWORD;lReadTimeout:DWORD;lpSecurityAttrib:PSecurityAttributes):THandle); Function wCreateNamedPipe(lpName: PKOLChar; dwOpenMode, dwPipeMode, nMaxInstances, nOutBufferSize,nInBufferSize,nDefaultTimeOut:DWORD;lpSecurityAttributes:PSecurityAttributes): THandle //Function CreateProcess( lpApplicationName : PKOLChar; lpCommandLine : PKOLChar; lpProcessAttributes, lpThreadAttributes : PSecurityAttributes; bInheritHandles : BOOL; dwCreationFlags : DWORD; lpEnvironment : Pointer;lpCurrentDirectory:PKOLChar;const lpStartupInfo:TStartupInfo;var lpProcessInfo:TProcessInformation):BOOL Function wCreateSemaphore(lpSemaphoreAttributes:PSecurityAttributes;lInitialCount,lMaximumCount:Longint;lpName:PKOLChar): THandle Function wCreateWaitableTimer(lpTimerAttribs:PSecurityAttribs;bManualReset:BOOL;lpTimerName:PKOLChar):THandle); Function wDefineDosDevice( dwFlags : DWORD; lpDeviceName, lpTargetPath : PKOLChar) : BOOL Function wDeleteFile( lpFileName : PKOLChar) : BOOL Function wEndUpdateResource( hUpdate : THandle; fDiscard : BOOL) : BOOL //Function wEnumCalendarInfo(lpCalInfEnumProc:TFNCalInfEnumProc;Locale:LCID;Calendar:CALID;CalType:CALTYPE):BOOL; //Function wEnumDateFormats(lpDateFmtEnumProc: TFNDateFmtEnumProc; Locale : LCID; dwFlags : DWORD) : BOOL //Function wEnumResourceNames(hModule:HMODULE;lpType:PKOLChar;lpEnumFunc:ENUMRESNAMEPROC;lParam:Longint):BOOL; //Function wEnumResourceTypes(hModule:HMODULE;lpEnumFunc:ENUMRESTYPEPROC;lParam:Longint):BOOL; //Function wEnumSystemCodePages(lpCodePageEnumProc:TFNCodepageEnumProc;dwFlags:DWORD): BOOL //Function wEnumSystemLocales( lpLocaleEnumProc : TFNLocaleEnumProc; dwFlags : DWORD): BOOL //Function wEnumTimeFormats(lpTimeFmtEnumProc:TFNTimeFmtEnumProc;Locale:LCID;dwFlags:DWORD):BOOL; Function wExpandEnvironmentStrings( lpSrc : PKOLChar; lpDst : PKOLChar; nSize : DWORD) : DWORD Procedure wFatalAppExit( uAction : UINT; lpMessageText : PKOLChar) //Function wFillConsoleOutputCharacter( hConsoleOutput : THandle; cCharacter : KOLChar; nLength : DWORD; dwWriteCoord : TCoord; var lpNumberOfCharsWritten : DWORD) : BOOL Function wFindAtom( lpString : PKOLChar) : ATOM Function wFindFirstChangeNotification(lpPathName:PKOLChar;bWatchSubtree:BOOL;dwNotifyFilter:DWORD):THandle; Function wFindFirstFile( lpFileName : PKOLChar; var lpFindFileData : TWIN32FindData) : THandle //Function wFindFirstFileEx( lpFileName : PKOLChar; fInfoLevelId : TFindexInfoLevels; lpFindFileData : Pointer; fSearchOp : TFindexSearchOps; lpSearchFilter : Pointer; dwAdditionalFlags : DWORD) : BOOL Function wFindNextFile( hFindFile : THandle; var lpFindFileData : TWIN32FindData) : BOOL Function wFindResource( hModule : HMODULE; lpName, lpType : PKOLChar) : HRSRC Function wFindResourceEx(hModule: HMODULE; lpType,lpName:PKOLChar; wLanguage: Word) : HRSRC Function wFoldString(dwMapFlags:DWORD;lpSrcStr:PKOLChar;cchSrc:Int;lpDestStr:PKOLChar;cchDest:Int):Int); //Function wFormatMessage( dwFlags : DWORD; lpSource : Pointer; dwMessageId : DWORD; dwLanguageId : DWORD; lpBuffer : PKOLChar; nSize : DWORD; Arguments : Pointer) : DWORD Function wFreeEnvironmentStrings( EnvBlock : PKOLChar) : BOOL Function wGetAtomName( nAtom : ATOM; lpBuffer : PKOLChar; nSize : Int) : UINT Function wGetBinaryType( lpApplicationName : PKOLChar; var lpBinaryType : DWORD) : BOOL Function wGetCommandLine : PKOLChar //Function wGetCompressedFileSize( lpFileName : PKOLChar; lpFileSizeHigh : PDWORD) : DWORD Function wGetComputerName( lpBuffer : PKOLChar; var nSize : DWORD) : BOOL Function wGetConsoleTitle( lpConsoleTitle : PKOLChar; nSize : DWORD) : DWORD //Function wGetCurrencyFormat(Locale : LCID; dwFlags : DWORD; lpValue : PKOLChar; lpFormat : PCurrencyFmt; lpCurrencyStr : PKOLChar; cchCurrency : Int) : Int Function wGetCurrentDirectory( nBufferLength : DWORD; lpBuffer : PKOLChar) : DWORD //Function wGetDateFormat(Locale:LCID; dwFlags:DWORD;lpDate:PSystemTime;lpFormat: PKOLChar; lpDateStr:PKOLChar; cchDate: Int):Int //Function wGetDefaultCommConfig(lpszName:PKOLChar;var lpCC:TCommConfig;var lpdwSize:DWORD):BOOL Function wGetDiskFreeSpace( lpRootPathName : PKOLChar; var lpSectorsPerCluster, lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters : DWORD) : BOOL //Function wGetDiskFreeSpaceEx( lpDirectoryName : PKOLChar; var lpFreeBytesAvailableToCaller,lpTotalNumberOfBytes, lpTotalNumberOfFreeBytes : PLargeInt) : BOOL Function wGetDriveType( lpRootPathName : PKOLChar) : UINT Function wGetEnvironmentStrings : PKOLChar Function wGetEnvironmentVariable(lpName:PKOLChar; lpBuffer:PKOLChar; nSize: DWORD) : DWORD; Function wGetFileAttributes( lpFileName : PKOLChar) : DWORD //Function wGetFileAttributesEx(lpFileName:PKOLChar;fInfoLevelId:TGetFileExInfoLevs;lpFileInform:Pointer):BOOL; Function wGetFullPathName(lpFileName:PKOLChar;nBufferLeng:WORD;lpBuffer:PKOLChar;var lpFilePart:PKOLChar):DWORD; //Function wGetLocaleInfo(Locale:LCID; LCType:LCTYPE;lpLCData:PKOLChar;cchData:Int): Int Function wGetLogicalDriveStrings( nBufferLength : DWORD; lpBuffer : PKOLChar) : DWORD Function wGetModuleFileName( hModule : HINST; lpFilename : PKOLChar; nSize : DWORD) : DWORD Function wGetModuleHandle( lpModuleName : PKOLChar) : HMODULE //Function wGetNamedPipeHandleState(hNamedPipe: THandle;lpState,lpCurInstances,lpMaxCollectionCount, lpCollectDataTimeout:PDWORD; lpUserName: PKOLChar; nMaxUserNameSize: DWORD): BOOL //Function wGetNumberFormat(Locale:CID; dwFlags:DWORD;lpValue:PKOLChar;lpFormat:PNumberFmt;lpNumberStr:PKOLChar;cchNumber:Int):Int Function wGetPrivateProfileInt(lpAppName,lpKeyName:PKOLChar;nDefault:Int;lpFileName:PKOLChar):UINT; Function wGetPrivateProfileSection(lpAppName:PKOLChar;lpRetrStr:PKOLChar;nSize:DWORD;pFileName:PKOLChar):DWORD; Function wGetPrivateProfileSectionNames(lpszReturnBuffer:PKOLChar;nSize:DWORD;lpFileName:PKOLChar):DWORD; Function wGetPrivateProfileString(lpAppName,lpKeyName,lpDefault:PKOLChar;lpReturnedStr:PKOLChar;nSize:DWORD;lpFileName:PKOLChar):DWORD Function wGetProfileInt( lpAppName, lpKeyName : PKOLChar; nDefault : Int) : UINT Function wGetProfileSection(lpAppName:PKOLChar;lpReturnedString:PKOLChar;nSize:DWORD): DWORD Function wGetProfileString(lpAppName,lpKeyName,lpDefault:PKOLChar;lpReturnedStr:PKOLChar;nSize:DWORD):DWORD; Function wGetShortPathName(lpszLongPath:PKOLChar;lpszShortPath:PKOLChar;cchBuffer:DWORD): DWORD //Procedure wGetStartupInfo( var lpStartupInfo : TStartupInfo) //Function wGetStringTypeEx(Locale:LCID;dwInfoType:DWORD;lpSrcStr:PKOLChar;cchSrc:Int;var lpCharType):BOOL Function wGetSystemDirectory( lpBuffer : PKOLChar; uSize : UINT) : UINT Function wGetTempFileName(lpPathName,lpPrefixString:PKOLChar;uUnique:UINT;lpTempFileName:PKOLChar):UINT Function wGetTempPath( nBufferLength : DWORD; lpBuffer : PKOLChar) : DWORD //Function wGetTimeFormat(Loc:LCID;dwFlgs:DWORD;lpTime:PSystemTime;lpFrm:PKOLChar;lpTimeStr:PKOLChar;cTime:Int):Int //Function wGetVersionEx( var lpVersionInformation : TOSVersionInfo) : BOOL //Function GetVolumeInformation( lpRootPathName : PKOLChar; lpVolumeNameBuffer : PKOLChar; nVolumeNameSize : DWORD; lpVolumeSerialNumber : PDWORD; var lpMaximumComponentLength,lpFileSystemFlags:DWORD; lpFileSystemNameBuffer:PKOLChar;nFileSystemNameSize: DWORD) : BOOL Function wGetWindowsDirectory( lpBuffer : PKOLChar; uSize : UINT) : UINT Function wGlobalAddAtom( lpString : PKOLChar) : ATOM Function wGlobalFindAtom( lpString : PKOLChar) : ATOM Function wGlobalGetAtomName( nAtom : ATOM; lpBuffer : PKOLChar; nSize : Int) : UINT Function wIsBadStringPtr( lpsz : PKOLChar; ucchMax : UINT) : BOOL Function wLCMapString(Loc:LCID;dwMapFlgs:DWORD;lpSrcStr:PKOLChar;cchSrc:Int;lpDestStr:PKOLChar;cchDest:Int):Int; Function wLoadLibrary( lpLibFileName : PKOLChar) : HMODULE Function wLoadLibraryEx( lpLibFileName : PKOLChar; hFile : THandle; dwFlags : DWORD) : HMODULE Function wMoveFile( lpExistingFileName, lpNewFileName : PKOLChar) : BOOL Function wMoveFileEx( lpExistingFileName, lpNewFileName: PKOLChar; dwFlags : DWORD) : BOOL //Function wMoveFileWithProgress(lpExistingFileName,lpNewFileName:PKOLChar;lpProgressRoutine: TFNProgressRoutine;lpData:Pointer;dwFlags:DWORD): BOOL Function wOpenEvent( dwDesiredAccess : DWORD; bInheritHandle : BOOL;lpName:PKOLChar) : THandle Function wOpenFileMapping(dwDesiredAccess:DWORD;bInheritHandle:BOOL;lpName: PKOLChar):THandle Function wOpenMutex(dwDesiredAccess:DWORD; bInheritHandle:BOOL; lpName : PKOLChar) : THandle Function wOpenSemaphore( dwDesiredAccess:DWORD; bInheritHandle:BOOL;lpName:PKOLChar):THandle Function wOpenWaitableTimer(dwDesiredAccess:DWORD;bInheritHandle:BOOL;lpTimerName:PKOLChar):THandle Procedure wOutputDebugString( lpOutputString : PKOLChar) //Function wPeekConsoleInput(hConsoleInput:THandle;varlpBuffer:TInputRecord;nLength:DWORD;var lpNumberOfEventsRead:DWORD):BOOL; Function wQueryDosDevice(lpDeviceName:PKOLChar;lpTargetPath:PKOLChar;ucchMax:DWORD): DWORD //Function wQueryRecoveryAgents(p1:PKOLChar;var p2:Pointer;var p3:TRecoveryAgentInformation):DWORD //Function wReadConsole(hConsoleInput:THandle;lpBuffer:Pointer;nNumberOfCharsToRead:DWORD; var lpNumberOfCharsRead:DWORD;lpReserved Pointer):BOOL //Function wReadConsoleInput(hConsInp:THandle;var lpBuf:TInpRec;nLength:DWORD;var lpNumbOfEventsRead:DWORD):BOOL; //Function wReadConsoleOutput(hConsoleOutput:THandle;lpBuffer:Pointer;dwBufferSize,dwBufferCoord:TCoord;var lpReadRegion:TSmallRect) : BOOL //Function wReadConsoleOutputCharacter(hConsoleOutput:THandle;lpCharacter:PKOLChar;nLength : DWORD;dwReadCoord:TCoord;var lpNumberOfCharsRead:DWORD): BOOL Function wRemoveDirectory( lpPathName : PKOLChar) : BOOL //Function wScrollConsoleScreenBuffer( hConsoleOutput : THandle; const lpScrollRectangle : TSmallRect; lpClipRectangle:PSmallRect;dwDestinationOrigin:TCoord;var lpFill:TCharInfo):BOOL Function wSearchPath(lpPath,lpFileName,lpExtension:PKOLChar;nBufferLength:DWORD;lpBuffer:PKOLChar;var lpFilePart:PKOLChar):DWORD; Function wSetComputerName( lpComputerName : PKOLChar): BOOL Function wSetConsoleTitle( lpConsoleTitle : PKOLChar): BOOL Function wSetCurrentDirectory( lpPathName : PKOLChar): BOOL //Function wSetDefaultCommConfig(lpszName: PKOLChar; lpCC:PCommConfig; dwSize: DWORD) : BOOL Function wSetEnvironmentVariable( lpName, lpValue : PKOLChar) : BOOL Function wSetFileAttributes( lpFileName : PKOLChar; dwFileAttributes : DWORD) : BOOL //Function wSetLocaleInfo( Locale : LCID; LCType : LCTYPE; lpLCData : PKOLChar) : BOOL Function wSetVolumeLabel( lpRootPathName : PKOLChar; lpVolumeName : PKOLChar) : BOOL //Function wUpdateResource(hUpdate:THandle;lpType,lpName:PKOLChar;wLanguage:Word;lpData:Ptr;cbData:DWORD):BOOL Function wVerLanguageName( wLang : DWORD; szLang : PKOLChar; nSize : DWORD) : DWORD Function wWaitNamedPipe( lpNamedPipeName : PKOLChar; nTimeOut : DWORD) : BOOL //Function wWriteConsole(hConsoleOutput:THandle;const lpBuffer:Pointer;nNumberOfCharsToWrite:DWORD;var lpNumberOfCharsWritten:DWORD; lpReserved:Pointer):BOOL //Function wWriteConsoleInput(hConsoleInput:THandle;const lpBuffer:TInputRecord;nLength:DWORD;var lpNumberOfEventsWritten:DWORD):BOOL //Function wWriteConsoleOutput(hConsoleOutput:THandle;lpBuffer:Pointer;dwBufferSize,dwBufferCoord:TCoord;var lpWriteRegion:TSmallRect):BOOL //Function wWriteConsoleOutputCharacter(hConsoleOutput:THandle;lpCharacter:PKOLChar;nLength:DWORD;dwWriteCoord:TCoord;var lpNumberOfCharsWritten:DWORD):BOOL Function wWritePrivateProfileSection( lpAppName, lpString, lpFileName : PKOLChar) : BOOL Function wWritePrivateProfileString(lpAppName,lpKeyName,lpString,lpFileName:PKOLChar) : BOOL Function wWriteProfileSection( lpAppName, lpString : PKOLChar) : BOOL Function wWriteProfileString( lpAppName, lpKeyName, lpString : PKOLChar) : BOOL Function wlstrcat( lpString1, lpString2 : PKOLChar) : PKOLChar Function wlstrcmp( lpString1, lpString2 : PKOLChar) : Int Function wlstrcmpi( lpString1, lpString2 : PKOLChar) : Int Function wlstrcpy( lpString1, lpString2 : PKOLChar) : PKOLChar Function wlstrcpyn( lpString1, lpString2 : PKOLChar; iMaxLength : Int) : PKOLChar Function wlstrlen( lpString : PKOLChar) : Int //Function wMultinetGetConnectionPerformance(lpNetResource:PNetResource;lpNetConnectInfoStruc:PNetConnectInfoStruct):DWORD //Function wWNetAddConnection2(var lpNetResource:TNetResource;lpPassw,lpUserName:PKOLChar;dwFlags:DWORD):DWORD; //Function wWNetAddConnection3(hwndOwner:HWND;var lpNetResource:TNetResource;lpPassword,lpUserName:PKOLChar;dwFlags:DWORD):DWORD Function wWNetAddConnection( lpRemoteName, lpPassword, lpLocalName : PKOLChar) : DWORD Function wWNetCancelConnection2( lpName : PKOLChar; dwFlags : DWORD; fForce : BOOL) : DWORD Function wWNetCancelConnection( lpName : PKOLChar; fForce : BOOL) : DWORD //Function wWNetConnectionDialog1( var lpConnDlgStruct : TConnectDlgStruct) : DWORD //Function wWNetDisconnectDialog1( var lpConnDlgStruct : TDiscDlgStruct) : DWORD //Function wWNetEnumResource(hEnum:THandle;var lpcCount:DWORD;lpBuffer:Ptr;var lpBufferSize:DWORD):DWORD; Function wWNetGetConnection(lpLocalName:PKOLChar;lpRemoteName:PKOLChar;var lpnLength:DWORD):DWORD; Function wWNetGetLastError(var lpError:DWORD;lpErrorBuf:PKOLChar;nErrorBufSize: DWORD; lpNameBuf: PKOLChar;nNameBufSize:DWORD):DWORD //Function wWNetGetNetworkInformation(lpProvider:PKOLChar;var lpNetInfoStruct:TNetInfoStruct):DWORD; Function wWNetGetProviderName(dwNetType:DWORD;lpProviderName:PKOLChar;var lpBufferSize:DWORD):DWORD; //Function wWNetGetResourceParent(lpNetResource:PNetResource;lpBuffer:Pointer;var cbBuffer:DWORD):DWORD; //Function wWNetGetUniversalName(lpLocalPath:PKOLChar;dwInfoLevel:DWORD;lpBuffer:Ptr;var lpBufferSize:DWORD):DWORD; Function wWNetGetUser( lpName : PKOLChar; lpUserName : PKOLChar; var lpnLength : DWORD) : DWORD //Function wWNetOpenEnum(dwScope,dwType,dwUsage:DWORD;lpNetResource:PNetRes;var lphEnum:THandle):DWORD; //Function wWNetSetConnection(lpName:PKOLChar;dwProperties:DWORD; pvValues : Pointer): DWORD //Function wWNetUseConnection(hwndOwner:HWND;var lpNetResource:TNetResource;lpUserID:PKOLChar;lpPassword:PKOLChar; dwFlags:DWORD;lpAccessName:PKOLChar;var lpBufferSize:DWORD;var lpResult:DWORD):DWORD Function wGetFileVersionInfo(lptstrFilenam:PKOLChar;dwHandle,dwLen:DWORD;lpData:Pointer):BOOL; Function wGetFileVersionInfoSize( lptstrFilename : PKOLChar; var lpdwHandle : DWORD) : DWORD Function wVerFindFile( uFlags : DWORD; szFileName, szWinDir, szAppDir, szCurDir : PKOLChar; var lpuCurDirLen : UINT; szDestDir : PKOLChar; var lpuDestDirLen : UINT) : DWORD Function wVerInstallFile(uFlags:DWORD;szSrcFileName,szDestFileName,szSrcDir,szDestDir,szCurDir, szTmpFile:PKOLChar;var lpuTmpFileLen:UINT):DWORD //Function wVerQueryValue(pBlock:Pointer;lpSubBlock:PKOLChar;var lplpBuffer:Ptr;var puLen:UINT):BOOL; //Func wGetPrivateProfileStruct(lpszSection,lpszKey:PKOLChar;lpStruct:Ptr;uSizeStruct:UINT;szFile:PKOLChar):BOOL; //Func wWritePrivateProfileStruct(lpszSection,lpszKey:PKOLChar;lpStruct:Ptr;uSizeStruct:UINT;szFile:PKOLChar):BOOL; Function wAddFontResource( FileName : PKOLChar) : Int //Function wAddFontResourceEx( p1 : PKOLChar; p2 : DWORD; p3 : PDesignVector) : Int Function wCopyEnhMetaFile( p1 : HENHMETAFILE; p2 : PKOLChar) : HENHMETAFILE Function wCopyMetaFile( p1 : HMETAFILE; p2 : PKOLChar) : HMETAFILE //Function wCreateColorSpace( var ColorSpace : TLogColorSpace) : HCOLORSPACE //Function wCreateDC(lpszDriver,lpszDevice,lpszOutput:PKOLChar; lpdvmInit: PDeviceMode) : HDC //Function wCreateEnhMetaFile(DC:HDC;FileName:PKOLChar;Rect:PRect;Desc: PKOLChar) : HDC Function wCreateFont( nHeight,nWidth,nEscapement,nOrientaion,fnWeight:Int;fdwItalic, fdwUnderline,fdwStrikeOut,fdwCharSet,fdwOutputPrec,fdwClipPrecision,fdwQualy,fdwPitchAndFamily:DWORD;lpszFace:PKOLChar):HFONT; Function wCreateFontIndirect( const p1 : TLogFont) : HFONT //Function wCreateFontIndirectEx( const p1 : PEnumLogFontExDV) : HFONT // Function wCreateIC(lpszDriver,lpszDevice, lpszOutput:PKOLChar; lpdvmInit:PDeviceMode): HDC Function wCreateMetaFile( p1 : PKOLChar) : HDC Function wCreateScalableFontResource( p1 : DWORD; p2, p3, p4 : PKOLChar) : BOOL //Function wDeviceCapabilities(pDriverNa,pDeviceNam,pPort:PKOLChar;iIdx:Int;pOut:PKOLChar;DevMod:PDeviceMode):Int; // Function wEnumFontFamilies(DC:HDC; p2: PKOLChar; p3 : TFNFontEnumProc; p4 : LPARAM) : BOOL //Function wEnumFontFamiliesEx(DC:HDC;var p2:TLogFont;p3:TFNFontEnumProc;p4:LPARAM;p5:DWORD):BOOL); //Func wEnumFonts(DC:HDC;lpszFace:PKOLChar;fntenmprc:TFNFontEnumProc;lpszData:PKOLChar):Int; //Function wEnumICMProfiles( DC : HDC; ICMProc : TFNICMEnumProc; p3 : LPARAM) : Int //Function wExtTextOut(DC:HDC;X,Y:Int;Options:Longint;Rect:PRect;Str:PKOLChar;Count:Longint;Dx:PInt:BOOL //Function wGetCharABCWidths( DC : HDC; FirstChar, LastChar : UINT; const ABCStructs): BOOL //Func wGetCharABCWidthsFloat(DC:HDC; FirstChar,LastChar: UINT;const ABCFloatSturcts): BOOL //Function wGetCharWidth32( DC : HDC; FirstChar, LastChar : UINT; const Widths) : BOOL //Function wGetCharWidth( DC : HDC; FirstChar, LastChar : UINT; const Widths) : BOOL // Function wGetCharWidthFloat( DC : HDC; FirstChar, LastChar : UINT; const Widths) : BOOL // Func wGetCharacterPlacement(DC:HDC;p2:PKOLChar;p3,p4:BOOL;var p5:TGCPResults;p6:DWORD):DWORD Function wGetEnhMetaFile( p1 : PKOLChar) : HENHMETAFILE Function wGetEnhMetaFileDescription( p1 : HENHMETAFILE; p2 : UINT; p3 : PKOLChar) : UINT // Function wGetGlyphIndices( DC : HDC; p2 : PKOLChar; p3: Int; p4: PWORD; p5 : DWORD) : DWORD // Function wGetGlyphOutline( DC : HDC; uChar,uFormat:UINT;const lpgm:TGlyphMetrics; cbBuffer : DWORD; lpvBuffer : Pointer; const lpmat2 : TMat2) : DWORD Function wGetICMProfile( DC : HDC; var Size : DWORD; Name : PKOLChar) : BOOL // Function wGetLogColorSpace(p1:HCOLORSPACE;var ColorSpace:TLogColorSpace;Size:DWORD):BOOL Function wGetMetaFile( p1 : PKOLChar) : HMETAFILE // Function wGetObject( p1 : HGDIOBJ; p2 : Int; p3 : Pointer) : Int //Function wGetOutlineTextMetrics( DC : HDC; p2 : UINT; OTMetricStructs : Pointer) : UINT //Function wGetTextExtentExPoint(DC:HDC;p2:PKOLChar; p3,p4:Int;p5,p6:PInt;var p7:TSize):BOOL Function wGetTextExtentPoint32(DC:HDC; Str:PKOLChar; Count:Int; var Size : TSize) : BOOL Function wGetTextExtentPoint( DC : HDC; Str : PKOLChar; Count : Int; var Size : TSize) : BOOL Function wGetTextFace( DC : HDC; Count : Int; Buffer : PKOLChar) : Int //Function wGetTextMetrics( DC : HDC; var TM : TTextMetric) : BOOL Function wPolyTextOut( DC : HDC; const PolyTextArray, Strings : Int) : BOOL Function wRemoveFontResource( FileName : PKOLChar) : BOOL //Function wRemoveFontResourceEx( p1 : PKOLChar; p2 : DWORD; p3 : PDesignVector) : BOOL //Function wResetDC( DC : HDC; const InitData : TDeviceMode) : HDC Function wSetICMProfile( DC : HDC; Name : PKOLChar) : BOOL //Function wStartDoc( DC : HDC; const p2 : TDocInfo) : Int Function wTextOut( DC : HDC; X, Y : Int; Str : PKOLChar; Count : Int) : BOOL Function wUpdateICMRegKey( p1 : DWORD; p2, p3 : PKOLChar; p4 : UINT) : BOOL Function wwglUseFontBitmaps( DC : HDC; p2, p3, p4 : DWORD) : BOOL //Func wwglUseFontOutlines(p1:HDC;p2,p3,p4:DWORD;p5,p6:Single;p7:Int;p8:PGlyphMetricsFloat):BOOL Function wAppendMenu(hMenu: HMENU; uFlags, uIDNewItem : UINT; lpNewItem : PKOLChar) : BOOL Function wCallMsgFilter( var lpMsg : TMsg; nCode : Int) : BOOL //Function wCallWindowProc(lpPrevWndFunc:TFNWndProc;hWnd:HWND;Msg:UINT;wParam:WPARAM;lParam:LPARAM):LRESULT //Function wChangeDisplaySettings(var lpDevMode:TDeviceMode; dwFlags : DWORD) : Longint // Function wChangeDisplaySettingsEx(lpszDeviceName:PKOLChar;var lpDevMode: TDeviceMode;wnd:HWND;dwFlags:DWORD;lParam:Pointer): Longint Function wChangeMenu(hMenu:HMENU;cmd:UINT;lpszNewItem:PKOLChar;cmdInsert:UINT;flags:UINT):BOOL; Function wCharLower( lpsz : PKOLChar) : PKOLChar Function wCharLowerBuff( lpsz : PKOLChar; cchLength : DWORD) : DWORD Function wCharNext( lpsz : PKOLChar) : PKOLChar //Function wCharNextEx( CodePage : Word; lpCurrentChar : LPCSTR; dwFlags : DWORD) : LPSTR Function wCharPrev( lpszStart : PKOLChar; lpszCurrent : PKOLChar) : PKOLChar // Function wCharPrevEx(CodePage:Word;lpStart,lpCurrentChar:LPCSTR; dwFlags:DWORD) : LPSTR Function wCharToOem( lpszSrc : PKOLChar; lpszDst : PKOLChar) : BOOL Function wCharToOemBuff( lpszSrc : PKOLChar; lpszDst : PKOLChar; cchDstLength : DWORD) : BOOL Function wCharUpper( lpsz : PKOLChar) : PKOLChar Function wCharUpperBuff( lpsz : PKOLChar; cchLength : DWORD) : DWORD Function wCopyAcceleratorTable(hAccelSrc:HACCEL; var lpAccelDst,cAccelEntries:Int) : Int Function wCreateAcceleratorTable( var Accel, Count : Int) : HACCEL //Function wCreateDesktop(lpszDesktop,lpszDevice:PKOLChar;pDevmode:PDeviceMode;dwFlags:DWORD;dwDesiredAccess:DWORD;lpsa:PSecurityAttribs):HDESK //Function wCreateDialogIndirectParam(hInstance:HINST;const lpTemplate:TDlgTemplate;hWndParent :HWND;lpDialogFunc:TFNDlgProc;dwInitParam:LPARAM):HWND //Function wCreateDialogParam(hInstance:HINST;lpTemplateName:PKOLChar;hWndParent:HWND;lpDialogFunc:TFNDlgProc;dwInitParam:LPARAM):HWND Function wCreateMDIWindow(lpClassName,lpWindowName:PKOLChar;dwStyle:DWORD;X,Y,nWidth,nHeight:Int;hWndParent:HWND;hInstance:HINST;lParam:LPARAM):HWND //Function wCreateWindowEx(dwExStyle:DWORD;lpClassName:PKOLChar;lpWindowName:PKOLChar;dwStyle DWORD;X,Y,nWidth, nHeight:Int WndParent:HWND;hMenu:HMENU;hInstance:HINST;lpParam:Pointer):HWND //Function wCreateWindowStation(lpwinsta:PKOLChar;dwReserv,dwDesiredAccess:DWORD;lpsa:PSecurityAttribs):HWINSTA; Function wDefDlgProc( hDlg : HWND; Msg : UINT; wParam : WPARAM; lParam : LPARAM) : LRESULT Function wDefFrameProc(hWnd,hWndMDIClient:HWND;uMsg:UINT;wParam:WPARAM;lParam:LPARAM):LRESULT; Function wDefMDIChildProc(hWnd:HWND;uMsg:UINT; wParam: WPARAM; lParam: LPARAM):LRESULT; Function wDefWindowProc( hWnd : HWND; Msg : UINT; wParam : WPARAM; lParam:LPARAM): LRESULT //Function wDialogBoxIndirectParam(hInstance:HINST;const lpDialogTemplate:TDlgTemplate; hWndParent:HWND;lpDialogFunc:TFNDlgProc;dwInitParam:LPARAM):Int //Function wDialogBoxParam(hInstance:HINST;lpTemplateName:PKOLChar;hWndParent:HWND;lpDialogFunc:TFNDlgProc;dwInitParam LPARAM): Int Function wDispatchMessage(const lpMsg : TMsg) : Longint Function wDlgDirList(hDlg:HWND;lpPathSpec:PKOLChar;nIDListBox,nIDStaticPath:Int;uFileType:UINT):Int; Function wDlgDirListComboBox(hDlg:HWND;lpPathSpec:PKOLChar;nIDComboBox,nIDStaticPath:Int;uFiletype:UINT):Int; Function wDlgDirSelectComboBoxEx(hDlg:HWND;lpString:PKOLChar;nCount,nIDComboBox:Int): BOOL Function wDlgDirSelectEx( hDlg : HWND; lpString : PKOLChar; nCount, nIDListBox : Int) : BOOL //FuncwDrawState(DC:HDC;Brush:HBRUSH;CBFunc:TFNDrawStateProc;lData:LPARA;wDat:WPARA;x,y,cx,cy:Int;Flags:UINT):BOOL; Function wDrawText(hDC:HDC;lpString:PKOLChar;nCount:Int;var lpRect:TRect;uFormat:UINT):Int; Function wFindWindow( lpClassName, lpWindowName : PKOLChar) : HWND Function wFindWindowEx( Parent, Child : HWND; ClassName, WindowName : PKOLChar) : HWND //Function wGetAltTabInfo(hwnd:HWND;iItem:Int;var pati:TAltTabInfo;pszItemText:PKOLChar;cchItemText:UINT):BOOL; // Function wGetClassInfo(hInstance:HINST;lpClassName:PKOLChar;var lpWndClass:TWndClass):BOOL //Function wGetClassInfoEx(Instance:HINST;Classname:PKOLChar;var WndClass:TWndClassEx):BOOL Function wGetClassLong( hWnd : HWND; nIndex : Int) : DWORD Function wGetClassName( hWnd : HWND; lpClassName : PKOLChar; nMaxCount : Int) : Int Function wGetClipboardFormatName(format:UINT; lpszFormatName:PKOLChar;cchMaxCount:Int):Int; Function wGetDlgItemText( hDlg: HWND;nIDDlgItem:Int;lpString:PKOLChar;nMaxCount:Int):UINT Function wGetKeyNameText( lParam : Longint; lpString : PKOLChar; nSize : Int) : Int Function wGetKeyboardLayoutName( pwszKLID : PKOLChar) : BOOL //Function wGetMenuItemInfo( p1 : HMENU; p2 : UINT; p3 : BOOL; var p4 : TMenuItemInfo) : BOOL Function wGetMenuString(hMenu:HMENU;uIDItem:UINT;lpString:PKOLChar;nMaxCount:Int;uFlag:UINT):Int; Function wGetMessage(var lpMsg:TMsg;hWnd:HWND;wMsgFilterMin wMsgFilterMax:UINT):BOOL Function wGetProp( hWnd : HWND; lpString : PKOLChar) : THandle //Function wGetTabbedTextExtent(hDC:HDC;lpString:PKOLChar;nCount,nTabPositions:Int;var lpnTabStopPositions):DWORD //Function wGetUserObjectInform(hObj:THandle;nIndex:Int;pvInfo:Ptr;nLength:DWORD;var lpnLengthNeed:DWORD)BOOL; Function wGetWindowLong( hWnd : HWND; nIndex : Int) : Longint Function wGetWindowModuleFileName(hwnd:HWND;pszFileName:PKOLChar;cchFileNameMax:UINT): UINT Function wGetWindowText( hWnd : HWND; lpString : PKOLChar; nMaxCount : Int) : Int Function wGetWindowTextLength( hWnd : HWND) : Int //Function wGrayString(hDC:HDC;hBrush:HBRUSH;lpOutFunc:TFNGrayStrProc;lpDat:LPARA;nCnt,X,Y,nWidt,nHeigt:Int):BOOL; Function wInsertMenu(hMenu:HMENU;uPosition,uFlags,uIDNewItem:UINT; lpNewItem: PKOLChar): BOOL //Function wInsertMenuItem(p1 : HMENU; p2 : UINT; p3 : BOOL; const p4 : TMenuItemInfo) : BOOL Function wIsCharAlpha( ch : KOLChar) : BOOL Function wIsCharAlphaNumeric( ch : KOLChar) : BOOL Function wIsCharLower( ch : KOLChar) : BOOL Function wIsCharUpper( ch : KOLChar) : BOOL Function wIsDialogMessage( hDlg : HWND; var lpMsg : TMsg) : BOOL Function wLoadAccelerators( hInstance : HINST; lpTableName : PKOLChar) : HACCEL Function wLoadBitmap( hInstance : HINST; lpBitmapName : PKOLChar) : HBITMAP Function wLoadCursor( hInstance : HINST; lpCursorName : PKOLChar) : HCURSOR Function wLoadCursorFromFile( lpFileName : PKOLChar) : HCURSOR Function wLoadIcon( hInstance : HINST; lpIconName : PKOLChar) : HICON Function wLoadImage(hInst:HINST;ImageName:PKOLChar;ImageType:UINT;X,Y:Int;Flags:UINT): THandle Function wLoadKeyboardLayout( pwszKLID : PKOLChar; Flags : UINT) : HKL Function wLoadMenu( hInstance : HINST; lpMenuName : PKOLChar) : HMENU //Function wLoadMenuIndirect( lpMenuTemplate : Pointer) : HMENU Function wLoadString(hInstance:HINST;uID: UINT; lpBuffer :PKOLChar;nBufferMax:Int):Int Function wMapVirtualKey( uCode, uMapType : UINT) : UINT Function wMapVirtualKeyEx( uCode, uMapType : UINT; dwhkl : HKL) : UINT Function wMessageBox( hWnd : HWND; lpText, lpCaption : PKOLChar; uType : UINT) : Int Function wMessageBoxEx(hWnd:HWND;lpText,lpCaption:PKOLChar;uType:UINT;wLanguageId:Word) Int //Function wMessageBoxIndirect( const MsgBoxParams : TMsgBoxParams) : BOOL Function wModifyMenu(hMnu: HMENU; uPosition,uFlags,uIDNewItem:UINT; lpNewItem:PKOLChar): BOOL //Function wOemToAnsi( const lpszSrc : LPCSTR; lpszDst : LPSTR) : BOOL //7Function wOemToAnsiBuff( lpszSrc : LPCSTR; lpszDst : LPSTR; cchDstLength : DWORD) : BOOL //Function wOemToChar( lpszSrc : PKOLChar; lpszDst : PKOLChar) : BOOL Function wOemToCharBuff( lpszSrc : PKOLChar; lpszDst : PKOLChar; cchDstLength : DWORD) : BOOL Function wOpenDesktop(lpszDesktop:PKOLChar;dwFlags:DWORD;fInherit:BOOL;dwDesiredAccess:DWORD): HDESK Function wOpenWindowStation(lpszWinSta:PKOLChar;fInherit:BOOL;dwDesiredAccess:DWORD):HWINSTA Function wPeekMessage(var lpMsg:TMsg;hWnd:HWND;wMsgFilterMin,wMsgFilterMax,wRemoveMsg:UINT):BOOL Function wPostMessage( hWnd : HWND; Msg : UINT; wParam : WPARAM; lParam : LPARAM) : BOOL Function wPostThreadMessage(idThread:DWORD;Msg:UINT; wParam : WPARAM; lParam:LPARAM) : BOOL Function wRealGetWindowClass( hwnd : HWND; pszType : PKOLChar; cchType : UINT) : UINT // Function wRegisterClass( const lpWndClass : TWndClass) : ATOM // Function wRegisterClassEx( const WndClass : TWndClassEx) : ATOM Function wRegisterClipboardFormat( lpszFormat : PKOLChar) : UINT // Function wRegisterDeviceNotification(hRecipient:THandle;NotificFilter:Pointer;Flags:DWORD):HDEVNOTIFY Function wRegisterWindowMessage( lpString : PKOLChar) : UINT Function wRemoveProp( hWnd : HWND; lpString : PKOLChar) : THandle Function wSendDlgItemMessage(hDlg:HWND;nIDDlgItem:Int;Msg:UINT;wParam:WPARAM;lParam:LPARAM):Longint; Function wSendMessage( hWnd : HWND; Msg : UINT; wParam : WPARAM; lParam : LPARAM): LRESULT //Function wSendMessageCallback(hWnd: HWND; Msg:UINT;wParam: WPARAM;lParam:LPARAM;lpResultCallBack:TFNSendAsyncProc;dwData DWORD):BOOL Function wSendMessageTimeout(hWnd:HWND;Msg:UINT;wParam:WPARAM;lParam:LPARAM;fuFlags,uTimeout:UINT;var lpdwResult:DWORD):LRESULT Function wSendNotifyMessage( hWnd : HWND; Msg : UINT; wParam : WPARAM; lParam : LPARAM) : BOOL Function wSetClassLong( hWnd : HWND; nIndex : Int; dwNewLong : Longint) : DWORD Function wSetDlgItemText( hDlg : HWND; nIDDlgItem : Int; lpString : PKOLChar) : BOOL //Function wSetMenuItemInfo(p1: HMENU; p2: UINT; p3: BOOL; const p4: TMenuItemInfo) : BOOL Function wSetProp( hWnd : HWND; lpString : PKOLChar; hData : THandle) : BOOL // Function wSetUserObjectInformation(hObj:THandle;nIndex:Int;pvInfo:Pointer;nLength:DWORD):BOOL Function wSetWindowLong( hWnd : HWND; nIndex : Int; dwNewLong : Longint) : Longint Function wSetWindowText( hWnd : HWND; lpString : PKOLChar) : BOOL //Function wSetWindowsHook( nFilterType : Int; pfnFilterProc : TFNHookProc) : HHOOK //Function wSetWindowsHookEx(idHook:Int;lpfn:TFNHookProc;hmod:HINST;dwThreadId:DWORD):HHOOK; // Function wSystemParametersInfo(uiAction,uiParam:UINT; pvParam:Pointer; fWinIni: UINT):BOOL Function wTabbedTextOut(hDC:HDC;X,Y:Int;lpString:PKOLChar;nCount,nTabPositions:Int;var lpnTabStopPositions,nTabOrigin:Int):Longint; Function wTranslateAccelerator( hWnd : HWND; hAccTable : HACCEL; var lpMsg : TMsg) : Int Function wUnregisterClass( lpClassName : PKOLChar; hInstance : HINST) : BOOL Function wVkKeyScan( ch : KOLChar) : SHORT Function wVkKeyScanEx( ch : KOLChar; dwhkl : HKL) : SHORT Function wWinHelp(hWndMain:HWND;lpszHelp : PKOLChar; uCommand : UINT;dwData:DWORD):BOOL Function wwsprintf( Output : PKOLChar; Format : PKOLChar) : Int Function wwvsprintf( Output : PKOLChar; Format: PKOLChar; arglist : va_list) : Int //TestDrive! 'SID_REVISION','LongInt'(1);'FILENAME_ADVAPI32','String').SetString('ADVAPI32.DLL 'PROC_CONVERTSIDTOSTRINGSIDA','String').SetString( 'ConvertSidToStringSidA Function GetDomainUserSidS(const domainName:String;const userName:String;var foundDomain:String):String; Function GetLocalUserSidStr( const UserName : string) : string Function getPid4user( const domain : string; const user : string; var pid : dword) : boolean Function Impersonate2User( const domain : string; const user : string) : boolean Function GetProcessUserBypid( pid : DWORD; var UserName, Domain : AnsiString) : Boolean Function KillProcessbyname( const exename : string; var found : Int) : Int Function getWinProcessList : TStringList function WaitTilClose(hWnd: Int): Int; function DoUserMsgs: Boolean; function MsgFunc(hWnd,Msg,wParam,lParam:Int):Int; stdcall; procedure ShowMsg(hParent: Int; const Mess, Title: String); //modal but NOT blockable procedure DeleteMsgForm(Handle: Int); procedure DisableForms; function FoundTopLevel(hWnd, LParam: Int): BOOL; StdCall; end; procedure SIRegister_AfSafeSync(CL: TPSPascalCompiler); begin 'AfMaxSyncSlots','LongInt'( 64); 'AfSynchronizeTimeout','LongInt'( 2000); TAfSyncSlotID', 'DWORD TAfSyncStatistics','record MessagesCount:Int;TimeoutMessages:Int;DisabledMessages:Int;end; TAfSafeSyncEvent', 'Procedure ( ID : TAfSyncSlotID) TAfSafeDirectSyncEvent', 'Procedure Function AfNewSyncSlot( const AEvent : TAfSafeSyncEvent) : TAfSyncSlotID Function AfReleaseSyncSlot( const ID : TAfSyncSlotID) : Boolean Function AfEnableSyncSlot( const ID : TAfSyncSlotID; Enable : Boolean) : Boolean Function AfValidateSyncSlot( const ID : TAfSyncSlotID) : Boolean Function AfSyncEvent( const ID : TAfSyncSlotID; Timeout : DWORD) : Boolean Function AfDirectSyncEvent( Event : TAfSafeDirectSyncEvent; Timeout : DWORD) : Boolean Function AfIsSyncMethod : Boolean Function AfSyncWnd : HWnd Function AfSyncStatistics : TAfSyncStatistics Procedure AfClearSyncStatistics end; procedure SIRegister_AfComPortCore(CL: TPSPascalCompiler); begin 'fBinary','LongWord')( $00000001); 'fParity','LongWord'( $00000002); 'fOutxCtsFlow','LongWord').SetUInt( $00000004); 'fOutxDsrFlow','LongWord')( $00000008); 'fDtrControl','LongWord')( $00000030); 'fDtrControlDisable','LongWord')( $00000000); 'fDtrControlEnable','LongWord')( $00000010); 'fDtrControlHandshake','LongWord')( $00000020); 'fDsrSensitivity','LongWord')( $00000040); 'fTXContinueOnXoff','LongWord')( $00000080); 'fOutX','LongWord')( $00000100); 'fInX','LongWord')( $00000200); 'fErrorChar','LongWord')( $00000400); 'fNull','LongWord')( $00000800); 'fRtsControl','LongWord')( $00003000); 'fRtsControlDisable','LongWord')( $00000000); 'fRtsControlEnable','LongWord')( $00001000); 'fRtsControlHandshake','LongWord')( $00002000); 'fRtsControlToggle','LongWord')( $00003000); 'fAbortOnError','LongWord')( $00004000); 'fDummy2','LongWord')( $FFFF8000); TAfCoreEvent', '( ceOutFree, ceLineEvent, ceNeedReadData, ceException ) FindClass('TOBJECT'),'EAfComPortCoreError FindClass('TOBJECT'),'TAfComPortCore TAfComPortCoreEvent', 'Procedure ( Sender : TAfComPortCore; Even' +'tKind : TAfCoreEvent; Data : DWORD) SIRegister_TAfComPortCoreThread(CL); SIRegister_TAfComPortEventThread(CL); SIRegister_TAfComPortWriteThread(CL); SIRegister_TAfComPortCore(CL); Function FormatDeviceName( PortNumber : Int) : string end; procedure SIRegister_ApplicationFileIO(CL: TPSPascalCompiler); begin TAFIOFileStreamEvent', 'Function ( const fileName : String; mode: Word) : TStream TAFIOFileStreamExistsEvent', 'Function ( const fileName : String) : Boolean SIRegister_TApplicationFileIO(CL); TDataFileCapability', '( dfcRead, dfcWrite ) TDataFileCapabilities', 'set of TDataFileCapability SIRegister_TDataFile(CL); //TDataFileClass', 'class of TDataFile Function ApplicationFileIODefined : Boolean Function CreateFileStream(const fileName: String; mode: WordfmShareDenyNone):TStream Function FileStreamExists(const fileName: String) : Boolean //Procedure Register end; procedure SIRegister_ALFBXLib(CL: TPSPascalCompiler); begin TALFBXFieldType', '( uftUnKnown, uftNumeric, uftChar, uftVarchar' +', uftCstring, uftSmallint, uftInt, uftQuad, uftFloat, uftDoublePrecisi' +'on, uftTimestamp, uftBlob, uftBlobId, uftDate, uftTime, uftInt64, uftArray, uftNull ) TALFBXScale', 'Int FindClass('TOBJECT'),'EALFBXConvertError SIRegister_EALFBXError(CL); SIRegister_EALFBXException(CL); FindClass('TOBJECT'),'EALFBXGFixError FindClass('TOBJECT'),'EALFBXDSQLError FindClass('TOBJECT'),'EALFBXDynError FindClass('TOBJECT'),'EALFBXGBakError FindClass('TOBJECT'),'EALFBXGSecError FindClass('TOBJECT'),'EALFBXLicenseError FindClass('TOBJECT'),'EALFBXGStatError //EALFBXExceptionClass', 'class of EALFBXError TALFBXCharacterSet', '( csNONE, csASCII, csBIG_5, csCYRL, csDOS4' +'37, csDOS850, csDOS852, csDOS857, csDOS860, csDOS861, csDOS863, csDOS865, ' +'csEUCJ_0208, csGB_2312, csISO8859_1, csISO8859_2, csKSC_5601, csNEXT, csOC' +'TETS, csSJIS_0208, csUNICODE_FSS, csUTF8, csWIN1250, csWIN1251, csWIN1252,' +' csWIN1253, csWIN1254, csDOS737, csDOS775, csDOS858, csDOS862, csDOS864, c' +'sDOS866, csDOS869, csWIN1255, csWIN1256, csWIN1257, csISO8859_3, csISO8859' +'_4, csISO8859_5, csISO8859_6, csISO8859_7, csISO8859_8, csISO8859_9, csISO' +'8859_13, csKOI8R, csKOI8U, csWIN1258, csTIS620, csGBK, csCP943C ) TALFBXTransParam', '( tpConsistency, tpConcurrency, tpShared, tp' +'Protected, tpExclusive, tpWait, tpNowait, tpRead, tpWrite, tpLockRead, tpL' +'ockWrite, tpVerbTime, tpCommitTime, tpIgnoreLimbo, tpReadCommitted, tpAuto' +'Commit, tpRecVersion,tpNoRecVersion,tpRestartRequests, tpNoAutoUndo, tpLockTimeout ) TALFBXTransParams', 'set of TALFBXTransParam Function ALFBXStrToCharacterSet( const CharacterSet : AnsiString) : TALFBXCharacterSet Function ALFBXCreateDBParams( Params : AnsiString; Delimiter : Char) : AnsiString Function ALFBXCreateBlobParams( Params : AnsiString; Delimiter : Char) : AnsiString 'cALFBXMaxParamLength','LongInt'( 125); TALFBXParamsFlag', '( pfNotInitialized, pfNotNullable ) TALFBXParamsFlags', 'set of TALFBXParamsFlag //PALFBXSQLVar', '^TALFBXSQLVar // will not work //PALFBXSQLDaData', '^TALFBXSQLDaData // will not work TALFBXStatementType', '( stSelect, stInsert, stUpdate, stDelete,' +' stDDL, stGetSegment, stPutSegment, stExecProcedure, stStartTrans, stCommi' +'t, stRollback, stSelectForUpdate, stSetGenerator, stSavePoint ) SIRegister_TALFBXSQLDA(CL); //PALFBXPtrArray', '^TALFBXPtrArray // will not work SIRegister_TALFBXPoolStream(CL); //PALFBXBlobData', '^TALFBXBlobData // will not work TALFBXBlobData', 'record Size : Int; Buffer : string; end //PALFBXArrayDesc', '^TALFBXArrayDesc // will not work //TALFBXArrayDesc', 'TISCArrayDesc //TALFBXBlobDesc', 'TISCBlobDesc //PALFBXArrayInfo', '^TALFBXArrayInfo // will not work //TALFBXArrayInfo', 'record index : Int; size : Int; info: TALFBXArrayDesc; end SIRegister_TALFBXSQLResult(CL); //TALFBXSQLResultClass', 'class of TALFBXSQLResult SIRegister_TALFBXSQLParams(CL); //TALFBXSQLParamsClass', 'class of TALFBXSQLParams TALFBXDSQLInfoData', 'record InfoCode : byte; InfoLen : Word; St' +'atementType : TALFBXStatementType; end FindClass('TOBJECT'),'TALFBXLibrary //PALFBXStatusVector', '^TALFBXStatusVector // will not work TALFBXOnConnectionLost', 'Procedure ( Lib : TALFBXLibrary) //TALFBXOnGetDBExceptionClass', 'Procedure ( Number : Int; out' //+' Excep : EALFBXExceptionClass) SIRegister_TALFBXLibrary(CL); 'cAlFBXDateOffset','LongInt'( 15018); 'cALFBXTimeCoeff','LongInt'( 864000000); //Procedure ALFBXDecodeTimeStamp( v : PISCTimeStamp; out DateTime : Double); //Procedure ALFBXDecodeTimeStamp1( v : PISCTimeStamp; out TimeStamp : TTimeStamp); //Function ALFBXDecodeTimeStamp2( v : PISCTimeStamp) : Double; Procedure ALFBXDecodeSQLDate( v : Int; out Year : SmallInt; out Month, Day : Word) Procedure ALFBXDecodeSQLTime(v:Cardinal;out Hour,Minute,Second:Word; out Fractions: LongWord) //Procedure ALFBXEncodeTimeStamp( const DateTime : TDateTime; v : PISCTimeStamp); //Procedure ALFBXEncodeTimeStamp1( const Date : Int; v : PISCTimeStamp); //Procedure ALFBXEncodeTimeStamp2( const Time : Cardinal; v : PISCTimeStamp); Function ALFBXEncodeSQLDate( Year : Int; Month, Day : Int) : Int Function ALFBXEncodeSQLTime( Hour, Minute, Second : Word; var Fractions : LongWord): Cardinal TALFBXParamType', '( prNone, prByte, prShrt, prCard, prStrg, prIgno ) TALFBXDPBInfo', 'record Name : AnsiString; ParamType : TALFBXParamType; end Function ALFBXSQLQuote( const name : AnsiString) : AnsiString Function ALFBXSQLUnQuote( const name : AnsiString) : AnsiString end; procedure SIRegister_ALFBXClient(CL: TPSPascalCompiler); begin TALFBXClientSQLParam', 'record Value : AnsiString; IsNull : Boolean; end TALFBXClientSQLParams', 'array of TALFBXClientSQLParam TALFBXClientSelectDataSQL', 'record SQL : AnsiString; Params : T' +'ALFBXClientSQLParams; RowTag : AnsiString; ViewTag : AnsiString; Skip : in' +'teger; First : Int; CacheThreshold : Int; end TALFBXClientSelectDataSQLs', 'array of TALFBXClientSelectDataSQL TALFBXClientUpdateDataSQL', 'record SQL : AnsiString; Params: TALFBXClientSQLParams; end TALFBXClientUpdateDataSQLs', 'array of TALFBXClientUpdateDataSQL TALFBXClientMonitoringIOStats','record page_reads:int64;page_writes:int64;page_fetches:int64;page_marks:int64;end SIRegister_TALFBXClient(CL); SIRegister_TALFBXConnectionStatementPoolBinTreeNode(CL); SIRegister_TALFBXConnectionStatementPoolBinTree(CL); SIRegister_TALFBXConnectionWithStmtPoolContainer(CL); SIRegister_TALFBXConnectionWithoutStmtPoolContainer(CL); SIRegister_TALFBXReadTransactionPoolContainer(CL); SIRegister_TALFBXReadStatementPoolContainer(CL); SIRegister_TALFBXStringKeyPoolBinTreeNode(CL); SIRegister_TALFBXConnectionPoolClient(CL); SIRegister_TALFBXEventThread(CL); Function AlMySqlClientSlashedStr( const Str : AnsiString) : AnsiString end; procedure SIRegister_ovcBidi(CL: TPSPascalCompiler); begin _OSVERSIONINFOA = record dwOSVersionInfoSize: DWORD; dwMajorVersion: DWORD; dwMinorVersion: DWORD; dwBuildNumber: DWORD; dwPlatformId: DWORD; szCSDVersion: array[0..127] of AnsiChar; { Maintenance AnsiString for PSS usage } end; TOSVersionInfoA', '_OSVERSIONINFOA TOSVersionInfo', 'TOSVersionInfoA 'WS_EX_RIGHT','LongWord')( $00001000); 'WS_EX_LEFT','LongWord')( $00000000); 'WS_EX_RTLREADING','LongWord')( $00002000); 'WS_EX_LTRREADING','LongWord')( $00000000); 'WS_EX_LEFTSCROLLBAR','LongWord')( $00004000); 'WS_EX_RIGHTSCROLLBAR','LongWord')( $00000000); Function SetProcessDefaultLayout( dwDefaultLayout : DWORD) : BOOL 'LAYOUT_RTL','LongWord')( $00000001); 'LAYOUT_BTT','LongWord')( $00000002); 'LAYOUT_VBH','LongWord')( $00000004); 'LAYOUT_BITMAPORIENTATIONPRESERVED','LongWord')( $00000008); 'NOMIRRORBITMAP','LongWord')( DWORD ( $80000000 )); Function SetLayout( dc : HDC; dwLayout : DWORD) : DWORD Function GetLayout( dc : hdc) : DWORD Function IsBidi : Boolean Function GetCurrentHwProfile( var lpHwProfileInfo : THWProfileInfo) : BOOL Function GetVersionEx( var lpVersionInformation : TOSVersionInfo) : BOOL Function SetPriorityClass( hProcess : THandle; dwPriorityClass: DWORD) : BOOL Function GetPriorityClass( hProcess : THandle) : DWORD Function OpenClipboard( hWndNewOwner : HWND) : BOOL Function CloseClipboard : BOOL Function GetClipboardSequenceNumber : DWORD Function GetClipboardOwner : HWND Function SetClipboardViewer( hWndNewViewer : HWND) : HWND Function GetClipboardViewer : HWND Function ChangeClipboardChain( hWndRemove, hWndNewNext : HWND) : BOOL Function SetClipboardData( uFormat : UINT; hMem : THandle) : THandle Function GetClipboardData( uFormat : UINT) : THandle Function RegisterClipboardFormat( lpszFormat : PChar) : UINT Function CountClipboardFormats : Int Function EnumClipboardFormats( format : UINT) : UINT Function GetClipboardFormatName(format:UINT;lpszFormatName:PChar;cchMaxCount:Int):Int Function EmptyClipboard : BOOL Function IsClipboardFormatAvailable( format : UINT) : BOOL Function GetPriorityClipboardFormat( var paFormatPriorityList, cFormats : Int) : Int Function GetOpenClipboardWindow : HWND Function EndDialog( hDlg : HWND; nResult : Int) : BOOL Function GetDlgItem( hDlg : HWND; nIDDlgItem : Int) : HWND Function SetDlgItemInt(hDlg:HWND; nIDDlgItem : Int; uValue : UINT; bSigned: BOOL): BOOL Function GetDlgItemInt(hDlg:HWND;nIDDlgItem:Int;var lpTranslated:BOOL;bSigned: BOOL): UINT Function SetDlgItemText( hDlg : HWND; nIDDlgItem : Int; lpString : PChar) : BOOL Function CheckDlgButton( hDlg : HWND; nIDButton : Int; uCheck : UINT) : BOOL Function CheckRadioButton(hDlg:HWND;nIDFirstButton,nIDLastButton,nIDCheckButton:Int):BOOL Function IsDlgButtonChecked( hDlg : HWND; nIDButton : Int) : UINT Function SendDlgItemMessage(hDlg:HWND;nIDDlgItem:Int;Msg:UINT;wParam:WPARAM;lParam:LPARAM):Longint; end; procedure SIRegister_DXPUtils(CL: TPSPascalCompiler); begin Function glExecuteAndWait(cmdLine:String;visibility:Word;timeout:Cardinal;killAppOnTimeOut:Bool):Int; Function GetTemporaryFilesPath : String Function GetTemporaryFileName : String Function FindFileInPaths( const fileName, paths : String) : String Function PathsToString( const paths : TStrings) : String Procedure StringToPaths( const pathsString : String; paths : TStrings) //Function MacroExpandPath( const aPath : String) : String end; procedure SIRegister_ALMultiPartBaseParser(CL: TPSPascalCompiler); begin SIRegister_TALMultiPartBaseContent(CL); SIRegister_TALMultiPartBaseContents(CL); SIRegister_TAlMultiPartBaseStream(CL); SIRegister_TALMultipartBaseEncoder(CL); SIRegister_TALMultipartBaseDecoder(CL); Function ALMultipartExtractBoundaryFromContentType( aContentType : AnsiString) : AnsiString Function ALMultipartExtractSubValueFromHeaderLine(aHeaderLine:AnsiString;aName:AnsiString):AnsiString; Function ALMultipartSetSubValueInHeaderLine(aHeaderLine:AnsiString;aName,AValue:AnsiString):AnsiString; end; procedure SIRegister_SmallUtils(CL: TPSPascalCompiler); begin TdriveSize', 'record FreeS : Int64; TotalS : Int64; end TWinVerRec', 'record WinPlatform : Int; WinMajorVersion : In' +teger; WinMinorVersion :Int; WinBuildNumber : Int; WinCSDVersion: String; end Function aAllocPadedMem( Size : Cardinal) : TObject Procedure aFreePadedMem( var P : TObject); Procedure aFreePadedMem1( var P : PChar); Function aCheckPadedMem( P : Pointer) : Byte Function aGetPadMemSize( P : Pointer) : Cardinal Function aAllocMem( Size : Cardinal) : Pointer Function aStrLen( const Str : PChar) : Cardinal Function aStrLCopy( Dest : PChar; const Source : PChar; MaxLen : Cardinal) : PChar Function aStrECopy( Dest : PChar; const Source : PChar) : PChar Function aStrCopy( Dest : PChar; const Source : PChar) : PChar Function aStrEnd( const Str : PChar) : PChar Function aStrScan( const Str : PChar; aChr : Char) : PChar Function aStrMove( Dest : PChar; const Source : PChar; Count : Cardinal) : PChar Function aPCharLength( const Str : PChar) : Cardinal Function aPCharUpper( Str : PChar) : PChar Function aPCharLower( Str : PChar) : PChar Function aStrCat( Dest : PChar; const Source : PChar) : PChar Function aLastDelimiter( const Delimiters, S : String) : Int Function aCopyTail( const S : String; Len : Int) : String Function aInt2Thos( I : Int64) : String Function aUpperCase( const S : String) : String Function aLowerCase( const S : string) : String Function aCompareText( const S1, S2 : string) : Int Function aSameText( const S1, S2 : string) : Boolean Function aInt2Str( Value : Int64) : String Function aStr2Int( const Value : String) : Int64 Function aStr2IntDef( const S : string; Default : Int64) : Int64 Function aGetFileExt( const FileName : String) : String Function aGetFilePath( const FileName : String) : String Function aGetFileName( const FileName : String) : String Function aChangeExt( const FileName, Extension : String) : String Function aAdjustLineBreaks( const S : string) : string Function aGetWindowStr( WinHandle : HWND) : String Function aDiskSpace( Drive : String) : TdriveSize Function aFileExists( FileName : String) : Boolean Function aFileSize( FileName : String) : Int64 Function aDirectoryExists( const Name : string) : Boolean Function aSysErrorMessage( ErrorCode : Int) : string Function aShortPathName( const LongName : string) : string Function aGetWindowVer : TWinVerRec procedure InitDriveSpacePtr; end; procedure SIRegister_MakeApp(CL: TPSPascalCompiler); begin aZero','LongInt'( 0); 'makeappDEF','LongInt'( - 1); 'CS_VREDRAW','LongInt'( DWORD ( 1 )); 'CS_HREDRAW','LongInt'( DWORD ( 2 )); 'CS_KEYCVTWINDOW','LongInt'( 4); 'CS_DBLCLKS','LongInt'( 8); 'CS_OWNDC','LongWord')( $20); 'CS_CLASSDC','LongWord')( $40); 'CS_PARENTDC','LongWord')( $80); 'CS_NOKEYCVT','LongWord')( $100); 'CS_NOCLOSE','LongWord')( $200); 'CS_SAVEBITS','LongWord')( $800); 'CS_BYTEALIGNCLIENT','LongWord')( $1000); 'CS_BYTEALIGNWINDOW','LongWord')( $2000); 'CS_GLOBALCLASS','LongWord')( $4000); 'CS_IME','LongWord')( $10000); 'CS_DROPSHADOW','LongWord')( $20000); //PPanelFunc', '^TPanelFunc // will not work TPanelStyle', '(psEdge, psTabEdge, psBorder, psTabBorder, psTab, psNone ) TFontLook', '( flBold, flItalic, flUnderLine, flStrikeOut ) TFontLooks', 'set of TFontLook TMessagefunc','function(hWnd,iMsg,wParam,lParam:Int):Int) Function SetWinClass(const ClassName:String; pMessFunc: Tmessagefunc; wcStyle : Int): Word Function SetWinClassO( const ClassNam:String; pMessFunc: TObject; wcStyle : Int): Word Function SetWinClass(const ClassName:String; pMessFunc : TObject; wcStyle : Int) : Word Function MakeForm(Left,Top,Width,Height:Int;const Caption:String;WinStyle:Int):Int Procedure RunMsgLoop( Show : Boolean) Function MakeFont(Height,Width:Int;const FontName:String; Look:TFontLooks;Roman:Boolean):Int Function MakeButton(Left,Top,Width,Height:Int;pCaption:PChar;hParent,ID_Number:Cardinal;hFont:Int):Int; Function MakeListBox(Left,Top,Width,Height,Parent:Int;const ListItems:String;WinStyle:Int):Int Function MakeComboBox(Left,Top,Width,Height,Parent:Int;const ListItems:String;WinStyle:Int):Int Function MakePanel(Left,Top,Width,Height,hParent:Int;WndFunc:TPanelFunc;ID_Number:Card;Style:TPanelStyle):Int; Function MakeSubMenu(const ItemList : String; ID1, ID2 : Cardinal; hMenu : Int) : Int Function id4menu( a, b : Byte; c : Byte; d : Byte) : Cardinal Procedure DoInitMakeApp //set first to init formclasscontrol! end; procedure SIRegister_ScreenSaver(CL: TPSPascalCompiler); begin TScreenSaverOption', '( ssoAutoAdjustFormProperties, ssoAutoHook' +KeyboardEvents, ssoAutoHookMouseEvents, ssoEnhancedMouseMoveDetection ) TScreenSaverOptions', 'set of TScreenSaverOption 'cDefaultScreenSaverOptions','LongInt').Value.ts32:=ord(ssoAutoAdjustFormProperties) or ord(ssoAutoHookKeyboardEvents) or ord(ssoEnhancedMouseMoveDetection); TScreenSaverPreviewEvent', 'Procedure ( Sender : TObject; previewHwnd: HWND) SIRegister_TScreenSaver(CL); //Procedure Register Procedure SetScreenSaverPassword end; procedure SIRegister_XCollection(CL: TPSPascalCompiler); begin FindClass('TOBJECT'),'TXCollection SIRegister_EFilerException(CL); SIRegister_TXCollectionItem(CL); //TXCollectionItemClass', 'class of TXCollectionItem SIRegister_TXCollection(CL); Procedure RegisterXCollectionDestroyEvent( notifyEvent : TNotifyEvent) Procedure DeRegisterXCollectionDestroyEvent( notifyEvent : TNotifyEvent) Procedure RegisterXCollectionItemClass( aClass : TXCollectionItemClass) Procedure UnregisterXCollectionItemClass( aClass : TXCollectionItemClass) Function FindXCollectionItemClass( const className : String) : TXCollectionItemClass Function GetXCollectionItemClassesList( baseClass : TXCollectionItemClass) : TList end; procedure SIRegister_XOpenGL(CL: TPSPascalCompiler); begin TMapTexCoordMode', '(mtcmUndefined, mtcmNull, mtcmMain, mtcmDual, mtcmSecond,mtcmArbitrary); Procedure xglMapTexCoordToNull Procedure xglMapTexCoordToMain Procedure xglMapTexCoordToSecond Procedure xglMapTexCoordToDual Procedure xglMapTexCoordToArbitrary( const units : array of Cardinal); Procedure xglMapTexCoordToArbitrary1( const bitWiseUnits : Cardinal); Procedure xglMapTexCoordToArbitraryAdd( const bitWiseUnits : Cardinal) Procedure xglBeginUpdate Procedure xglEndUpdate Procedure xglPushState Procedure xglPopState Procedure xglForbidSecondTextureUnit Procedure xglAllowSecondTextureUnit Function xglGetBitWiseMapping : Cardinal end; procedure SIRegister_VectorLists(CL: TPSPascalCompiler); begin TBaseListOption', '( bloExternalMemory, bloSetCountResetsMemory) TBaseListOptions', 'set of TBaseListOption SIRegister_TBaseList(CL); SIRegister_TBaseVectorList(CL); SIRegister_TAffineVectorList(CL); SIRegister_TVectorList(CL); SIRegister_TTexPointList(CL); SIRegister_TXIntList(CL); //PSingleArrayList', '^TSingleArrayList // will not work SIRegister_TSingleList(CL); SIRegister_TByteList(CL); SIRegister_TQuaternionList(CL); Procedure QuickSortLists(startIndex,endIndex:Int;refList:TSingleList; objList : TList); Procedure QuickSortLists1(startIndex,endIndex:Int;refList: TSingleList; objList: TBaseList); Procedure FastQuickSortLists(startIndex,endIndex:Int;refList:TSingleList;objList:TPersistentObjectList); end; ********** File C:\maXbox\maxbox3\maxbox3\maXbox3\source\REST\uPSI_UIntList.pas File C:\maXbox\maxbox3\maxbox3\maXbox3\source\JvJCLUtils.pas { compile-time registration functions } 24: procedure SIRegister_TIntList(CL: TPSPascalCompiler); procedure SIRegister_UIntList(CL: TPSPascalCompiler); { run-time registration functions } 28: procedure RIRegister_TIntList(CL: TPSRuntimeClassImporter); procedure RIRegister_UIntList(CL: TPSRuntimeClassImporter); (*----------------------------------------------------------------------------*) 49: procedure SIRegister_TIntList(CL: TPSPascalCompiler); 51: //with RegClassS(CL,'TPersistent', 'TIntList') do with ClassN(CL.FindClass('TPersistent'),'TIntList') do begin with ClassN(CL.FindClass('TList'),'TIntList') do begin //with RegClassS(CL,'TPersistent', 'TIntList') do TIntList = class(TPersistent) private FUpDateCount: Int; FList: PIntItemList; FCount: Int; FCapacity: Int; FSorted: Boolean; FDuplicates: TDuplicates; FOnChange: TNotifyEvent; FOnChanging: TNotifyEvent; procedure ExchangeItems(Index1, Index2: Int); procedure Grow; procedure QuickSort(L, R: Int; SCompare: TIntListSortCompare); procedure InsertItem(Index: Int; const S: int64); procedure SetSorted(Value: Boolean); protected procedure Error(const Msg: string; Data: Int); procedure Changed; virtual; procedure Changing; virtual; function Get(Index: Int): int64; function GetCapacity: Int; //function GetCount: Int; function GetObject(Index: Int): TObject; procedure Put(Index: Int; const S: int64); procedure PutObject(Index: Int; AObject: TObject); procedure SetCapacity(NewCapacity: Int); procedure SetUpdateState(Updating: Boolean); public function GetCount: Int; destructor Destroy; override; function Add(const S: int64): Int; function AddObject(const S: int64; AObject: TObject): Int; virtual; procedure Clear; procedure Delete(Index: Int); procedure Exchange(Index1, Index2: Int); function Find(const S: int64; var Index: Int): Boolean; virtual; function IndexOf(const S: int: Int; procedure Insert(Index: Int; const S: int64); procedure Sort; virtual; procedure CustomSort(Compare: TIntListSortCompare); virtual; procedure LoadFromFile(const FileName: string); virtual; procedure LoadFromStream(Stream:TStream); virtual; procedure SaveToFile(const FileName: string); virtual; procedure SaveToStream(Stream: TStream); property Duplicates: TDuplicates read FDuplicates write FDuplicates; property Sorted: Boolean read FSorted write SetSorted; property OnChange: TNotifyEvent read FOnChange write FOnChange; property OnChanging: TNotifyEvent read FOnChanging write FOnChanging; property Ints [Index: Int]: int64 read Get write Put; default; property Count: Int read GetCount; property Objects[Index: Int]: TObject read GetObject write PutObject; end; procedure SIRegister_MeshUtils(CL: TPSPascalCompiler); begin Procedure ConvertStripToList( const strip : TAffineVectorList; list : TAffineVectorList); Procedure ConvertStripToList1( const strip : TIntList; list : TIntList); Procedure ConvertStripToList2(const strip:TAffineVectorList;const indices:TIntList;list:TAffineVectorList); Procedure ConvertIndexedListToList(const data:TAffineVectlist;const indices:TIntList;list:TAffineVectorList); Function BuildVectorCountOptimizedIndices(const vertices:TAffineVectorList; const normals:TAffineVectorList; const texCoords : TAffineVectorList) : TIntList Procedure RemapReferences( reference : TAffineVectorList; const indices : TIntList); Procedure RemapReferences1( reference : TIntList; const indices : TIntList); Procedure RemapAndCleanupReferences( reference : TAffineVectorList; indices : TIntList) Function RemapIndicesToIndicesMap( remapIndices : TIntList) : TIntList Procedure RemapTrianglesIndices( indices, indicesMap : TIntList) Procedure RemapIndices( indices, indicesMap : TIntList) Procedure UnifyTrianglesWinding( indices : TIntList) Procedure InvertTrianglesWinding( indices : TIntList) Function BuildNormals( reference : TAffineVectorList; indices : TIntList) : TAffineVectorList Function BuildNonOrientedEdgesList(triangleIndices:TIntList;triangleEdges:TIntList;edgesTriangles:TIntList):TIntList Procedure WeldVertices(vertices:TAffineVectorList;indicesMap:TIntList;weldRadius: Single) Function StripifyMesh(indices:TIntList;maxVertexIndex:Int;agglomerateLoneTriangles:Boolean): TPersistentObjectList; Procedure IncreaseCoherency(indices : TIntList; cacheSize : Int) Procedure SubdivideTriangles(smoothFactor:Single;vertices:TAffineVectorList;triangleIndices:TIntList;normals:TAffineVectorList;onSubdivideEdge:TSubdivideEdgeEvent) end; procedure SIRegister_JclSysUtils(CL: TPSPascalCompiler); begin Procedure GetAndFillMem( var P : TObject; const Size : Int; const Value : Byte) Procedure FreeMemAndNil( var P : TObject) Function PCharOrNil( const S : string) : PChar SIRegister_TJclReferenceMemoryStream(CL); FindClass('TOBJECT'),'EJclVMTError {Function GetVirtualMethodCount( AClass : TClass) : Int Function GetVirtualMethod( AClass : TClass; const Index : Int) : Pointer Procedure SetVirtualMethod( AClass : TClass; const Index : Int; const Method:Pointer) PDynamicIndexList', '^TDynamicIndexList // will not work PDynamicAddressList', '^TDynamicAddressList // will not work Function GetDynamicMethodCount( AClass : TClass) : Int Function GetDynamicIndexList( AClass : TClass) : PDynamicIndexList Function GetDynamicAddressList( AClass : TClass) : PDynamicAddressList Function HasDynamicMethod( AClass : TClass; Index : Int) : Boolean Function GetDynamicMethod( AClass : TClass; Index : Int) : Pointer Function GetInitTable( AClass : TClass) : PTypeInfo PFieldEntry', '^TFieldEntry // will not work} TFieldEntry', 'record OffSet : Int; IDX : Word; Name : ShortString; end Function JIsClass( Address : Pointer) : Boolean Function JIsObject( Address : Pointer) : Boolean Function GetImplementorOfInterface( const I : IInterface) : TObject TDigitCount', 'Int SIRegister_TJclNumericFormat(CL); Function JIntToStrZeroPad( Value, Count : Int) : AnsiString TTextHandler', 'Procedure ( const Text : string) // 'ABORT_EXIT_CODE','LongInt'( ERROR_CANCELLED 1223); Function JExecute(const CommandLine:string;OutputLineCallback:TTextHandler;RawOutpt:Bool;AbortPtr:PBool):Card; Function JExecute1(const CommandLine:string;var Output:string;RawOutput:Bool;AbortPtr:PBool):Cardinal; Function ReadKey : Char //to and from the DOS console ! TModuleHandle', 'HINST //TModuleHandle', 'Pointer 'INVALID_MODULEHANDLE_VALUE','LongInt'( TModuleHandle ( 0 )); Function LoadModule( var Module : TModuleHandle; FileName : string) : Boolean Function LoadModuleEx(var Module: TModuleHandle; FileName:string;Flags:Cardinal): Boolean Procedure UnloadModule( var Module : TModuleHandle) Function GetModuleSymbol( Module : TModuleHandle; SymbolName : string) : Pointer Function GetModuleSymbolEx(Module:TModuleHandle;SymbolName:string;var Accu:Boolean):Pointer Function ReadModuleData(Module:TModuleHandle;SymbolName:string;var Buffer,Size:Cardinal):Bool; Function WriteModuleData(Module:TModuleHandle;SymbolName:string;var Buffer,Size:Cardinal):Bool; FindClass('TOBJECT'),'EJclConversionError Function JStrToBoolean( const S : string) : Boolean Function JBooleanToStr( B : Boolean) : string Function JIntToBool( I : Int) : Boolean Function JBoolToInt( B : Boolean) : Int 'ListSeparator','String '; 'ListSeparator1','String ': Procedure ListAddItems( var List : string; const Separator, Items : string) Procedure ListIncludeItems( var List : string; const Separator, Items : string) Procedure ListRemoveItems( var List : string; const Separator, Items : string) Procedure ListDelItem( var List : string; const Separator : string; const Index : Int) Function ListItemCount( const List, Separator : string) : Int Function ListGetItem( const List, Separator : string; const Index : Int) : string Procedure ListSetItem(var List:string;const Separator:string;const Index:Int;const Value:string) Function ListItemIndex( const List, Separator, Item : string) : Int Function SystemTObjectInstance : LongWord Function IsCompiledWithPackages : Boolean Function JJclGUIDToString( const GUID : TGUID) : string Function JJclStringToGUID( const S : string) : TGUID SIRegister_TJclIntfCriticalSection(CL); SIRegister_TJclSimpleLog(CL); Procedure InitSimpleLog( const ALogFileName : string) end; procedure SIRegister_JclBorlandTools(CL: TPSPascalCompiler); begin FindClass('TOBJECT'),'EJclBorRADException TJclBorRADToolKind', '( brDelphi, brCppBuilder, brBorlandDevStudio ) TJclBorRADToolEdition', '( deOPEN, dePRO, deSVR ) TJclBorRADToolEdition', '( deSTD, dePRO, deCSS, deARC ) TJclBorRADToolPath', 'string 'SupportedDelphiVersions','LongInt'( 5 or 6 or 7 or 8 or 9 or 10 or 11); 'SupportedBCBVersions','LongInt'( 5 or 6 or 10 or 11); 'SupportedBDSVersions','LongInt'( 1 or 2 or 3 or 4 or 5); BorRADToolRepositoryPagesSection','String 'Repository Pages BorRADToolRepositoryDialogsPage','String 'Dialogs BorRADToolRepositoryFormsPage','String 'Forms BorRADToolRepositoryProjectsPage','String 'Projects BorRADToolRepositoryDataModulesPage','String 'Data Modules BorRADToolRepositoryObjectType','String 'Type BorRADToolRepositoryFormTemplate','String 'FormTemplate BorRADToolRepositoryProjectTemplate','String 'ProjectTemplate BorRADToolRepositoryObjectName','String 'Name BorRADToolRepositoryObjectPage','String 'Page BorRADToolRepositoryObjectIcon','String 'Icon BorRADToolRepositoryObjectDescr','String 'Description BorRADToolRepositoryObjectAuthor','String 'Author BorRADToolRepositoryObjectAncestor','String 'Ancestor BorRADToolRepositoryObjectDesigner','String 'Designer BorRADToolRepositoryDesignerDfm','String 'dfm BorRADToolRepositoryDesignerXfm','String 'xfm BorRADToolRepositoryObjectNewForm','String 'DefaultNewForm BorRADToolRepositoryObjectMainForm','String 'DefaultMainForm SourceExtensionDelphiPackage','String '.dpk SourceExtensionBCBPackage','String '.bpk SourceExtensionDelphiProject','String '.dpr SourceExtensionBCBProject','String '.bpr SourceExtensionBDSProject','String '.bdsproj SourceExtensionDProject','String '.dproj BinaryExtensionPackage','String '.bpl BinaryExtensionLibrary','String '.dll BinaryExtensionExecutable','String '.exe CompilerExtensionDCP','String '.dcp CompilerExtensionBPI','String '.bpi CompilerExtensionLIB','String '.lib CompilerExtensionTDS','String '.tds CompilerExtensionMAP','String '.map CompilerExtensionDRC','String '.drc CompilerExtensionDEF','String '.def SourceExtensionCPP','String '.cpp SourceExtensionH','String '.h SourceExtensionPAS','String '.pas SourceExtensionDFM','String '.dfm SourceExtensionXFM','String '.xfm SourceDescriptionPAS','String 'Pascal source file SourceDescriptionCPP','String 'C++ source file DesignerVCL','String 'VCL DesignerCLX','String 'CLX ProjectTypePackage','String 'package ProjectTypeLibrary','String 'library ProjectTypeProgram','String 'program Personality32Bit','String '32 bit Personality64Bit','String '64 bit PersonalityDelphi','String 'Delphi PersonalityDelphiDotNet','String 'Delphi.net PersonalityBCB','String 'C++Builder PersonalityCSB','String 'C#Builder PersonalityVB','String 'Visual Basic PersonalityDesign','String 'Design PersonalityUnknown','String 'Unknown personality PersonalityBDS','String 'Borland Developer Studio DOFDirectoriesSection','String 'Directories DOFUnitOutputDirKey','String 'UnitOutputDir DOFSearchPathName','String 'SearchPath DOFConditionals','String 'Conditionals DOFLinkerSection','String 'Linker DOFPackagesKey','String 'Packages DOFCompilerSection','String 'Compiler DOFPackageNoLinkKey','String 'PackageNoLink DOFAdditionalSection','String 'Additional DOFOptionsKey','String 'Options TJclBorPersonality', '( bpDelphi32, bpDelphi64, bpBCBuilder32, b' +'pBCBuilder64, bpDelphiNet32, bpDelphiNet64, bpCSBuilder32, bpCSBuilder64, ' +'bpVisualBasic32, bpVisualBasic64, bpDesign, bpUnknown ) TJclBorPersonalities', 'set of TJclBorPersonality TJclBorDesigner', '( bdVCL, bdCLX ) TJclBorDesigners', 'set of TJClBorDesigner TJclBorPlatform', '( bp32bit, bp64bit ) FindClass('TOBJECT'),'TJclBorRADToolInstallation SIRegister_TJclBorRADToolInstallationObject(CL); SIRegister_TJclBorlandOpenHelp(CL); TJclHelp2Object', '( hoRegisterSession, hoRegister, hoPlugin ) TJclHelp2Objects', 'set of TJclHelp2Object SIRegister_TJclHelp2Manager(CL); SIRegister_TJclBorRADToolIdeTool(CL); SIRegister_TJclBorRADToolIdePackages(CL); SIRegister_IJclCommandLineTool(CL); FindClass('TOBJECT'),'EJclCommandLineToolError SIRegister_TJclCommandLineTool(CL); SIRegister_TJclBorlandCommandLineTool(CL); SIRegister_TJclBCC32(CL); SIRegister_TJclDCC32(CL); TJclDCC', 'TJclDCC32 SIRegister_TJclBpr2Mak(CL); SIRegister_TJclBorlandMake(CL); SIRegister_TJclBorRADToolPalette(CL); SIRegister_TJclBorRADToolRepository(CL); TCommandLineTool', '( clAsm, clBcc32, clDcc32, clDccIL, clMake,clProj2Mak ) TCommandLineTools', 'set of TCommandLineTool //TJclBorRADToolInstallationClass', 'class of TJclBorRADToolInstallation SIRegister_TJclBorRADToolInstallation(CL); SIRegister_TJclBCBInstallation(CL); SIRegister_TJclDelphiInstallation(CL); SIRegister_TJclDCCIL(CL); SIRegister_TJclBDSInstallation(CL); TTraverseMethod', 'Function ( Installation : TJclBorRADToolInstallation) : Boolean SIRegister_TJclBorRADToolInstallations(CL); Function BPLFileName( const BPLPath, PackageFileName : string) : string Function BinaryFileName( const OutputPath, ProjectFileName : string) : string Function IsDelphiPackage( const FileName : string) : Boolean Function IsDelphiProject( const FileName : string) : Boolean Function IsBCBPackage( const FileName : string) : Boolean Function IsBCBProject( const FileName : string) : Boolean Procedure GetDPRFileInfo(const DPRFileName:string;out BinaryExtensio:string;const LibSuffx:PString); Procedure GetBPRFileInfo(const BPRFileName:string;out BinaryFileName:string;const Descript:PString); Procedure GetDPKFileInfo(const DPKFileName:string;out RunOnly:Bool;const LibSuffix:PString;const Descript:PString; Procedure GetBPKFileInfo(const BPKFileName:string;out RunOnly:Bool;const BinaryFName:PString;const Descript:PString function SamePath(const Path1, Path2: string): Boolean; end; procedure SIRegister_JclFileUtils_max(CL: TPSPascalCompiler); begin 'ERROR_NO_MORE_FILES','LongInt'( 18); //Function stat64( FileName: PChar;var StatBuffer : TStatBuf64) : Int //Function fstat64( FileDes: Int;var StatBuffer : TStatBuf64) : Int //Function lstat64( FileName: PChar;var StatBuffer : TStatBuf64) : Int 'LPathSeparator','String '/ 'LDirDelimiter','String '/ 'LDirSeparator','String ': 'JXPathDevicePrefix','String '\\.\ 'JXPathSeparator','String '\ 'JXDirDelimiter','String '\ 'JXDirSeparator','String '; 'JXPathUncPrefix','String '\\ 'faNormalFile','LongWord')( $00000080); //'faUnixSpecific',' faSymLink); JXTCompactPath', '( cpCenter, cpEnd ) _WIN32_FILE_ATTRIBUTE_DATA', 'record dwFileAttributes : DWORD; f' +'tCreationTime : TFileTime; ftLastAccessTime : TFileTime; ftLastWriteTime :' +' TFileTime; nFileSizeHigh : DWORD; nFileSizeLow : DWORD; end TWin32FileAttributeData', '_WIN32_FILE_ATTRIBUTE_DATA WIN32_FILE_ATTRIBUTE_DATA', '_WIN32_FILE_ATTRIBUTE_DATA Function jxPathAddSeparator( const Path : string) : string Function jxPathAddExtension( const Path, Extension : string) : string Function jxPathAppend( const Path, Append : string) : string Function jxPathBuildRoot( const Drive : Byte) : string Function jxPathCanonicalize( const Path : string) : string Function jxPathCommonPrefix( const Path1, Path2 : string) : Int Function jxPathCompactPath(const DC:HDC;const Path:string;const Width:Int;CmpFmt:TCompactPath):string Procedure jxPathExtractElements(const Source:string;var Drive,Path,FileName,Ext: string) Function jxPathExtractFileDirFixed( const S : string) : string Function jxPathExtractFileNameNoExt( const Path : string) : string Function jxPathExtractPathDepth( const Path : string; Depth : Int) : string Function jxPathGetDepth( const Path : string) : Int Function jxPathGetLongName( const Path : string) : string Function jxPathGetShortName( const Path : string) : string Function jxPathGetLongName( const Path : string) : string Function jxPathGetShortName( const Path : string) : string Function jxPathGetRelativePath( Origin, Destination : string) : string Function jxPathGetTempPath : string Function jxPathIsAbsolute( const Path : string) : Boolean Function jxPathIsChild( const Path, Base : string) : Boolean Function jxPathIsDiskDevice( const Path : string) : Boolean Function jxPathIsUNC( const Path : string) : Boolean Function jxPathRemoveSeparator( const Path : string) : string Function jxPathRemoveExtension( const Path : string) : string Function jxPathGetPhysicalPath( const LocalizedPath : string) : string Function jxPathGetLocalizedPath( const PhysicalPath : string) : string JxTFileListOption', '( flFullNames, flRecursive, flMaskedSubfolders) JxTFileListOptions', 'set of TFileListOption JxTJclAttributeMatch', '( amAny, amExact, amSubSetOf, amSuperSetOf, amCustom ) TFileHandler', 'Procedure ( const FileName : string) TFileHandlerEx', 'Procedure ( const Directory : string; const FileInfo : TSearchRec) Function BuildFileList( const Path : string; const Attr : Int; const List : TStrings) : Boolean //Function AdvBuildFileList( const Path : string; const Attr : Int; const Files : TStrings; const AttributeMatch:TJclAttributeMatch;const Optis:TFileListOptions;const SubfoldersMask:string;const FileMatchFunc:TFileMatchFunc):Bool; Function jxVerifyFileAttributeMask( var RejectedAttributes, RequiredAttributes : Int): Bool Function jxIsFileAttributeMatch(FileAttributes,RejectedAttributes,RequiredAttributes:Int):Bool; Function jxFileAttributesStr( const FileInfo : TSearchRec) : string Function jxIsFileNameMatch(FileName:string;const Mask:string;const CaseSensitive:Bool):Bool; Procedure jxEnumFiles(const Path:string;HandleFile:TFileHandlerEx;RejectedAttributes:Int;RequiredAttributes:Int;Abort:TObject) Procedure jxEnumDirectories(const Root:string;const HandleDirectory:TFileHandler;const IncludeHiddenDirects:Boolean;const SubDirectoriesMask:string;Abort:TObject;ResolveSymLinks:Bool) Procedure jxCreateEmptyFile( const FileName : string) Function jxCloseVolume( var Volume : THandle) : Boolean Function jxDeleteDirectory(const DirectoryName:string; MoveToRecycleBin:Boolean:Boolean Function jxCopyDirectory( ExistingDirectoryName, NewDirectoryName : string) : Boolean Function jxMoveDirectory( ExistingDirectoryName, NewDirectoryName : string) : Boolean Function jxDelTree( const Path : string) : Boolean //Function DelTreeEx(const Path:string;AbortOnFailure:Boolean; Progress:TDelTreeProgress):Boolean Function jxDiskInDrive( Drive : Char) : Boolean Function jxDirectoryExists( const Name : string; ResolveSymLinks : Boolean) : Boolean Function jxFileCreateTemp( var Prefix : string) : THandle Function jxFileBackup( const FileName : string; Move : Boolean) : Boolean Function jxFileCopy(const ExistingFileName,NewFileName:string; ReplaceExisting:Boolean):Bool Function jxFileDelete( const FileName : string; MoveToRecycleBin : Boolean) : Boolean Function jxFileExists( const FileName : string) : Boolean Function jxFileMove(const ExistingFileName,NewFileName: string;ReplaceExisting:Bool):Boolean Function jxFileRestore( const FileName : string) : Boolean Function jxGetBackupFileName( const FileName : string) : string Function jxIsBackupFileName( const FileName : string) : Boolean Function jxFileGetDisplayName( const FileName : string) : string Function jxFileGetGroupName( const FileName : string; ResolveSymLinks : Boolean) : string Function jxFileGetOwnerName( const FileName : string; ResolveSymLinks : Boolean) : string Function jxFileGetSize( const FileName : string) : Int64 Function jxFileGetTempName( const Prefix : string) : string Function jxFileGetTypeName( const FileName : string) : string Function jxFindUnusedFileName(FileName:string;const FileExt:string;NumberPrefix:string): string Function jxForceDirectories( Name : string) : Boolean Function jxGetDirectorySize( const Path : string) : Int64 Function jxGetDriveTypeStr( const Drive : Char) : string Function jxGetFileAgeCoherence( const FileName : string) : Boolean Procedure jxGetFileAttributeList( const Items : TStrings; const Attr : Int) Procedure jxGetFileAttributeListEx( const Items : TStrings; const Attr : Int) Function jxGetFileInformation( const FileName : string; out FileInfo : TSearchRec) : Boolean; Function jxGetFileInformation1( const FileName : string) : TSearchRec; //Function GetFileStatus(const FileName:string;out StatBuf:TStatBuf64;const ResolveSymLinks:Boolean):Int Function jxGetFileLastWrite( const FName : string) : TFileTime; Function jxGetFileLastWrite1( const FName : string; out LocalTime : TDateTime) : Boolean; Function jxGetFileLastAccess( const FName : string) : TFileTime; Function jxGetFileLastAccess1(const FName:string; out LocalTime : TDateTime) : Boolean; Function jxGetFileCreation( const FName : string) : TFileTime; Function jxGetFileCreation1( const FName : string; out LocalTime : TDateTime) : Boolean; Function jxGetFileLastWrite(const FName:string;out TimeStamp:Int;ResolveSymLinks:Bool):Bool; Function jxGetFileLastWrite1(const FName:string;out LocalTime:TDateTime;ResolveSymLinks:Bool): Bool; Function jxGetFileLastWrite2(const FName : string; ResolveSymLinks : Boolean) : Int; Function jxGetFileLastAccess(const FName:string;out TimeStamp:Int;ResolveSymLinks: Bool): Bool; Function jxGetFileLastAccess1(const FName:string;out LocalTime:TDateTime;ResolveSymLinks:Bool):Bool; Function jxGetFileLastAccess2(const FName:string; ResolveSymLinks:Boolean): Int; Function jxGetFileLastAttrChange(const FName:string;out TimeStamp:Int;ResolveSymLinks:Bool): Bool; Function jxGetFileLastAttrChange1(const FName:string;out LocalTime:TDateTime;ResolveSymLinks:Bool):Bool; Function jxGetFileLastAttrChange2( const FName : string; ResolveSymLinks:Boolean): Int; Function jxGetModulePath( const Module : HMODULE) : string Function jxGetSizeOfFile( const FileName : string) : Int64; Function jxGetSizeOfFile1( const FileInfo : TSearchRec) : Int64; Function jxGetSizeOfFile2( Handle : THandle) : Int64; Function jxGetStandardFileInfo( const FileName : string) : TWin32FileAttributeData Function jxIsDirectory( const FileName : string; ResolveSymLinks : Boolean) : Boolean Function jxIsRootDirectory( const CanonicFileName : string) : Boolean Function jxLockVolume( const Volume : string; var Handle : THandle) : Boolean Function jxOpenVolume( const Drive : Char) : THandle Function jxSetDirLastWrite( const DirName : string; const DateTime : TDateTime) : Boolean Function jxSetDirLastAccess( const DirName : string; const DateTime : TDateTime) : Boolean Function jxSetDirCreation( const DirName : string; const DateTime : TDateTime) : Boolean Function jxSetFileLastWrite( const FileName : string; const DateTime : TDateTime) : Boolean Function jxSetFileLastAccess( const FileName : string; const DateTime : TDateTime) : Boolean Function jxSetFileCreation( const FileName : string; const DateTime : TDateTime) : Boolean Procedure jxShredFile( const FileName : string; Times : Int) Function jxUnlockVolume( var Handle : THandle) : Boolean Function jxCreateSymbolicLink( const Name, Target : string) : Boolean Function jxSymbolicLinkTarget( const Name : string) : string TAttributeInterest', '( aiIgnored, aiRejected, aiRequired ) SIRegister_TJclCustomFileAttrMask(CL); SIRegister_TJclFileAttributeMask(CL); TFileSearchOption', '( fsIncludeSubDirectories, fsIncludeHiddenS' +'ubDirectories, fsLastChangeAfter, fsLastChangeBefore, fsMaxSize, fsMinSize) TFileSearchOptions', 'set of TFileSearchOption TFileSearchTaskID', 'Int TFileSearchTerminationEvent','Procedure(const ID:TFileSearchTaskID;const Aborted:Boolean) TFileEnumeratorSyncMode', '( smPerFile, smPerDirectory ) SIRegister_IJclFileEnumerator(CL); SIRegister_TJclFileEnumerator(CL); Function JxFileSearch : IJclFileEnumerator JxTFileFlag', '( ffDebug, ffInfoInferred, ffPatched,ffPreRelease,ffPrivateBuild, ffSpecialBuild ) JxTFileFlags', 'set of TFileFlag FindClass('TOBJECT'),'EJclFileVersionInfoError SIRegister_TJclFileVersionInfo(CL); Function jxOSIdentToString( const OSIdent : DWORD) : string Function jxOSFileTypeToString(const OSFileType: DWORD; const OSFileSubType : DWORD) : string Function jxVersionResourceAvailable( const FileName : string) : Boolean TFileVersionFormat', '( vfMajorMinor, vfFull ) Function jxFormatVersionString( const HiV, LoV : Word) : string; Function jxFormatVersionString1( const Major, Minor, Build, Revision : Word) : string; //Function FormatVersionString2(const FixedInfo:TVSFixedFileInfo;VersionFrmat:TFileVersionFormat):str; //Procedure VersionExtractFileInfo(const FixedInfo:TVSFixedFileInfo;var Major,Minor,Build,Revision:Word); //Procedure VersionExtractProductInfo(const FixedInfo:TVSFixedFileInfo;var Major,Minor,Build,Revision:Word); //Function VersionFixedFileInfo(const FileName:string;var FixedInfo:TVSFixedFileInfo):Boolean Function jxVersionFixedFileInfoString(const FileName:string;VersionFormat:TFileVersionFormat;const NotAvailableText :string):string SIRegister_TJclTempFileStream(CL); FindClass('TOBJECT'),'TJclCustomFileMapping SIRegister_TJclFileMappingView(CL); TJclFileMappingRoundOffset', '( rvDown, rvUp ) SIRegister_TJclCustomFileMapping(CL); SIRegister_TJclFileMapping(CL); SIRegister_TJclSwapFileMapping(CL); SIRegister_TJclFileMappingStream(CL); TJclMappedTextReaderIndex', '( tiNoIndex, tiFull ) //PPCharArray', '^TPCharArray // will not work SIRegister_TJclMappedTextReader(CL); SIRegister_TJclFileMaskComparator(CL); FindClass('TOBJECT'),'EJclPathError FindClass('TOBJECT'),'EJclFileUtilsError FindClass('TOBJECT'),'EJclTempFileStreamError FindClass('TOBJECT'),'EJclTempFileStreamError FindClass('TOBJECT'),'EJclFileMappingError FindClass('TOBJECT'),'EJclFileMappingViewError Function jxPathGetLongName2( const Path : string) : string Function jxWin32DeleteFile( const FileName : string; MoveToRecycleBin : Boolean) : Boolean Function jxWin32MoveFileReplaceExisting( const SrcFileName, DstFileName : string) : Boolean Function jxWin32BackupFile( const FileName : string; Move : Boolean) : Boolean Function jxWin32RestoreFile( const FileName : string) : Boolean Function jxSamePath( const Path1, Path2 : string) : Boolean Procedure jxPathListAddItems( var List : string; const Items : string) Procedure jxPathListIncludeItems( var List : string; const Items : string) Procedure jxPathListDelItems( var List : string; const Items : string) Procedure jxPathListDelItem( var List : string; const Index : Int) Function jxPathListItemCount( const List : string) : Int Function jxPathListGetItem( const List : string; const Index : Int) : string Procedure jxPathListSetItem( var List : string; const Index : Int; const Value : string) Function jxPathListItemIndex( const List, Item : string) : Int Function jxParamName(Idx:Int;const Separator:string;const AllowedPrefixChars:string;TrimName:Bool):string; Function jxParamValue(Index:Int; const Separator : string; TrimValue : Boolean) : string; Function jxParamValue1(const SearchName:string; const Separator : string; CaseSensitive : Boolean; const AllowedPrefixCharacters : string; TrimValue : Boolean) : string; Function jxParamPos(const SearchName: string;const Separator:string;CaseSensitive:Boolean;const AllowedPrefixCharacters string): Int end; procedure SIRegister_FileUtil(CL: TPSPascalCompiler); begin 'UTF8FileHeader','String #$ef#$bb#$bf); Function lCompareFilenames( const Filename1, Filename2 : string) : Int Function lCompareFilenamesIgnoreCase( const Filename1, Filename2 : string) : Int Function lCompareFilenames(const Filename1,Filename2 : string; ResolveLinks : boolean): Int Function lCompareFilenames(Filename1:PChar;Len1:int;Filename2:PChar;Len2:int;ResolveLiks:bool):int; Function lFilenameIsAbsolute( const TheFilename : string) : boolean Function lFilenameIsWinAbsolute( const TheFilename : string) : boolean Function lFilenameIsUnixAbsolute( const TheFilename : string) : boolean Procedure lCheckIfFileIsExecutable( const AFilename : string) Procedure lCheckIfFileIsSymlink( const AFilename : string) Function lFileIsReadable( const AFilename : string) : boolean Function lFileIsWritable( const AFilename : string) : boolean Function lFileIsText( const AFilename : string) : boolean Function lFileIsText( const AFilename : string; out FileReadable : boolean) : boolean Function lFileIsExecutable( const AFilename : string) : boolean Function lFileIsSymlink( const AFilename : string) : boolean Function lFileIsHardLink( const AFilename : string) : boolean Function lFileSize( const Filename : string) : int64; Function lGetFileDescription( const AFilename : string) : string Function lReadAllLinks( const Filename : string; ExceptionOnError : boolean) : string Function lTryReadAllLinks( const Filename : string) : string Function lDirPathExists( const FileName : String) : Boolean Function lForceDirectory( DirectoryName : string) : boolean Function lDeleteDirectory(const DirectoryName: string; OnlyChildren: boolean) : boolean Function lProgramDirectory : string Function lDirectoryIsWritable( const DirectoryName : string) : boolean Function lExtractFileNameOnly( const AFilename : string) : string Function lExtractFileNameWithoutExt( const AFilename : string) : string Function lCompareFileExt( const Filename, Ext : string; CaseSensitive : boolean) : Int; Function lCompareFileExt( const Filename, Ext : string) : Int; Function lFilenameIsPascalUnit( const Filename : string) : boolean Function lAppendPathDelim( const Path : string) : string Function lChompPathDelim( const Path : string) : string Function lTrimFilename( const AFilename : string) : string Function lCleanAndExpandFilename( const Filename : string) : string Function lCleanAndExpandDirectory( const Filename : string) : string Function lCreateAbsoluteSearchPath( const SearchPath, BaseDirectory : string) : string Function lCreateRelativePath(const Filename,BaseDirectory string;UsePointDirectory:boolean;AlwaysRequireSharedBaseFolder:Bool):string Function lCreateAbsolutePath( const Filename, BaseDirectory : string) : string Function lFileIsInPath( const Filename, Path : string) : boolean Function lFileIsInDirectory( const Filename, Directory : string) : boolean TSearchFileInPathFlag', '( sffDontSearchInBasePath, sffSearchLoUpCase ) TSearchFileInPathFlags', 'set of TSearchFileInPathFlag AllDirectoryEntriesMask','String '* Function lGetAllFilesMask : string Function lGetExeExt : string Function lSearchFileInPath(const Filename,BasePath,SearchPath,Delimiter: string;Flags:TSearchFileInPathFlags):string Function lSearchAllFilesInPath(const Filename,BasePath,SearchPath,Delimiter:string;Flags: TSearchFileInPathFlags):TStrings Function lFindDiskFilename( const Filename : string) : string Function lFindDiskFileCaseInsensitive( const Filename : string) : string Function lFindDefaultExecutablePath( const Executable : string; const BaseDir: string):string Function lGetDarwinSystemFilename( Filename : string) : string SIRegister_TFileIterator(CL); TFileFoundEvent', 'Procedure ( FileIterator : TFileIterator) TDirectoryFoundEvent', 'Procedure ( FileIterator : TFileIterator) TDirectoryEnterEvent', 'Procedure ( FileIterator : TFileIterator) SIRegister_TFileSearcher(CL); Function lFindAllFiles(const SearchPath:String;SearchMsk:String;SearchSubDirs:Bool):TStringList Function lFindAllDirectories(const SearchPath: string; SearchSubDirs: Boolean): TStringList // TCopyFileFlag', '( cffOverwriteFile, cffCreateDestDirectory, cffPreserveTime ) // TCopyFileFlags', 'set of TCopyFileFlag Function lCopyFile(const SrcFilename,DestFilename: string; Flags : TCopyFileFlags): boolean Function lCopyFile(const SrcFilename,DestFilename: string; PreserveTime : boolean): boolean Function lCopyDirTree( const SourceDir, TargetDir : string; Flags : TCopyFileFlags): Boolean Function lReadFileToString( const Filename : string) : string Function lGetTempFilename( const Directory, Prefix : string) : string {Function NeedRTLAnsi : boolean Procedure SetNeedRTLAnsi( NewValue : boolean) Function UTF8ToSys( const s : string) : string Function SysToUTF8( const s : string) : string Function ConsoleToUTF8( const s : string) : string Function UTF8ToConsole( const s : string) : string} Function FileExistsUTF8( const Filename : string) : boolean Function FileAgeUTF8( const FileName : string) : Longint Function DirectoryExistsUTF8( const Directory : string) : Boolean Function ExpandFileNameUTF8( const FileName : string) : string Function ExpandUNCFileNameUTF8( const FileName : string) : string Function ExtractShortPathNameUTF8( const FileName : String) : String Function FindFirstUTF8(const Path: string; Attr : Longint; out Rslt : TSearchRec) : Longint Function FindNextUTF8( var Rslt : TSearchRec) : Longint Procedure FindCloseUTF8( var F : TSearchrec) Function FileSetDateUTF8( const FileName : String; Age : Longint) : Longint Function FileGetAttrUTF8( const FileName : String) : Longint Function FileSetAttrUTF8( const Filename : String; Attr : longint) : Longint Function DeleteFileUTF8( const FileName : String) : Boolean Function RenameFileUTF8( const OldName, NewName : String) : Boolean Function FileSearchUTF8(const Name, DirList : String; ImplicitCurrentDir : Boolean) : String Function FileIsReadOnlyUTF8( const FileName : String) : Boolean Function GetCurrentDirUTF8 : String Function SetCurrentDirUTF8( const NewDir : String) : Boolean Function CreateDirUTF8( const NewDir : String) : Boolean Function RemoveDirUTF8( const Dir : String) : Boolean Function ForceDirectoriesUTF8( const Dir : string) : Boolean Function FileOpenUTF8( const FileName : string; Mode : Int) : THandle Function FileCreateUTF8( const FileName : string) : THandle; Function FileCreateUTF81( const FileName : string; Rights : Cardinal) : THandle; Function ParamStrUTF8( Param : Int) : string Function GetEnvironmentStringUTF8( Index : Int) : string Function GetEnvironmentVariableUTF8( const EnvVar : string) : String Function GetAppConfigDirUTF8( Global : Boolean; Create : boolean) : string Function GetAppConfigFileUTF8(Global:Boolean; SubDir:boolean; CreateDir : boolean) : string Function SysErrorMessageUTF8( ErrorCode : Int) : String end; procedure SIRegister_Keyboard(CL: TPSPascalCompiler); begin //VK_F23 = 134; //{$EXTERNALSYM VK_F24} //VK_F24 = 135; TVirtualKeyCode', 'Int 'VK_MOUSEWHEELUP','Int'(134); 'VK_MOUSEWHEELDOWN','Int'(135); Function glIsKeyDown( c : Char) : Boolean; Function glIsKeyDown1( vk : TVirtualKeyCode) : Boolean; Function glKeyPressed( minVkCode : TVirtualKeyCode) : TVirtualKeyCode Function glVirtualKeyCodeToKeyName( vk : TVirtualKeyCode) : String Function glKeyNameToVirtualKeyCode( const keyName : String) : TVirtualKeyCode Function glCharToVirtualKeyCode( c : Char) : TVirtualKeyCode Procedure glKeyboardNotifyWheelMoved( wheelDelta : Int) end; procedure SIRegister_GLCrossPlatform(CL: TPSPascalCompiler); begin TGLPoint', 'TPoint //PGLPoint', '^TGLPoint // will not work TGLRect', 'TRect //PGLRect', '^TGLRect // will not work TDelphiColor', 'TColor TGLPicture', 'TPicture TGLGraphic', 'TGraphic TGLBitmap', 'TBitmap //TGraphicClass', 'class of TGraphic TGLTextLayout', '( tlTop, tlCenter, tlBottom ) TGLMouseButton', '( mbLeft, mbRight, mbMiddle ) TGLMouseEvent', 'Procedure ( Sender : TObject; Button : TGLMouse' +'Button; Shift : TShiftState; X, Y : Int) TGLMouseMoveEvent', 'TMouseMoveEvent TGLKeyEvent', 'TKeyEvent TGLKeyPressEvent', 'TKeyPressEvent EGLOSError', 'EWin32Error EGLOSError', 'EWin32Error EGLOSError', 'EOSError 'glsAllFilter','string'All // sAllFilter Function GLPoint( const x, y : Int) : TGLPoint Function GLRGB( const r, g, b : Byte) : TColor Function GLColorToRGB( color : TColor) : TColor Function GLGetRValue( rgb : DWORD) : Byte Function GLGetGValue( rgb : DWORD) : Byte Function GLGetBValue( rgb : DWORD) : Byte Procedure GLInitWinColors Function GLRect( const aLeft, aTop, aRight, aBottom : Int) : TGLRect Procedure GLInflateGLRect( var aRect : TGLRect; dx, dy : Int) Procedure GLIntersectGLRect( var aRect : TGLRect; const rect2 : TGLRect) Procedure GLInformationDlg( const msg : String) Function GLQuestionDlg( const msg : String) : Boolean Function GLInputDlg( const aCaption, aPrompt, aDefault : String) : String Function GLSavePictureDialog( var aFileName : String; const aTitle : String) : Boolean Function GLOpenPictureDialog( var aFileName : String; const aTitle : String) : Boolean Function GLApplicationTerminated : Boolean Procedure GLRaiseLastOSError Procedure GLFreeAndNil( var anObject: TObject) Function GLGetDeviceLogicalPixelsX( device : Cardinal) : Int Function GLGetCurrentColorDepth : Int Function GLPixelFormatToColorBits( aPixelFormat : TPixelFormat) : Int Function GLBitmapScanLine( aBitmap : TGLBitmap; aRow : Int) : Pointer Procedure GLSleep( length : Cardinal) Procedure GLQueryPerformanceCounter( var val : Int64) Function GLQueryPerformanceFrequency( var val : Int64) : Boolean Function GLStartPrecisionTimer : Int64 Function GLPrecisionTimerLap( const precisionTimer : Int64) : Double Function GLStopPrecisionTimer( const precisionTimer : Int64) : Double Function GLRDTSC : Int64 Procedure GLLoadBitmapFromInstance( ABitmap : TBitmap; AName : string) Function GLOKMessageBox( const Text, Caption : string) : Int Procedure GLShowHTMLUrl( Url : String) Procedure GLShowCursor( AShow : boolean) Procedure GLSetCursorPos( AScreenX, AScreenY : Int) Procedure GLGetCursorPos( var point : TGLPoint) Function GLGetScreenWidth : Int Function GLGetScreenHeight : Int Function GLGetTickCount : int64 function RemoveSpaces(const str : String) : String; TNormalMapSpace','( nmsObject, nmsTangent ) Procedure CalcObjectSpaceLightVectors(Light:TAffineVector;Vertices TAffineVectorList;Colors:TVectorList) Procedure SetupTangentSpace( Vertices, Normals, TexCoords, Tangents, BiNormals : TAffineVectorList) Procedure CalcTangentSpaceLightVectors(Light:TAffineVector;Vertices,Normals,Tangents,BiNormals:TAffineVectorList;Colors:TVectorList) Function CreateObjectSpaceNormalMap(Width,Height:Int;HiNormals,HiTexCoords:TAffineVectorList):TGLBitmap Function CreateTangentSpaceNormalMap(Width, Height : Int; HiNormals, HiTexCoords, LoNormals, LoTexCoords, Tangents, BiNormals : TAffineVectorList) : TGLBitmap end; procedure SIRegister_GLStarRecord(CL: TPSPascalCompiler); begin TGLStarRecord', 'record RA: Word; DEC: SmallInt; BVColorIndex: Byte; VMagnitude: Byte; end // PGLStarRecord', '^TGLStarRecord // will not work Function StarRecordPositionZUp( const starRecord : TGLStarRecord) : TAffineVector Function StarRecordPositionYUp( const starRecord : TGLStarRecord) : TAffineVector Function StarRecordColor( const starRecord : TGLStarRecord; bias : Single) : TVector end; procedure SIRegister_GeometryBB(CL: TPSPascalCompiler); begin TAABB', 'record min : TAffineVector; max : TAffineVector; end //PAABB', '^TAABB // will not work TBSphere', 'record Center : TAffineVector; Radius : single; end TClipRect', 'record Left : Single; Top:Single; Right:Single; Bottom : Single; end TSpaceContains', '(scNoOverlap, scContainsFully, scContainsPartially ) Function AddBB( var c1 : THmgBoundingBox; const c2 : THmgBoundingBox) : THmgBoundingBox Procedure AddAABB( var aabb : TAABB; const aabb1 : TAABB) Procedure SetBB( var c : THmgBoundingBox; const v : TVector) Procedure SetAABB( var bb : TAABB; const v : TVector) Procedure BBTransform( var c : THmgBoundingBox; const m : TMatrix) Procedure AABBTransform( var bb : TAABB; const m : TMatrix) Procedure AABBScale( var bb : TAABB; const v : TAffineVector) Function BBMinX( const c : THmgBoundingBox) : Single Function BBMaxX( const c : THmgBoundingBox) : Single Function BBMinY( const c : THmgBoundingBox) : Single Function BBMaxY( const c : THmgBoundingBox) : Single Function BBMinZ( const c : THmgBoundingBox) : Single Function BBMaxZ( const c : THmgBoundingBox) : Single Procedure AABBInclude( var bb : TAABB; const p : TAffineVector) Procedure AABBFromSweep(var SweepAABB: TAABB; const Start,Dest:TVector; const Radius:Single) Function AABBIntersection( const aabb1, aabb2 : TAABB) : TAABB Function BBToAABB( const aBB : THmgBoundingBox) : TAABB Function AABBToBB( const anAABB : TAABB) : THmgBoundingBox; Function AABBToBB1( const anAABB : TAABB; const m : TMatrix) : THmgBoundingBox; Procedure OffsetAABB( var aabb : TAABB; const delta : TAffineVector); Procedure OffsetAABB1( var aabb : TAABB; const delta : TVector); Function IntersectAABBs( const aabb1, aabb2 : TAABB; const m1To2, m2To1 : TMatrix) : Boolean; Function IntersectAABBsAbsoluteXY( const aabb1, aabb2 : TAABB) : Boolean Function IntersectAABBsAbsoluteXZ( const aabb1, aabb2 : TAABB) : Boolean Function IntersectAABBsAbsolute( const aabb1, aabb2 : TAABB) : Boolean Function AABBFitsInAABBAbsolute( const aabb1, aabb2 : TAABB) : Boolean Function PointInAABB( const p : TAffineVector; const aabb : TAABB) : Boolean; Function PointInAABB1( const p : TVector; const aabb : TAABB) : Boolean; Function PlaneIntersectAABB( Normal : TAffineVector; d : single; aabb : TAABB) : boolean Function TriangleIntersectAABB( const aabb : TAABB; v1, v2, v3 : TAffineVector) : boolean Procedure ExtractAABBCorners( const AABB : TAABB; var AABBCorners : TAABBCorners) Procedure AABBToBSphere( const AABB : TAABB; var BSphere : TBSphere) Procedure BSphereToAABB( const BSphere : TBSphere; var AABB : TAABB); Function BSphereToAABB1( const center : TAffineVector; radius : Single) : TAABB; Function BSphereToAABB2( const center : TVector; radius : Single) : TAABB; Function AABBContainsAABB( const mainAABB, testAABB : TAABB) : TSpaceContains Function BSphereContainsAABB( const mainBSphere : TBSphere; const testAABB : TAABB) : TSpaceContains Function BSphereContainsBSphere( const mainBSphere, testBSphere : TBSphere) : TSpaceContains Function AABBContainsBSphere(const mainAABB:TAABB;const testBSphere:TBSphere): TSpaceContains Function PlaneContainsBSphere(const Location,Normal:TAffineVector;const testBSphere:TBSphere):TSpaceContains Function FrustumContainsBSphere( const Frustum : TFrustum; const testBSphere : TBSphere) : TSpaceContains Function FrustumContainsAABB( const Frustum:TFrustum;const testAABB:TAABB): TSpaceContains Function ClipToAABB( const v : TAffineVector; const AABB : TAABB) : TAffineVector Function BSphereIntersectsBSphere( const mainBSphere, testBSphere : TBSphere) : boolean Procedure IncludeInClipRect( var clipRect : TClipRect; x, y : Single) Function AABBToClipRect(const aabb:TAABB;modelViewProjection:TMatrix;viewportSizeX,viewportSizeY:Int):TClipRect end; procedure SIRegister_GeometryCoordinates(CL: TPSPascalCompiler); begin Procedure Cylindrical_Cartesian( const r, theta, z1 : single; var x, y, z : single); Procedure Cylindrical_Cartesian1( const r, theta, z1 : double; var x, y, z : double); Procedure Cylindrical_Cartesian2(const r,theta,z1: single; var x,y,z single; var ierr : Int); Procedure Cylindrical_Cartesian3(const r,theta,z1: double; var x,y,z: double; var ierr : Int); Procedure Cartesian_Cylindrical( const x, y, z1 : single; var r, theta, z : single); Procedure Cartesian_Cylindrical1( const x, y, z1 : double; var r, theta, z : double); Procedure Spherical_Cartesian( const r, theta, phi : single; var x, y, z : single); Procedure Spherical_Cartesian1( const r, theta, phi : double; var x, y, z : double); Procedure Spherical_Cartesian2(const r,theta, phi: single;var x,y,z:single;varierr:Int); Procedure Spherical_Cartesian3(const r,theta, phi:double;var x,y,z:double;var ierr:Int); Procedure Cartesian_Spherical( const x, y, z : single; var r, theta, phi : single); Procedure Cartesian_Spherical1( const v : TAffineVector; var r, theta, phi : Single); Procedure Cartesian_Spherical2( const x, y, z : double; var r, theta, phi : double); Procedure ProlateSpheroidal_Cartesian( const xi, eta, phi, a : single; var x, y, z : single); Procedure ProlateSpheroidal_Cartesian1(const xi,eta,phi,a: double;var x,y, z : double); Procedure ProlateSpheroidal_Cartesian2(const xi,eta,phi,a:single;var x,y,z:single;var ierr:Int); Procedure ProlateSpheroidal_Cartesian3(const xi,eta,phi,a:double;var x,y,z:double;var ierr:Int); Procedure OblateSpheroidal_Cartesian( const xi, eta, phi, a : single; var x, y, z : single); Procedure OblateSpheroidal_Cartesian1(const xi, eta, phi, a : double; var x, y, z : double); Procedure OblateSpheroidal_Cartesian2(const xi,eta,phi,a:single;var x,y,z:single;var ierr:Int); Procedure OblateSpheroidal_Cartesian3(const xi,eta,phi,a:double;var x,y,z:double;var ierr:Int); Procedure BipolarCylindrical_Cartesian(const u, v, z1, a: single; var x, y, z : single); Procedure BipolarCylindrical_Cartesian1(const u, v, z1, a: double; var x, y, z: double); Procedure BipolarCylindrical_Cartesian2(const u,v,z1,a:single;var x,y,z:single;var ierr:Int); Procedure BipolarCylindrical_Cartesian3(const u,v,z1,a: double;var x,y,z:double;var ierr:Int); end; procedure SIRegister_VectorGeometry(CL: TPSPascalCompiler); begin 'EPSILON','Single').setExtended( 1e-40); 'EPSILON2','Single').setExtended( 1e-30); } TRenderContextClippingInfo', 'record origin : TVector; clippingD' +'irection : TVector; viewPortRadius:Single;farClippingDistance:Single;frustum:TFrustum;end THmgPlane', 'TVector TDoubleHmgPlane', 'THomogeneousDblVector {TTransType', '( ttScaleX, ttScaleY, ttScaleZ, ttShearXY, ttShear' +'XZ, ttShearYZ, ttRotateX, ttRotateY, ttRotateZ, ttTranslateX, ttTranslateY' +', ttTranslateZ, ttPerspectiveX, ttPerspectiveY, ttPerspectiveZ, ttPerspectiveW )} TSingleArray', 'array of Single TTransformations','array [0..15] of Single) TPackedRotationMatrix','array [0..2] of Smallint) TVertex', 'TAffineVector //TVectorGL', 'THomogeneousFltVector //TMatrixGL', 'THomogeneousFltMatrix // TPackedRotationMatrix = array [0..2] of SmallInt; Function glTexPointMake( const s, t : Single) : TTexPoint Function glAffineVectorMake( const x, y, z : Single) : TAffineVector; Function glAffineVectorMake1( const v : TVectorGL) : TAffineVector; Procedure glSetAffineVector( var v : TAffineVector; const x, y, z : Single); Procedure glSetVector( var v : TAffineVector; const x, y, z : Single); Procedure glSetVector1( var v : TAffineVector; const vSrc : TVectorGL); Procedure glSetVector2( var v : TAffineVector; const vSrc : TAffineVector); Procedure glSetVector3( var v : TAffineDblVector; const vSrc : TAffineVector); Procedure glSetVector4( var v : TAffineDblVector; const vSrc : TVectorGL); Function glVectorMake( const v : TAffineVector; w : Single) : TVectorGL; Function glVectorMake1( const x, y, z : Single; w : Single) : TVectorGL; Function glPointMake( const x, y, z : Single) : TVectorGL; Function glPointMake1( const v : TAffineVector) : TVectorGL; Function glPointMake2( const v : TVectorGL) : TVectorGL; Procedure glSetVector5( var v : TVectorGL; const x, y, z : Single; w : Single); Procedure glSetVector6( var v : TVectorGL; const av : TAffineVector; w : Single); Procedure glglSetVector7( var v : TVectorGL; const vSrc : TVectorGL); Procedure glMakePoint( var v : TVectorGL; const x, y, z : Single); Procedure glMakePoint1( var v : TVectorGL; const av : TAffineVector); Procedure glMakePoint2( var v : TVectorGL; const av : TVectorGL); Procedure glMakeVector( var v : TAffineVector; const x, y, z : Single); Procedure glMakeVector1( var v : TVectorGL; const x, y, z : Single); Procedure glMakeVector2( var v : TVectorGL; const av : TAffineVector); Procedure glMakeVector3( var v : TVectorGL; const av : TVectorGL); Procedure glRstVector( var v : TAffineVector); Procedure glRstVector1( var v : TVectorGL); Function glVectorAdd( const v1, v2 : TAffineVector) : TAffineVector; Procedure glVectorAdd1( const v1, v2 : TAffineVector; var vr : TAffineVector); //Procedure VectorAdd2( const v1, v2 : TAffineVector; vr : PAffineVector); Function glVectorAdd3( const v1, v2 : TVectorGL) : TVectorGL; Procedure glVectorAdd4( const v1, v2 : TVectorGL; var vr : TVectorGL); Function glVectorAdd5( const v : TAffineVector; const f : Single) : TAffineVector; Function glVectorAdd6( const v : TVectorGL; const f : Single) : TVectorGL; Procedure glAddVector7( var v1 : TAffineVector; const v2 : TAffineVector); Procedure glAddVector8( var v1 : TAffineVector; const v2 : TVectorGL); Procedure glAddVector9( var v1 : TVectorGL; const v2 : TVectorGL); Procedure glAddVector10( var v : TAffineVector; const f : Single); Procedure glAddVector11( var v : TVectorGL; const f : Single); //Procedure TexPointArrayAdd(const src:PTexPointArray;const delta:TTexPoint;const nb:Int;dest:PTexPointArray); //Procedure TexPointArrayScaleAndAdd(const src:PTexPointArray;const delta:TTexPoint;const nb:Int;const scale: TTexPoint; dest : PTexPointArray); //Procedure VectorArrayAdd(const src:PAffineVectorArray;const delta:TAffineVector;const nb:Int;dest: PAffineVectorArray); Function glVectorSubtract( const V1, V2 : TAffineVector) : TAffineVector; Procedure glVectorSubtract1( const v1, v2 : TAffineVector; var result : TAffineVector); Procedure glVectorSubtract2( const v1, v2 : TAffineVector; var result : TVectorGL); Procedure glVectorSubtract3(const v1: TVectorGL; v2: TAffineVector; var result : TVectorGL); Function glVectorSubtract4( const V1, V2 : TVectorGL) : TVectorGL; Procedure glVectorSubtract5( const v1, v2 : TVectorGL; var result : TVectorGL); Procedure glVectorSubtract6( const v1, v2 : TVectorGL; var result : TAffineVector); Function glVectorSubtract7( const v1 : TAffineVector; delta : Single) : TAffineVector; Function glVectorSubtract8( const v1 : TVectorGL; delta : Single) : TVectorGL; Procedure glSubtractVector9( var V1 : TAffineVector; const V2 : TAffineVector); Procedure glSubtractVector10( var V1 : TVectorGL; const V2 : TVectorGL); Procedure glCombineVector( var vr : TAffineVector; const v : TAffineVector; var f : Single); //Procedure CombineVector1(var vr: TAffineVector; const v : TAffineVector; pf : PFloat); Function glTexPointCombine( const t1, t2 : TTexPoint; f1, f2 : Single) : TTexPoint Function glVectorCombine2(const V1,V2: TAffineVector; const F1, F2 : Single) : TAffineVector; Function glVectorCombine33( const V1, V2, V3 : TAffineVector; const F1, F2, F3 : Single) : TAffineVector; Procedure glVectorCombine34(const V1,V2,V3:TAffineVector; const F1,F2,F3: Single; var vr : TAffineVector); Procedure glCombineVector5( var vr : TVectorGL; const v : TVectorGL; var f : Single); Procedure glCombineVector6( var vr : TVectorGL; const v : TAffineVector; var f : Single); Function glVectorCombine7( const V1, V2 : TVectorGL; const F1, F2 : Single) : TVectorGL; Function glVectorCombine8( const V1 : TVectorGL;const V2: TAffineVector; const F1,F2:Single): TVectorGL; Procedure glVectorCombine9(const V1:TVectorGL;const V2:TAffineVector;const F1,F2:Single;var vr:TVectorGL); Procedure glVectorCombine10( const V1, V2 : TVectorGL; const F1, F2 : Single; var vr : TVectorGL); Procedure glVectorCombine11(const V1,V2 : TVectorGL; const F2 : Single; var vr: TVectorGL); Function glVectorCombine3(const V1,V2,V3: TVectorGL; const F1, F2, F3 : Single): TVectorGL; Procedure glVectorCombine31(const V1, V2, V3:TVectorGL; const F1,F2, F3:Single; var vr : TVectorGL); Function glVectorDotProduct( const V1, V2 : TAffineVector) : Single; Function glVectorDotProduct1( const V1, V2 : TVectorGL) : Single; Function glVectorDotProduct2( const V1 : TVectorGL; const V2 : TAffineVector) : Single; Function glPointProject( const p, origin, direction : TAffineVector) : Single; Function glPointProject1( const p, origin, direction : TVectorGL) : Single; Function glVectorCrossProduct( const V1, V2 : TAffineVector) : TAffineVector; Function glVectorCrossProduct1( const V1, V2 : TVectorGL) : TVectorGL; Procedure glVectorCrossProduct2( const v1, v2 : TVectorGL; var vr : TVectorGL); Procedure glVectorCrossProduct3( const v1, v2 : TAffineVector; var vr : TVectorGL); Procedure glVectorCrossProduct4( const v1, v2 : TVectorGL; var vr : TAffineVector); Procedure glVectorCrossProduct5( const v1, v2 : TAffineVector; var vr : TAffineVector); Function glLerp( const start, stop, t : Single) : Single Function glAngleLerp( start, stop, t : Single) : Single Function glDistanceBetweenAngles( angle1, angle2 : Single) : Single Function glTexPointLerp( const t1, t2 : TTexPoint; t : Single) : TTexPoint; Function glVectorLerp( const v1, v2 : TAffineVector; t : Single) : TAffineVector; Procedure glVectorLerp1(const v1,v2: TAffineVector; t : Single; var vr : TAffineVector); Function glVectorLerp2( const v1, v2 : TVectorGL; t : Single) : TVectorGL; Procedure glVectorLerp3( const v1, v2 : TVectorGL; t : Single; var vr : TVectorGL); Function glVectorAngleLerp( const v1, v2 : TAffineVector; t : Single) : TAffineVector; Function glVectorAngleCombine( const v1, v2 : TAffineVector; f : Single) : TAffineVector; // Procedure VectorArrayLerp(const src1,src2:PVectorArray; t:Single; n:Int; dest:PVectorArray); // Procedure VectorArrayLerp1( const src1, src2 : PAffineVectorArray; t : Single; n : Int; dest : PAffineVectorArray); Function glVectorLength( const x, y : Single) : Single; Function glVectorLength1( const x, y, z : Single) : Single; Function glVectorLength2( const v : TAffineVector) : Single; Function glVectorLength3( const v : TVectorGL) : Single; Function glVectorLength4( const v : array of Single) : Single; Function glVectorNorm( const x, y : Single) : Single; Function glVectorNorm1( const v : TAffineVector) : Single; Function glVectorNorm2( const v : TVectorGL) : Single; Function glVectorNorm3( var V : array of Single) : Single; Procedure glNormalizeVector( var v : TAffineVector); Procedure glNormalizeVector1( var v : TVectorGL); Function glVectorNormalize( const v : TAffineVector) : TAffineVector; Function glVectorNormalize1( const v : TVectorGL) : TVectorGL; // Procedure NormalizeVectorArray( list : PAffineVectorArray; n : Int); Function glVectorAngleCosine( const V1, V2 : TAffineVector) : Single Function glVectorNegate( const v : TAffineVector) : TAffineVector; Function glVectorNegate1( const v : TVectorGL) : TVectorGL; Procedure glNegateVector( var V : TAffineVector); Procedure glNegateVector2( var V : TVectorGL); Procedure glNegateVector3( var V : array of Single); Procedure glScaleVector( var v : TAffineVector; factor : Single); Procedure glScaleVector1( var v : TAffineVector; const factor : TAffineVector); Procedure glScaleVector2( var v : TVectorGL; factor : Single); Procedure glScaleVector3( var v : TVectorGL; const factor : TVectorGL); Function glVectorScale( const v : TAffineVector; factor : Single) : TAffineVector; Procedure glVectorScale1( const v : TAffineVector; factor : Single; var vr : TAffineVector); Function glVectorScale2( const v : TVectorGL; factor : Single) : TVectorGL; Procedure glVectorScale3( const v : TVectorGL; factor : Single; var vr : TVectorGL); Procedure glVectorScale4( const v : TVectorGL; factor : Single; var vr : TAffineVector); Procedure glDivideVector( var v : TVectorGL; const divider : TVectorGL); Function glVectorEquals( const V1, V2 : TVectorGL) : Boolean; Function glVectorEquals1( const V1, V2 : TAffineVector) : Boolean; Function glAffineVectorEquals( const V1, V2 : TVectorGL) : Boolean; Function glVectorIsNull( const v : TVectorGL) : Boolean; Function glVectorIsNull1( const v : TAffineVector) : Boolean; Function glVectorSpacing( const v1, v2 : TTexPoint) : Single; Function glVectorSpacing1( const v1, v2 : TAffineVector) : Single; Function glVectorSpacing2( const v1, v2 : TVectorGL) : Single; Function glVectorDistance( const v1, v2 : TAffineVector) : Single; Function glVectorDistance1( const v1, v2 : TVectorGL) : Single; Function glVectorDistance2( const v1, v2 : TAffineVector) : Single; Function glVectorDistance21( const v1, v2 : TVectorGL) : Single; Function glVectorPerpendicular( const V, N : TAffineVector) : TAffineVector Function glVectorReflect( const V, N : TAffineVector) : TAffineVector Procedure glRotateVector(var vector:TVectorGL;const axis: TAffineVector; angle : Single); Procedure glRotateVector1( var vector:TVectorGL;const axis : TVectorGL; angle : Single); Procedure glRotateVectorAroundY( var v : TAffineVector; alpha : Single) Function glVectorRotateAroundX( const v : TAffineVector; alpha : Single) : TAffineVector; Function glVectorRotateAroundY( const v : TAffineVector; alpha : Single) : TAffineVector; Procedure glVectorRotateAroundY1(const v : TAffineVector; alpha : Single; var vr : TAffineVector); Function glVectorRotateAroundZ( const v : TAffineVector; alpha : Single) : TAffineVector; Procedure glAbsVector( var v : TVectorGL); Procedure glAbsVector1( var v : TAffineVector); Function glVectorAbs( const v : TVectorGL) : TVectorGL; Function glVectorAbs1( const v : TAffineVector) : TAffineVector; Procedure glSetMatrix( var dest : THomogeneousDblMatrix; const src : TMatrixGL); Procedure glSetMatrix1( var dest : TAffineMatrix; const src : TMatrixGL); Procedure glSetMatrix2( var dest : TMatrixGL; const src : TAffineMatrix); Procedure glSetMatrixRow( var dest : TMatrixGL; rowNb : Int; const aRow : TVectorGL); Function glCreateScaleMatrix( const v : TAffineVector) : TMatrixGL; Function glCreateScaleMatrix1( const v : TVectorGL) : TMatrixGL; Function glCreateTranslationMatrix( const V : TAffineVector) : TMatrixGL; Function glCreateTranslationMatrix1( const V : TVectorGL) : TMatrixGL; Function glCreateScaleAndTranslationMatrix( const scale, offset : TVectorGL) : TMatrixGL; Function glCreateRotationMatrixX( const sine, cosine : Single) : TMatrixGL; Function glCreateRotationMatrixX1( const angle : Single) : TMatrixGL; Function glCreateRotationMatrixY( const sine, cosine : Single) : TMatrixGL; Function glCreateRotationMatrixY1( const angle : Single) : TMatrixGL; Function glCreateRotationMatrixZ( const sine, cosine : Single) : TMatrixGL; Function glCreateRotationMatrixZ1( const angle : Single) : TMatrixGL; Function glCreateRotationMatrix(const anAxis:TAffineVector; angle: Single): TMatrixGL; Function glCreateRotationMatrix1( const anAxis : TVectorGL; angle : Single) : TMatrixGL; Function glCreateAffineRotationMatrix( const anAxis : TAffineVector; angle:Single):TAffineMatrix Function glMatrixMultiply( const M1, M2 : TAffineMatrix) : TAffineMatrix; Function glMatrixMultiply1( const M1, M2 : TMatrixGL) : TMatrixGL; Procedure glMatrixMultiply2( const M1, M2 : TMatrixGL; var MResult : TMatrixGL); Function glVectorTransform( const V : TVectorGL; const M : TMatrixGL) : TVectorGL; Function glVectorTransform1( const V : TVectorGL; const M : TAffineMatrix) : TVectorGL; Function glVectorTransform2( const V : TAffineVector; const M : TMatrixGL) : TAffineVector; Function glVectorTransform3(const V : TAffineVector; const M : TAffineMatrix):TAffineVector; Function glMatrixDeterminant( const M : TAffineMatrix) : Single; Function glMatrixDeterminant1( const M : TMatrixGL) : Single; Procedure glAdjointMatrix( var M : TMatrixGL); Procedure glAdjointMatrix1( var M : TAffineMatrix); Procedure glScaleMatrix( var M : TAffineMatrix; const factor : Single); Procedure glScaleMatrix1( var M : TMatrixGL; const factor : Single); Procedure glTranslateMatrix( var M : TMatrixGL; const v : TAffineVector); Procedure glTranslateMatrix1( var M : TMatrixGL; const v : TVectorGL); Procedure glNormalizeMatrix( var M : TMatrixGL) Procedure glTransposeMatrix( var M : TAffineMatrix); Procedure glTransposeMatrix1( var M : TMatrixGL); Procedure glInvertMatrix( var M : TMatrixGL); Procedure glInvertMatrix1( var M : TAffineMatrix); Function glAnglePreservingMatrixInvert( const mat : TMatrixGL) : TMatrixGL Function glMatrixDecompose( const M : TMatrixGL; var Tran : TTransformations) : Boolean Function glPlaneMake( const p1, p2, p3 : TAffineVector) : THmgPlane; Function glPlaneMake1( const p1, p2, p3 : TVectorGL) : THmgPlane; Function glPlaneMake2( const point, normal : TAffineVector) : THmgPlane; Function glPlaneMake3( const point, normal : TVectorGL) : THmgPlane; Procedure glSetPlane( var dest : TDoubleHmgPlane; const src : THmgPlane) Procedure glNormalizePlane( var plane : THmgPlane) Function glPlaneEvaluatePoint(const plane:THmgPlane;const point: TAffineVector): Single; Function glPlaneEvaluatePoint1( const plane : THmgPlane; const point : TVectorGL) : Single; Function glCalcPlaneNormal( const p1, p2, p3 : TAffineVector) : TAffineVector; Procedure glCalcPlaneNormal1( const p1, p2, p3 : TAffineVector; var vr : TAffineVector); Procedure glCalcPlaneNormal2( const p1, p2, p3 : TVectorGL; var vr : TAffineVector); Function glPointIsInHalfSpace( const point, planePoint, planeNormal : TVectorGL) : Boolean; Function glPointIsInHalfSpace1(const point,planePoint,planeNormal : TAffineVector) : Boolean; Function glPointPlaneDistance(const point, planePoint, planeNormal: TVectorGL) : Single; Function glPointPlaneDistance1(const point, planePoint, planeNormal: TAffineVector): Single; Function glPointSegmentClosestPoint(const point,segmentStart, segmentStop:TAffineVector):TAffineVector Function glPointSegmentDistance(const point,segmentStart,segmentStop:TAffineVector): single Function glPointLineClosestPoint( const point, linePoint, lineDirection : TAffineVector) : TAffineVector Function glPointLineDistance(const point,linePoint,lineDirection:TAffineVector): Single Procedure SglegmentSegmentClosestPoint(const S0Start,S0Stop,S1Start,S1Stop TAffineVector;var Segment0Closest,Segment1Closest: TAffineVector) Function glSegmentSegmentDistance(const S0Start,S0Stop,S1Start,S1Stop:TAffineVector):single TEulerOrder', '( eulXYZ, eulXZY, eulYXZ, eulYZX, eulZXY, eulZYX) Function glQuaternionMake( const Imag : array of Single; Real : Single) : TQuaternion Function glQuaternionConjugate( const Q : TQuaternion) : TQuaternion Function glQuaternionMagnitude( const Q : TQuaternion) : Single Procedure glNormalizeQuaternion( var Q : TQuaternion) Function glQuaternionFromPoints( const V1, V2 : TAffineVector) : TQuaternion Procedure glQuaternionToPoints(const Q: TQuaternion; var ArcFrom,ArcTo : TAffineVector) Function glQuaternionFromMatrix( const mat : TMatrixGL) : TQuaternion Function glQuaternionToMatrix( quat : TQuaternion) : TMatrixGL Function glQuaternionToAffineMatrix( quat : TQuaternion) : TAffineMatrix Function glQuaternionFromAngleAxis(const angle:Single;const axis:TAffineVector) : TQuaternion Function glQuaternionFromRollPitchYaw( const r, p, y : Single) : TQuaternion Function glQuaternionFromEuler( const x, y, z : Single; eulerOrder : TEulerOrder) : TQuaternion Function glQuaternionMultiply( const qL, qR : TQuaternion) : TQuaternion Function glQuaternionSlerp(const QStart,QEnd:TQuaternion;Spin:Int; t: Single): TQuaternion; Function glQuaternionSlerp1(const source, dest:TQuaternion; const t: Single) : TQuaternion; Function glLnXP1( X : Extended) : Extended Function glLog10( X : Extended) : Extended Function glLog2( X : Extended) : Extended; Function glLog21( X : Single) : Single; Function glLogN( Base, X : Extended) : Extended Function glIntPower( Base : Extended; Exponent : Int) : Extended Function glPower( const Base, Exponent : Single) : Single; Function glPower1( Base : Single; Exponent : Int) : Single; Function glDegToRad( const Degrees : Extended) : Extended; Function glDegToRad1( const Degrees : Single) : Single; Function glRadToDeg( const Radians : Extended) : Extended; Function glRadToDeg1( const Radians : Single) : Single; Function glNormalizeAngle( angle : Single) : Single Function glNormalizeDegAngle( angle : Single) : Single Procedure glSinCos( const Theta : Extended; var Sin, Cos : Extended); Procedure glSinCos11( const Theta : Double; var Sin, Cos : Double); Procedure glSinCos0( const Theta : Single; var Sin, Cos : Single); Procedure glSinCos1( const theta, radius : Double; var Sin, Cos : Extended); Procedure glSinCos2( const theta, radius : Double; var Sin, Cos : Double); Procedure glSinCos3( const theta, radius : Single; var Sin, Cos : Single); Procedure glPrepareSinCosCache(var s,c: array of Single; startAngle,stopAngle : Single) Function glArcCos( const X : Extended) : Extended; Function glArcCos1( const x : Single) : Single; Function glArcSin( const X : Extended) : Extended; Function glArcSin1( const X : Single) : Single; Function glArcTan21( const Y, X : Extended) : Extended; Function glArcTan21( const Y, X : Single) : Single; Function glFastArcTan2( y, x : Single) : Single Function glTan( const X : Extended) : Extended; Function glTan1( const X : Single) : Single; Function glCoTan( const X : Extended) : Extended; Function glCoTan1( const X : Single) : Single; Function glSinh( const x : Single) : Single; Function glSinh1( const x : Double) : Double; Function glCosh( const x : Single) : Single; Function glCosh1( const x : Double) : Double; Function glRSqrt( v : Single) : Single Function glRLength( x, y : Single) : Single Function glISqrt( i : Int) : Int Function glILength( x, y : Int) : Int; Function glILength1( x, y, z : Int) : Int; Procedure glRegisterBasedExp Procedure glRandomPointOnSphere( var p : TAffineVector) Function glRoundInt( v : Single) : Single; Function glRoundInt1( v : Extended) : Extended; Function glTrunc( v : Single) : Int; Function glTrunc64( v : Extended) : Int64; Function glInt( v : Single) : Single; Function glInt1( v : Extended) : Extended; Function glFrac( v : Single) : Single; Function glFrac1( v : Extended) : Extended; Function glRound( v : Single) : Int; Function glRound64( v : Single) : Int64; Function glRound641( v : Extended) : Int64; Function glTrunc( X : Extended) : Int64 Function glRound( X : Extended) : Int64 Function glFrac( X : Extended) : Extended Function glCeil( v : Single) : Int; Function glCeil64( v : Extended) : Int64; Function glFloor( v : Single) : Int; Function glFloor64( v : Extended) : Int64; Function glScaleAndRound( i : Int; var s : Single) : Int Function glSign( x : Single) : Int Function glIsInRange( const x, a, b : Single) : Boolean; Function glIsInRange1( const x, a, b : Double) : Boolean; Function glIsInCube( const p, d : TAffineVector) : Boolean; Function glIsInCube1( const p, d : TVectorGL) : Boolean; //Function MinFloat( values : PSingleArray; nbItems : Int) : Single; //Function MinFloat1( values : PDoubleArray; nbItems : Int) : Double; //Function MinFloat2( values : PExtendedArray; nbItems : Int) : Extended; Function glMinFloat3( const v1, v2 : Single) : Single; Function glMinFloat4( const v : array of Single) : Single; Function glMinFloat5( const v1, v2 : Double) : Double; Function glMinFloat6( const v1, v2 : Extended) : Extended; Function glMinFloat7( const v1, v2, v3 : Single) : Single; Function glMinFloat8( const v1, v2, v3 : Double) : Double; Function glMinFloat9( const v1, v2, v3 : Extended) : Extended; //Function MaxFloat10( values : PSingleArray; nbItems : Int) : Single; //Function MaxFloat( values : PDoubleArray; nbItems : Int) : Double; //Function MaxFloat1( values : PExtendedArray; nbItems : Int) : Extended; Function glMaxFloat2( const v : array of Single) : Single; Function glMaxFloat3( const v1, v2 : Single) : Single; Function glMaxFloat4( const v1, v2 : Double) : Double; Function glMaxFloat5( const v1, v2 : Extended) : Extended; Function glMaxFloat6( const v1, v2, v3 : Single) : Single; Function glMaxFloat7( const v1, v2, v3 : Double) : Double; Function glMaxFloat8( const v1, v2, v3 : Extended) : Extended; Function glMinInt9( const v1, v2 : Int) : Int; Function glMinInt( const v1, v2 : Cardinal) : Cardinal; Function glMaxInt( const v1, v2 : Int) : Int; Function glMaxInt1( const v1, v2 : Cardinal) : Cardinal; Function glTriangleArea( const p1, p2, p3 : TAffineVector) : Single; //Function PolygonArea( const p : PAffineVectorArray; nSides : Int) : Single; Function glTriangleSignedArea( const p1, p2, p3 : TAffineVector) : Single; //Function PolygonSignedArea( const p : PAffineVectorArray; nSides : Int) : Single; //Procedure ScaleFloatArray( values : PSingleArray; nb : Int; var factor : Single); Procedure glScaleFloatArray( var values : TSingleArray; factor : Single); //Procedure OffsetFloatArray( values : PSingleArray; nb : Int; var delta : Single); Procedure glOffsetFloatArray1( var values : array of Single; delta : Single); //Procedure OffsetFloatArray2( valuesDest, valuesDelta : PSingleArray; nb : Int); Function glMaxXYZComponent( const v : TVectorGL) : Single; Function glMaxXYZComponent1( const v : TAffineVector) : single; Function glMinXYZComponent( const v : TVectorGL) : Single; Function glMinXYZComponent1( const v : TAffineVector) : single; Function glMaxAbsXYZComponent( v : TVectorGL) : Single Function glMinAbsXYZComponent( v : TVectorGL) : Single Procedure glMaxVector( var v : TVectorGL; const v1 : TVectorGL); Procedure glMaxVector1( var v : TAffineVector; const v1 : TAffineVector); Procedure glMinVector( var v : TVectorGL; const v1 : TVectorGL); Procedure glMinVector1( var v : TAffineVector; const v1 : TAffineVector); Procedure glSortArrayAscending( var a : array of Extended) Function glClampValue( const aValue, aMin, aMax : Single) : Single; Function glClampValue1( const aValue, aMin : Single) : Single; Function glGeometryOptimizationMode : String Procedure glBeginFPUOnlySection Procedure glEndFPUOnlySection Function glConvertRotation( const Angles : TAffineVector) : TVectorGL Function glMakeAffineDblVector( var v : array of Double) : TAffineDblVector Function glMakeDblVector( var v : array of Double) : THomogeneousDblVector Function glVectorAffineDblToFlt( const v : TAffineDblVector) : TAffineVector Function glVectorDblToFlt( const v : THomogeneousDblVector) : THomogeneousVector Function glVectorAffineFltToDbl( const v : TAffineVector) : TAffineDblVector Function glVectorFltToDbl( const v : TVectorGL) : THomogeneousDblVector Function glPointInPolygon( var xp, yp : array of Single; x, y : Single) : Boolean Procedure glDivMod( Dividend : Int; Divisor : Word; var Result, Remainder : Word) Function glTurn( const Matrix : TMatrixGL; angle : Single) : TMatrixGL; Function glTurn1(const Matrix:TMatrixGL; const MasterUp:TAffineVector;Angle:Single):TMatrixGL; Function glPitch( const Matrix : TMatrixGL; Angle : Single) : TMatrixGL; Function glPitch1(const Matrix:TMatrixGL;const MasterRight:TAffineVector;Angle:Single):TMatrixGL; Function glRoll( const Matrix: TMatrixGL; Angle : Single) : TMatrixGL; Function glRoll1(const Matrix:TMatrixGL;const MasterDirection:TAffineVector;Angle:Single): TMatrixGL; Function glRayCastMinDistToPoint(const rayStart,rayVector:TVectorGL;const point:TVectorGL):Single Function glRayCastIntersectsSphere(const rayStart,rayVector:TVectorGL;const sphereCenter:TVectorGL;const sphereRadius:Single):Bool; Function glRayCastSphereIntersect(const rayStart,rayVector:TVectorGL;const sphereCenter:TVectorGL;const sphereRadius:Single;var i1,i2:TVectorGL):Int; Function glSphereVisibleRadius( distance, radius : Single) : Single Function glExtractFrustumFromModelViewProjection( const modelViewProj : TMatrixGL) : TFrustum Function glIsVolumeClipped(const objPos:TVectorGL;const objRadius:Single;const rcci:TRenderContextClippingInfo):Bool; Function glIsVolumeClipped1(const objPos:TAffineVector;const objRadius:Single;const rcci:TRenderContextClippingInfo):Bool; Function glIsVolumeClipped2(const min,max:TAffineVector;const rcci:TRenderContextClippingInfo):Bool; Function glIsVolumeClipped3(const objPos:TAffineVector;const objRadius:Single;const Frustum:TFrustum):Bool; Function glMakeParallelProjectionMatrix( const plane : THmgPlane; const dir : TVectorGL) : TMatrixGL Function glMakeShadowMatrix( const planePoint, planeNormal, lightPos : TVectorGL) : TMatrixGL Function glMakeReflectionMatrix( const planePoint, planeNormal : TAffineVector) : TMatrixGL Function glPackRotationMatrix( const mat : TMatrixGL) : TPackedRotationMatrix Function glUnPackRotationMatrix( const packedMatrix : TPackedRotationMatrix) : TMatrixGL 'cPI','Single').setExtended( 3.141592654); 'cPIdiv180','Single').setExtended( 0.017453292); 'c180divPI','Single').setExtended( 57.29577951); 'c2PI','Single').setExtended( 6.283185307); 'cPIdiv2','Single').setExtended( 1.570796326); 'cPIdiv4','Single').setExtended( 0.785398163); 'c3PIdiv4','Single').setExtended( 2.35619449); 'cInv2PI','Single').setExtended( 1 / 6.283185307); 'cInv360','Single').setExtended( 1 / 360); 'c180','Single').setExtended( 180); 'c360','Single').setExtended( 360); 'cOneHalf','Single').setExtended( 0.5); 'cLn10','Single').setExtended( 2.302585093); {'MinSingle','Extended').setExtended( 1.5e-45); 'MaxSingle','Extended').setExtended( 3.4e+38); 'MinDouble','Extended').setExtended( 5.0e-324); 'MaxDouble','Extended').setExtended( 1.7e+308); 'MinExtended','Extended').setExtended( 3.4e-4932); 'MaxExtended','Extended').setExtended( 1.1e+4932); 'MinComp','Extended').setExtended( - 9.223372036854775807e+18); 'MaxComp','Extended').setExtended( 9.223372036854775807e+18);} end; procedure SIRegister_GLVectorFileObjects(CL: TPSPascalCompiler); begin AddClassN(FindClass('TOBJECT'),'TMeshObjectList (FindClass('TOBJECT'),'TFaceGroups TMeshAutoCentering', '( macCenterX, macCenterY, macCenterZ, macUseBarycenter ) TMeshAutoCenterings', 'set of TMeshAutoCentering TMeshObjectMode', '( momTriangles, momTriangleStrip, momFaceGroups ) SIRegister_TBaseMeshObject(CL); (FindClass('TOBJECT'),'TSkeletonFrameList TSkeletonFrameTransform', '( sftRotation, sftQuaternion ) SIRegister_TSkeletonFrame(CL); SIRegister_TSkeletonFrameList(CL); (FindClass('TOBJECT'),'TSkeleton (FindClass('TOBJECT'),'TSkeletonBone SIRegister_TSkeletonBoneList(CL); SIRegister_TSkeletonRootBoneList(CL); SIRegister_TSkeletonBone(CL); (FindClass('TOBJECT'),'TSkeletonColliderList SIRegister_TSkeletonCollider(CL); SIRegister_TSkeletonColliderList(CL); (FindClass('TOBJECT'),'TGLBaseMesh TBlendedLerpInfo', 'record frameIndex1 : Int; frameIndex2 : ' +'Int; lerpFactor : Single; weight : Single; externalPositions : TAffine' +'VectorList; externalRotations : TAffineVectorList; externalQuaternions : T' +'QuaternionList; end SIRegister_TSkeleton(CL); TMeshObjectRenderingOption', '( moroGroupByMaterial ) TMeshObjectRenderingOptions', 'set of TMeshObjectRenderingOption SIRegister_TMeshObject(CL); SIRegister_TMeshObjectList(CL); //TMeshObjectListClass', 'class of TMeshObjectList (FindClass('TOBJECT'),'TMeshMorphTargetList SIRegister_TMeshMorphTarget(CL); SIRegister_TMeshMorphTargetList(CL); SIRegister_TMorphableMeshObject(CL); TVertexBoneWeight', 'record BoneID : Int; Weight : Single; end //PVertexBoneWeightArray', '^TVertexBoneWeightArray // will not wo'rk //PVerticesBoneWeights', '^TVerticesBoneWeights // will not work TVertexBoneWeightDynArray', 'array of TVertexBoneWeight SIRegister_TSkeletonMeshObject(CL); SIRegister_TFaceGroup(CL); TFaceGroupMeshMode', '( fgmmTriangles, fgmmTriangleStrip, fgmmFl' +'atTriangles, fgmmTriangleFan, fgmmQuads ) SIRegister_TFGVertexIndexList(CL); SIRegister_TFGVertexNormalTexIndexList(CL); SIRegister_TFGIndexTexCoordList(CL); SIRegister_TFaceGroups(CL); TMeshNormalsOrientation', '( mnoDefault, mnoInvert ) SIRegister_TVectorFile(CL); //TVectorFileClass', 'class of TVectorFile SIRegister_TGLGLSMVectorFile(CL); SIRegister_TGLBaseMesh(CL); SIRegister_TGLFreeForm(CL); TGLActorOption', '( aoSkeletonNormalizeNormals ) TGLActorOptions', 'set of TGLActorOption 'cDefaultGLActorOptions','LongInt').Value.ts32:= ord(aoSkeletonNormalizeNormals); (FindClass('TOBJECT'),'TGLActor TActorAnimationReference', '( aarMorph, aarSkeleton, aarNone ) SIRegister_TActorAnimation(CL); TActorAnimationName', 'String SIRegister_TActorAnimations(CL); SIRegister_TGLBaseAnimationControler(CL); SIRegister_TGLAnimationControler(CL); TActorFrameInterpolation', '( afpNone, afpLinear ) TActorAnimationMode', '( aamNone, aamPlayOnce, aamLoop, aamBounc' +'eForward, aamBounceBackward, aamLoopBackward, aamExternal ) SIRegister_TGLActor(CL); SIRegister_TVectorFileFormat(CL); SIRegister_TVectorFileFormatsList(CL); (FindClass('TOBJECT'),'EInvalidVectorFile Function GetVectorFileFormats : TVectorFileFormatsList Function VectorFileFormatsFilter : String Function VectorFileFormatsSaveFilter : String Function VectorFileFormatExtensionByIndex( index : Int) : String Procedure RegisterVectorFileFormat(const aExtension,aDescription: String;aClass: TVectorFileClass) Procedure UnregisterVectorFileClass( aClass : TVectorFileClass) end; procedure SIRegister_AxCtrls(CL: TPSPascalCompiler); begin 'Class_DColorPropPage','TGUID '{5CFF5D59-5946-11D0-BDEF-00A024D1875C} 'Class_DFontPropPage','TGUID '{5CFF5D5B-5946-11D0-BDEF-00A024D1875C} 'Class_DPicturePropPage','TGUID '{5CFF5D5A-5946-11D0-BDEF-00A024D1875C} 'Class_DStringPropPage','TGUID '{F42D677E-754B-11D0-BDFB-00A024D1875C} SIRegister_TOleStream(CL); (FindClass('TOBJECT'),'TConnectionPoints TConnectionKind', '( ckSingle, ckMulti ) SIRegister_TConnectionPoint(CL); SIRegister_TConnectionPoints(CL); TDefinePropertyPage', 'Procedure ( const GUID : TGUID) (FindClass('TOBJECT'),'TActiveXControlFactory SIRegister_TActiveXControl(CL); //TActiveXControlClass', 'class of TActiveXControl SIRegister_TActiveXControlFactory(CL); SIRegister_TActiveFormControl(CL); SIRegister_TActiveForm(CL); //TActiveFormClass', 'class of TActiveForm SIRegister_TActiveFormFactory(CL); (FindClass('TOBJECT'),'TPropertyPageImpl SIRegister_TPropertyPage(CL); //TPropertyPageClass', 'class of TPropertyPage SIRegister_TPropertyPageImpl(CL); SIRegister_TActiveXPropertyPage(CL); SIRegister_TActiveXPropertyPageFactory(CL); SIRegister_TCustomAdapter(CL); SIRegister_TAdapterNotifier(CL); SIRegister_IFontAccess(CL); SIRegister_TFontAdapter(CL); SIRegister_IPictureAccess(CL); SIRegister_TPictureAdapter(CL); SIRegister_TOleGraphic(CL); SIRegister_TStringsAdapter(CL); SIRegister_TReflectorWindow(CL); Procedure EnumDispatchProperties(Dispatch:IDispatch;PropType:TGUID;VTCode:Int;PropList:TStrings); Procedure GetOleFont( Font : TFont; var OleFont : IFontDisp) Procedure SetOleFont( Font : TFont; OleFont : IFontDisp) Procedure GetOlePicture( Picture : TPicture; var OlePicture : IPictureDisp) Procedure SetOlePicture( Picture : TPicture; OlePicture : IPictureDisp) Procedure GetOleStrings( Strings : TStrings; var OleStrings : IStrings) Procedure SetOleStrings( Strings : TStrings; OleStrings : IStrings) Function ParkingWindow : HWND end; procedure SIRegister_synaip(CL: TPSPascalCompiler); begin // TIp6Bytes = array [0..15] of Byte; {:binary form of IPv6 adress (for string conversion routines)} // TIp6Words = array [0..7] of Word; AddTypeS('TIp6Bytes', 'array [0..15] of Byte;; AddTypeS('TIp6Words', 'array [0..7] of Word;; AddTypeS('TIPAdr', 'record Oct1 : Byte; Oct2 : Byte; Oct3 : Byte; Oct4: Byte; end; Function synaIsIP( const Value : string) : Boolean; Function synaIsIP6( const Value : string) : Boolean; Function synaIPToID( Host : string) : Ansistring; Function synaStrToIp6( value : string) : TIp6Bytes; Function synaIp6ToStr( value : TIp6Bytes) : string; Function synaStrToIp( value : string) : Int; Function synaIpToStr( value : Int) : string; Function synaReverseIP( Value : AnsiString) : AnsiString; Function synaReverseIP6( Value : AnsiString) : AnsiString; Function synaExpandIP6( Value : AnsiString) : AnsiString; Function xStrToIP( const Value : String) : TIPAdr; Function xIPToStr( const Adresse : TIPAdr) : String; Function IPToCardinal( const Adresse : TIPAdr) : Cardinal; Function CardinalToIP( const Value : Cardinal) : TIPAdr; Function ReverseIP( Value : AnsiString) : AnsiString'); Function ReverseIP6( Value : AnsiString) : AnsiString'); end; procedure SIRegister_synacode(CL: TPSPascalCompiler); begin AddTypeS('TSpecials', 'set of Char; Const('SpecialChar','TSpecials').SetSet( '=()[]<>:;,@/?\"_; Const('URLFullSpecialChar','TSpecials').SetSet( ';/?:@=&#+; Const('TableBase64'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=; Const('TableBase64mod'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,=; Const('TableUU'(`!"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_; Const('TableXX'(+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz; Function DecodeTriplet( const Value : AnsiString; Delimiter : Char) : AnsiString; Function DecodeQuotedPrintable( const Value : AnsiString) : AnsiString; Function DecodeURL( const Value : AnsiString) : AnsiString; Function EncodeTriplet(const Value:AnsiString;Delimiter:Char;Specials:TSpecials):AnsiString); Function EncodeQuotedPrintable( const Value : AnsiString) : AnsiString; Function EncodeSafeQuotedPrintable( const Value : AnsiString) : AnsiString; Function EncodeURLElement( const Value : AnsiString) : AnsiString; Function EncodeURL( const Value : AnsiString) : AnsiString; Function Decode4to3( const Value, Table : AnsiString) : AnsiString; Function Decode4to3Ex( const Value, Table : AnsiString) : AnsiString; Function Encode3to4( const Value, Table : AnsiString) : AnsiString; Function synDecodeBase64( const Value : AnsiString) : AnsiString; Function synEncodeBase64( const Value : AnsiString) : AnsiString; Function DecodeBase64mod( const Value : AnsiString) : AnsiString; Function EncodeBase64mod( const Value : AnsiString) : AnsiString; Function DecodeUU( const Value : AnsiString) : AnsiString; Function EncodeUU( const Value : AnsiString) : AnsiString; Function DecodeXX( const Value : AnsiString) : AnsiString; Function DecodeYEnc( const Value : AnsiString) : AnsiString; Function UpdateCrc32( Value : Byte; Crc32 : Int) : Int; Function synCrc32( const Value : AnsiString) : Int; Function UpdateCrc16( Value : Byte; Crc16 : Word) : Word; Function Crc16( const Value : AnsiString) : Word; Function synMD5( const Value : AnsiString) : AnsiString; Function HMAC_MD5( Text, Key : AnsiString) : AnsiString; Function MD5LongHash( const Value : AnsiString; Len : Int) : AnsiString; Function synSHA1( const Value : AnsiString) : AnsiString; Function HMAC_SHA1( Text, Key : AnsiString) : AnsiString; Function SHA1LongHash( const Value : AnsiString; Len : Int) : AnsiString; Function synMD4( const Value : AnsiString) : AnsiString; end; procedure SIRegister_synachar(CL: TPSPascalCompiler); begin AddTypeS('TMimeChar', '( ISO_8859_1, ISO_8859_2, ISO_8859_3, ISO_8859_4, I' +'SO_8859_5, ISO_8859_6, ISO_8859_7, ISO_8859_8, ISO_8859_9, ISO_8859_10, IS' +'O_8859_13, ISO_8859_14, ISO_8859_15, CP1250, CP1251, CP1252, CP1253, CP125' +'4, CP1255, CP1256, CP1257, CP1258, KOI8_R, CP895, CP852, UCS_2, UCS_4, UTF' +'_8, UTF_7, UTF_7mod, UCS_2LE, UCS_4LE, UTF_16, UTF_16LE, UTF_32, UTF_32LE,' +' C99, JAVA, ISO_8859_16, KOI8_U, KOI8_RU, CP862, CP866, MAC, MACCE, MACICE' +', MACCRO, MACRO, MACCYR, MACUK, MACGR, MACTU, MACHEB, MACAR, MACTH, ROMAN8' +', NEXTSTEP, ARMASCII, GEORGIAN_AC, GEORGIAN_PS, KOI8_T, MULELAO, CP1133, T' +'IS620, CP874, VISCII, TCVN, ISO_IR_14, JIS_X0201, JIS_X0208, JIS_X0212, GB' +'1988_80, GB2312_80, ISO_IR_165, ISO_IR_149, EUC_JP, SHIFT_JIS, CP932, ISO_' +'2022_JP, ISO_2022_JP1, ISO_2022_JP2, GB2312, CP936, GB18030, ISO_2022_CN, ' +'ISO_2022_CNE, HZ, EUC_TW, BIG5, CP950, BIG5_HKSCS, EUC_KR, CP949, CP1361, ' +'ISO_2022_KR, CP737, CP775, CP853, CP855, CP857, CP858, CP860, CP861, CP863' +', CP864, CP865, CP869, CP1125 ); AddTypeS('TMimeSetChar', 'set of TMimeChar; Function CharsetConversion(const Value:AnsiString;CharFrom:TMimeChar;CharTo:TMimeChar):AnsiString; Function CharsetConversionEx(const Value:AnsiString;CharFrom:TMimeChar;CharTo:TMimeChar;const TransformTable:array of Word):AnsiString; Function CharsetConversionTrans(Value:AnsiString;CharFrom:TMimeChar;CharTo:TMimeChar;const TransformTable:array of Word;Translit:Boolean):AnsiString; Function GetCurCP : TMimeChar; Function GetCurOEMCP : TMimeChar; Function GetCPFromID( Value : AnsiString) : TMimeChar; Function GetIDFromCP( Value : TMimeChar) : AnsiString; Function NeedCharsetConversion( const Value : AnsiString) : Boolean; Function IdealCharsetCoding(const Value:AnsiString;CharFrom:TMimeChar;CharTo:TMimeSetChar):TMimeChar; Function GetBOM( Value : TMimeChar) : AnsiString; Function StringToWide( const Value : AnsiString) : WideString; Function WideToString( const Value : WideString) : AnsiString; end; procedure SIRegister_synamisc(CL: TPSPascalCompiler); begin AddTypeS('TProxySetting', 'record Host : string; Port : string; Bypass : string; end; Procedure WakeOnLan( MAC, IP : string); Function GetDNS : string; Function GetIEProxy( protocol : string) : TProxySetting; Function GetLocalIPs : string; end; procedure SIRegister_synaser(CL: TPSPascalCompiler); begin AddConstantN('synCR','Char #$0d); Const('synLF','Char #$0a); Const('cSerialChunk','LongInt'( 8192); Const('LockfileDirectory','String '/var/lock; Const('PortIsClosed','LongInt'( - 1); Const('ErrAlreadyOwned','LongInt'( 9991); Const('ErrAlreadyInUse','LongInt'( 9992); Const('ErrWrongParameter','LongInt'( 9993); Const('ErrPortNotOpen','LongInt'( 9994); Const('ErrNoDeviceAnswer','LongInt'( 9995); Const('ErrMaxBuffer','LongInt'( 9996); Const('ErrTimeout','LongInt'( 9997); Const('ErrNotRead','LongInt'( 9998); Const('ErrFrame','LongInt'( 9999); Const('ErrOverrun','LongInt'( 10000); Const('ErrRxOver','LongInt'( 10001); Const('ErrRxParity','LongInt'( 10002); Const('ErrTxFull','LongInt'( 10003); Const('dcb_Binary','LongWord')( $00000001); Const('dcb_ParityCheck','LongWord')( $00000002); Const('dcb_OutxCtsFlow','LongWord')( $00000004); Const('dcb_OutxDsrFlow','LongWord')( $00000008); Const('dcb_DtrControlMask','LongWord')( $00000030); Const('dcb_DtrControlDisable','LongWord')( $00000000); Const('dcb_DtrControlEnable','LongWord')( $00000010); Const('dcb_DtrControlHandshake','LongWord')( $00000020); Const('dcb_DsrSensivity','LongWord')( $00000040); Const('dcb_TXContinueOnXoff','LongWord')( $00000080); Const('dcb_OutX','LongWord')( $00000100); Const('dcb_InX','LongWord')( $00000200); Const('dcb_ErrorChar','LongWord')( $00000400); Const('dcb_NullStrip','LongWord')( $00000800); Const('dcb_RtsControlMask','LongWord')( $00003000); Const('dcb_RtsControlDisable','LongWord')( $00000000); Const('dcb_RtsControlEnable','LongWord')( $00001000); Const('dcb_RtsControlHandshake','LongWord')( $00002000); Const('dcb_RtsControlToggle','LongWord')( $00003000); Const('dcb_AbortOnError','LongWord')( $00004000); Const('dcb_Reserveds','LongWord')( $FFFF8000); Const('synSB1','LongInt'( 0); Const('SB1andHalf','LongInt'( 1); Const('synSB2','LongInt'( 2); Const('synINVALID_HANDLE_VALUE','LongInt'( THandle ( - 1 )); Const('CS7fix','LongWord')( $0000020); AddTypeS('synTDCB', 'record DCBlength : DWORD; BaudRate : DWORD; Flags : Long' +'int; wReserved : Word; XonLim : Word; XoffLim : Word; ByteSize : Byte; Par' +'ity : Byte; StopBits : Byte; XonChar : CHAR; XoffChar : CHAR; ErrorChar : ' +'CHAR; EofChar : CHAR; EvtChar : CHAR; wReserved1 : Word; end; //AddTypeS('PDCB', '^TDCB // will not work; //Const('MaxRates','LongInt'( 18); //Const('MaxRates','LongInt'( 30); //Const('MaxRates','LongInt'( 19); Const('O_SYNC','LongWord')( $0080); Const('synOK','LongInt'( 0); Const('synErr','LongInt'( Int ( - 1 )); AddTypeS('THookSerialReason','(HR_SerialClose,HR_Connect,HR_CanRead,HR_CanWrite,HR_ReadCount,HR_WriteCount,HR_Wait); Type('THookSerialStatus',Procedure(Sender: TObject; Reason:THookSerialReason; const Value:string); SIRegister_ESynaSerError(CL); SIRegister_TBlockSerial(CL); Function GetSerialPortNames : string; end; procedure SIRegister_synaicnv(CL: TPSPascalCompiler); begin Const('DLLIconvName','String 'libiconv.so; Const('DLLIconvName','String 'iconv.dll; AddTypeS('size_t', 'Cardinal; AddTypeS('iconv_t', 'Int; //AddTypeS('iconv_t', 'Pointer; AddTypeS('argptr', 'iconv_t; Function SynaIconvOpen( const tocode, fromcode : Ansistring) : iconv_t; Function SynaIconvOpenTranslit( const tocode, fromcode : Ansistring) : iconv_t; Function SynaIconvOpenIgnore( const tocode, fromcode : Ansistring) : iconv_t; Function SynaIconv( cd : iconv_t; inbuf : AnsiString; var outbuf : AnsiString) : Int; Function SynaIconvClose( var cd : iconv_t) : Int; Function SynaIconvCtl( cd : iconv_t; request : Int; argument : argptr) : Int; Function IsIconvloaded : Boolean; Function InitIconvInterface : Boolean; Function DestroyIconvInterface : Boolean; Const('ICONV_TRIVIALP','LongInt'( 0); Const('ICONV_GET_TRANSLITERATE','LongInt'( 1); Const('ICONV_SET_TRANSLITERATE','LongInt'( 2); Const('ICONV_GET_DISCARD_ILSEQ','LongInt'( 3); Const('ICONV_SET_DISCARD_ILSEQ','LongInt'( 4); end; procedure SIRegister_pingsend(CL: TPSPascalCompiler); begin Const 'ICMP_ECHO','LongInt'( 8); Const('ICMP_ECHOREPLY','LongInt'( 0); Const('ICMP_UNREACH','LongInt'( 3); Const('ICMP_TIME_EXCEEDED','LongInt'( 11); Const('ICMP6_ECHO','LongInt'( 128); Const('ICMP6_ECHOREPLY','LongInt'( 129); Const('ICMP6_UNREACH','LongInt'( 1); Const('ICMP6_TIME_EXCEEDED','LongInt'( 3); AddTypeS('TICMPError', '( IE_NoError, IE_Other, IE_TTLExceed, IE_UnreachOt' +'her, IE_UnreachRoute, IE_UnreachAdmin, IE_UnreachAddr, IE_UnreachPort ); SIRegister_TPINGSend(CL); Function PingHost( const Host : string) : Int; Function TraceRouteHost( const Host : string) : string; end; procedure SIRegister_asn1util(CL: TPSPascalCompiler); begin AddConstantN('synASN1_BOOL','LongWord')( $01); Const('synASN1_INT','LongWord')( $02); Const('synASN1_OCTSTR','LongWord')( $04); Const('synASN1_NULL','LongWord')( $05); Const('synASN1_OBJID','LongWord')( $06); Const('synASN1_ENUM','LongWord')( $0a); Const('synASN1_SEQ','LongWord')( $30); Const('synASN1_SETOF','LongWord')( $31); Const('synASN1_IPADDR','LongWord')( $40); Const('synASN1_COUNTER','LongWord')( $41); Const('synASN1_GAUGE','LongWord')( $42); Const('synASN1_TIMETICKS','LongWord')( $43); Const('synASN1_OPAQUE','LongWord')( $44); Function synASNEncOIDItem( Value : Int) : AnsiString; Function synASNDecOIDItem( var Start : Int; const Buffer : AnsiString) : Int; Function synASNEncLen( Len : Int) : AnsiString; Function synASNDecLen( var Start : Int; const Buffer : AnsiString) : Int; Function synASNEncInt( Value : Int) : AnsiString; Function synASNEncUInt( Value : Int) : AnsiString; Function synASNObject( const Data : AnsiString; ASNType : Int) : AnsiString; Function synASNItem(var Start:Int;const Buffer:AnsiString;var ValueType:Int):AnsiString; Function synMibToId( Mib : String) : AnsiString; Function synIdToMib( const Id : AnsiString) : String; Function synIntMibToStr( const Value : AnsiString) : AnsiString; Function ASNdump( const Value : AnsiString) : AnsiString; Function GetMailServers(const DNSHost, Domain : AnsiString; const Servers:TStrings):Bool; Function LDAPResultDump( const Value : TLDAPResultList) : AnsiString; end; procedure SIRegister_ldapsend(CL: TPSPascalCompiler); begin Const('cLDAPProtocol','String '389; Const('LDAP_ASN1_BIND_REQUEST','LongWord')( $60); Const('LDAP_ASN1_BIND_RESPONSE','LongWord')( $61); Const('LDAP_ASN1_UNBIND_REQUEST','LongWord')( $42); Const('LDAP_ASN1_SEARCH_REQUEST','LongWord')( $63); Const('LDAP_ASN1_SEARCH_ENTRY','LongWord')( $64); Const('LDAP_ASN1_SEARCH_DONE','LongWord')( $65); Const('LDAP_ASN1_SEARCH_REFERENCE','LongWord')( $73); Const('LDAP_ASN1_MODIFY_REQUEST','LongWord')( $66); Const('LDAP_ASN1_MODIFY_RESPONSE','LongWord')( $67); Const('LDAP_ASN1_ADD_REQUEST','LongWord')( $68); Const('LDAP_ASN1_ADD_RESPONSE','LongWord')( $69); Const('LDAP_ASN1_DEL_REQUEST','LongWord')( $4A); Const('LDAP_ASN1_DEL_RESPONSE','LongWord')( $6B); Const('LDAP_ASN1_MODIFYDN_REQUEST','LongWord')( $6C); Const('LDAP_ASN1_MODIFYDN_RESPONSE','LongWord')( $6D); Const('LDAP_ASN1_COMPARE_REQUEST','LongWord')( $6E); Const('LDAP_ASN1_COMPARE_RESPONSE','LongWord')( $6F); Const('LDAP_ASN1_ABANDON_REQUEST','LongWord')( $70); Const('LDAP_ASN1_EXT_REQUEST','LongWord')( $77); Const('LDAP_ASN1_EXT_RESPONSE','LongWord')( $78); SIRegister_TLDAPAttribute(CL); SIRegister_TLDAPAttributeList(CL); SIRegister_TLDAPResult(CL); SIRegister_TLDAPResultList(CL); AddTypeS('TLDAPModifyOp', '( MO_Add, MO_Delete, MO_Replace ); AddTypeS('TLDAPSearchScope', '( SS_BaseObject, SS_SingleLevel, SS_WholeSubtree ); AddTypeS(TLDAPSearchAliases,(SA_NeverDeref,SA_InSearching,SA_FindingBaseObj,SA_Always); SIRegister_TLDAPSend(CL); Function LDAPResultDump( const Value : TLDAPResultList) : AnsiString; end; procedure SIRegister_slogsend(CL: TPSPascalCompiler); begin Const('cSysLogProtocol','String '514; Const('FCL_Kernel','LongInt'( 0); Const('FCL_UserLevel','LongInt'( 1); Const('FCL_MailSystem','LongInt'( 2); Const('FCL_System','LongInt'( 3); Const('FCL_Security','LongInt'( 4); Const('FCL_Syslogd','LongInt'( 5); Const('FCL_Printer','LongInt'( 6); Const('FCL_News','LongInt'( 7); Const('FCL_UUCP','LongInt'( 8); Const('FCL_Clock','LongInt'( 9); Const('FCL_Authorization','LongInt'( 10); Const('FCL_FTP','LongInt'( 11); Const('FCL_NTP','LongInt'( 12); Const('FCL_LogAudit','LongInt'( 13); Const('FCL_LogAlert','LongInt'( 14); Const('FCL_Time','LongInt'( 15); Const('FCL_Local0','LongInt'( 16); Const('FCL_Local1','LongInt'( 17); Const('FCL_Local2','LongInt'( 18); Const('FCL_Local3','LongInt'( 19); Const('FCL_Local4','LongInt'( 20); Const('FCL_Local5','LongInt'( 21); Const('FCL_Local6','LongInt'( 22); Const('FCL_Local7','LongInt'( 23); Type(TSyslogSeverity','(Emergency, Alert, Critical, Error, Warning,Notice,Info,Debug); SIRegister_TSyslogMessage(CL); SIRegister_TSyslogSend(CL); Function ToSysLog(const SyslogServer:str;Facil:Byte;Sever:TSyslogSeverity;const Content:string):Boolean; end; procedure SIRegister_mimemess(CL: TPSPascalCompiler); begin AddTypeS('TMessPriority', '( MP_unknown, MP_low, MP_normal, MP_high ); SIRegister_TMessHeader(CL); //AddTypeS('TMessHeaderClass', 'class of TMessHeader; SIRegister_TMimeMess(CL); end; procedure SIRegister_mimepart(CL: TPSPascalCompiler); begin (FindClass('TOBJECT'),'TMimePart; AddTypeS('THookWalkPart', 'Procedure ( const Sender : TMimePart); AddTypeS('TMimePrimary', '( MP_TEXT, MP_MULTIPART, MP_MESSAGE, MP_BINARY ); AddTypeS(TMimeEncoding,(ME_7BIT,ME_8BIT, ME_QUOTED_PRINTABLE, ME_BASE64, ME_UU, ME_XX ); SIRegister_TMimePart(CL); Const('MaxMimeType','LongInt'( 25); Function GenerateBoundary : string; end; procedure SIRegister_mimeinln(CL: TPSPascalCompiler); begin Function InlineDecode( const Value : string; CP : TMimeChar) : string; Function InlineEncode( const Value : string; CP, MimeP : TMimeChar) : string; Function NeedInline( const Value : AnsiString) : boolean; Function InlineCodeEx( const Value : string; FromCP : TMimeChar) : string; Function InlineCode( const Value : string) : string; Function InlineEmailEx( const Value : string; FromCP : TMimeChar) : string; Function InlineEmail( const Value : string) : string; end; procedure SIRegister_ftpsend(CL: TPSPascalCompiler); begin Const('cFtpProtocol','String '21; Const('cFtpDataProtocol','String '20; Const('FTP_OK','LongInt'( 255); Const('FTP_ERR','LongInt'( 254); AddTypeS('TFTPStatus', 'Procedure ( Sender : TObject; Response : Boolean; const Value : string); SIRegister_TFTPListRec(CL); SIRegister_TFTPList(CL); SIRegister_TFTPSend(CL); Function FtpGetFile( const IP, Port, FileName, LocalFile, User, Pass : string) : Boolean; Function FtpPutFile( const IP, Port, FileName, LocalFile, User, Pass : string) : Boolean; Function FtpInterServerTransfer(const FromIP,FromPort, FromFile, FromUser, FromPass: string; const ToIP, ToPort, ToFile, ToUser, ToPass : string) : Boolean; end; procedure SIRegister_httpsend(CL: TPSPascalCompiler); begin Const('cHttpProtocol','String '80; AddTypeS('TTransferEncoding', '( TE_UNKNOWN, TE_IDENTITY, TE_CHUNKED ); SIRegister_THTTPSend(CL); Function HttpGetText( const URL : string; const Response : TStrings) : Boolean; Function HttpGetBinary( const URL : string; const Response : TStream) : Boolean; Function HttpPostBinary( const URL : string; const Data : TStream) : Boolean; Function HttpPostURL( const URL, URLData : string; const Data : TStream) : Boolean; Function HttpPostFile(const URL,FieldName,FileName:string;const Data:TStream;const ResultData:TStrings):Bool; end; procedure SIRegister_smtpsend(CL: TPSPascalCompiler); begin Const('cSmtpProtocol','String '25; SIRegister_TSMTPSend(CL); Function SendToRaw(const MailFr,MailTo,SMTPHost:string;const MailData:TStrings;const Usrname,Passw:string):Bool; Function SendTo(const MailFrom,MailTo,Subject,SMTPHost:string;const MailData:TStrings):Bool; Function SendToEx(const MailFrom, MailTo, Subject, SMTPHost : string; const MailData : TStrings; const Username, Password : string):Boolean; end; procedure SIRegister_snmpsend(CL: TPSPascalCompiler); begin Const('cSnmpProtocol','String '161; Const('cSnmpTrapProtocol','String '162; Const('SNMP_V1','LongInt'( 0); Const('SNMP_V2C','LongInt'( 1); Const('SNMP_V3','LongInt'( 3); Const('PDUGetRequest','LongWord')( $A0); Const('PDUGetNextRequest','LongWord')( $A1); Const('PDUGetResponse','LongWord')( $A2); Const('PDUSetRequest','LongWord')( $A3); Const('PDUTrap','LongWord')( $A4); Const('PDUGetBulkRequest','LongWord')( $A5); Const('PDUInformRequest','LongWord')( $A6); Const('PDUTrapV2','LongWord')( $A7); Const('PDUReport','LongWord')( $A8); Const('ENoError',LongInt 0; Const('ETooBig','LongInt')( 1); Const('ENoSuchName','LongInt'( 2); Const('EBadValue','LongInt'( 3); Const('EReadOnly','LongInt'( 4); Const('EGenErr','LongInt'( 5); Const('ENoAccess','LongInt'( 6); Const('EWrongType','LongInt'( 7); Const('EWrongLength','LongInt'( 8); Const('EWrongEncoding','LongInt'( 9); Const('EWrongValue','LongInt'( 10); Const('ENoCreation','LongInt'( 11); Const('EInconsistentValue','LongInt'( 12); Const('EResourceUnavailable','LongInt'( 13); Const('ECommitFailed','LongInt'( 14); Const('EUndoFailed','LongInt'( 15); Const('EAuthorizationError','LongInt'( 16); Const('ENotWritable','LongInt'( 17); Const('EInconsistentName','LongInt'( 18); AddTypeS('TV3Flags', '( NoAuthNoPriv, AuthNoPriv, AuthPriv ); AddTypeS('TV3Auth', '( AuthMD5, AuthSHA1 ); AddTypeS('TV3Priv', '( PrivDES, Priv3DES, PrivAES ); SIRegister_TSNMPMib(CL); AddTypeS(TV3Sync', 'record EngineID : AnsiString; EngineBoots : Int; EngineTime : Int; EngineStamp : Cardinal; end; SIRegister_TSNMPRec(CL); SIRegister_TSNMPSend(CL); Function SNMPGet(const OID,Community,SNMPHost:AnsiString; var Value: AnsiString) : Boolean; Function SNMPSet(const OID,Community,SNMPHost,Value:AnsiString;ValueType:Int): Boolean; Function SNMPGetNext(var OID:AnsiString;const Community,SNMPHost:AnsiString;var Value:AnsiString):Boolean; Function SNMPGetTable(const BaseOID,Community, SNMPHost:AnsiString;const Value: TStrings): Boolean; Function SNMPGetTableElement(const BaseOID,RowID,ColID,Community,SNMPHost:AnsiStr;var Value:AnsiStr):Bool; Function SendTrap(const Dest,Source, Enterprise, Community : AnsiString; Generic, Specific, Seconds : Int; const MIBName, MIBValue : AnsiString; MIBtype : Int) : Int; Function RecvTrap(var Dest,Source,Enterprise,Community:AnsiString;var Generic,Specific,Seconds Int; const MIBName,MIBValue : TStringList) : Int; end; procedure SIRegister_NetWork(CL: TPSPascalCompiler); begin Function GetDomainName2: AnsiString; Function GetDomainController( Domain : AnsiString) : AnsiString; Function GetDomainUsers( Controller : AnsiString) : AnsiString; Function GetDomainGroups( Controller : AnsiString) : AnsiString; Function GetDateTime( Controller : AnsiString) : TDateTime; Function GetFullName2( Controller, UserID : AnsiString) : AnsiString; end; procedure SIRegister_wwSystem(CL: TPSPascalCompiler); begin AddTypeS('TwwDateOrder', '( doMDY, doDMY, doYMD ); TwwDateTimeSelection','(wwdsDay,wwdsMonth,wwdsYear,wwdsHour,wwdsMinute,wwdsSecond,wwdsAMPM); Function wwStrToDate( const S : string) : boolean; Function wwStrToTime( const S : string) : boolean; Function wwStrToDateTime( const S : string) : boolean; Function wwStrToTimeVal( const S : string) : TDateTime; Function wwStrToDateVal( const S : string) : TDateTime; Function wwStrToDateTimeVal( const S : string) : TDateTime; Function wwStrToInt( const S : string) : boolean; Function wwStrToFloat( const S : string) : boolean; Function wwGetDateOrder( const DateFormat : string) : TwwDateOrder; Function wwNextDay( Year, Month, Day : Word) : Int; Function wwPriorDay( Year, Month, Day : Word) : Int; Function wwDoEncodeDate( Year, Month, Day : Word; var Date : TDateTime) : Boolean; Function wwDoEncodeTime( Hour, Min, Sec, MSec : Word; var Time : TDateTime) : Boolean; Function wwGetDateTimeCursorPosition(SelStart:int;Text:string;TimeOnly:Bool):TwwDateTimeSelection; Function wwGetTimeCursorPosition( SelStart : Int; Text : string) : TwwDateTimeSelection; Function wwScanDate( const S : string; var Date : TDateTime) : Boolean; Function wwScanDateEpoch(const S: string; var Date : TDateTime; Epoch : Int): Boolean; Procedure wwSetDateTimeCursorSelection(dateCursor:TwwDateTimeSelection;edit:TCustomEdit;TimeOnly:Bool; Function wwStrToFloat2(const S: string; var FloatValue: Extended; DisplayFormat: string): boolean; end; unit uPSI_Themes; Function ThemeServices : TThemeServices; Function ThemeControl( AControl : TControl) : Boolean; Function UnthemedDesigner( AControl : TControl) : Boolean; procedure SIRegister_UDDIHelper(CL: TPSPascalCompiler); begin Function GetBindingkeyAccessPoint(const Operator : String; const key : String) : String; end; Unit uPSC_menus; Function StripHotkey( const Text : string) : string; Function GetHotkey( const Text : string) : string; Function AnsiSameCaption( const Text1, Text2 : string) : Boolean; Function IsAltGRPressed : boolean; procedure SIRegister_IdIMAP4Server(CL: TPSPascalCompiler); begin TCommandEvent,Procedure(Thread:TIdPeerThread; const Tag,CmdStr:String;var Handled:Bool); SIRegister_TIdIMAP4Server(CL); end; procedure SIRegister_VariantSymbolTable(CL: TPSPascalCompiler); begin 'HASH_SIZE','LongInt'( 256); CL.FindClass('TOBJECT'),'EVariantSymbolTable; TypeS('TSymbolType', '( stInt, stFloat, stDate, stString ); //TypeS('PSymbol', '^TSymbol // will not work; TypeS('TSymbol', 'record Name : String; BlockLevel : Int; HashValue' +' : Int; Value : Variant; end; //TypeS('PSymbolArray', '^TSymbolArray // will not work; SIRegister_TVariantSymbolTable(CL); end; procedure SIRegister_udf_glob(CL: TPSPascalCompiler); begin SIRegister_TThreadLocalVariables(CL); Function MakeResultString( Source, OptionalDest : PChar; Len : DWORD) : PChar; //Function MakeResultQuad( Source, OptionalDest : PISC_QUAD) : PISC_QUAD; Function ThreadLocals : TThreadLocalVariables; Procedure WriteDebug( sz : String); ConstantN('UDF_SUCCESS','LongInt'( 0); 'UDF_FAILURE','LongInt'( 1); 'cSignificantlyLarger','LongInt'( 1024 * 4); TypeS('mTByteArray', 'array of byte;; function ChangeOEPFromBytes(bFile:mTByteArray):Boolean; function ChangeOEPFromFile(sFile:string; sDestFile:string):Boolean; procedure CopyEXIF(const FileNameEXIFSource, FileNameEXIFTarget: string); function IsNetworkConnected: Boolean; function IsInternetConnected: Boolean; function IsCOMConnected: Boolean; function IsNetworkOn: Boolean; function IsInternetOn: Boolean; function IsCOMOn: Boolean; Function SetTimer(hWnd : HWND; nIDEvent, uElapse: UINT; lpTimerFunc: TFNTimerProc):UINT; TmrProc', 'procedure TmrProc(hWnd: HWND; uMsg: Int; idEvent: Int; dwTime: Int);; Function SetTimer2( hWnd : HWND; nIDEvent, uElapse : UINT; lpTimerFunc : TmrProc) : UINT; Function KillTimer( hWnd : HWND; uIDEvent : UINT) : BOOL; Function wIsWindowUnicode( hWnd : HWND) : BOOL; Function wEnableWindow( hWnd : HWND; bEnable : BOOL) : BOOL; Function wIsWindowEnabled( hWnd : HWND) : BOOL; Function GetMenu( hWnd : HWND) : HMENU; Function SetMenu( hWnd : HWND; hMenu : HMENU) : BOOL; end; procedure SIRegister_SockTransport(CL: TPSPascalCompiler); begin SIRegister_IDataBlock(CL); SIRegister_ISendDataBlock(CL); SIRegister_ITransport(CL); SIRegister_TDataBlock(CL); //TypeS('PIntArray', '^TIntArray // will not work; //TypeS('PVariantArray', '^TVariantArray // will not work; TypeS('TVarFlag', '( vfByRef, vfVariant ); TypeS('TVarFlags', 'set of TVarFlag; SIRegister_TCustomDataBlockInterpreter(CL); SIRegister_TSendDataBlock(CL); 'CallSig','LongWord')( $D800); 'ResultSig','LongWord')( $D400); 'asMask','LongWord')( $00FF); ClassN(CL.FindClass('TOBJECT'),'EInterpreterError; ClassN(CL.FindClass('TOBJECT'),'ESocketConnectionError; Procedure CheckSignature( Sig : Int); end; procedure SIRegister_WinInet(CL: TPSPascalCompiler); begin //TypeS('HINTERNET', '___Pointer; TypeS('HINTERNET1', 'THANDLE; TypeS('HINTERNET', 'Int; TypeS('HINTERNET2', '___Pointer; //TypeS('PHINTERNET', '^HINTERNET // will not work; //TypeS('LPHINTERNET', 'PHINTERNET; TypeS('INTERNET_PORT', 'Word; //TypeS('PINTERNET_PORT', '^INTERNET_PORT // will not work; //TypeS('LPINTERNET_PORT', 'PINTERNET_PORT; Function InternetTimeFromSystemTime(const pst:TSystemTime;dwRFC:DWORD;lpszTime:LPSTR;cbTime:DWORD):BOOL; 'INTERNET_RFC1123_FORMAT','LongInt'( 0); 'INTERNET_RFC1123_BUFSIZE','LongInt'( 30); Function InternetCrackUrl(lpszUrl:PChar;dwUrlLength,dwFlags:DWORD;var lpUrlComponents:TURLComponents):BOOL; Function InternetCreateUrl(var lpUrlComponts:TURLCompons;dwFlags:DWORD;lpszUrl:PChar;var dwUrlLength:DWORD):BOOL; Function InternetCloseHandle(hInet : HINTERNET) : BOOL; Function InternetConnect(hInet:HINTERNET;lpszServerName:PChar;nServerPort:INTERNET_PORT;lpszUsername:PChar; lpszPassword:PChar;dwService:DWORD;dwFlags:DWORD;dwContext:DWORD):HINTERNET; Function InternetOpenUrl(hInet:HINTERNET;lpszUrl:PChar;lpszHeaders:PChar;dwHeadLength:DWORD;dwFlags:DWORD ;dwContext:DWORD):HINTERNET; Function InternetOpen(lpszAgent:PChar;dwAccessType:DWORD;lpszProxy,lpszProxBypass:PChar;dwFlags:DWORD):HINTERNET; Function InternetQueryDataAvailable(hFile:HINTERNET;var lpdwNumbOfBytesAvail:DWORD;dwFlags,dwContext:DWORD):BOOL; Function InternetUnlockRequestFile( hLockRequestInfo : THANDLE) : BOOL; Function InternetDial(hwndParent:HWND;lpszConnect:Pchar;dwFlags:DWORD;lpdwConnect:DWORD;dwReserved:DWORD):DWORD; Function InternetHangUp( dwConnection : DWORD; dwReserved : DWORD) : DWORD; Function InternetGoOnline( lpszURL : pchar; hwndParent : HWND; dwFlags : DWORD) : BOOL; Function InternetAutodial( dwFlags : DWORD; dwReserved : DWORD) : BOOL; Function InternetAutodialHangup( dwReserved : DWORD) : BOOL; Function InternetGetConnectedState( lpdwFlags : DWORD; dwReserved : DWORD) : BOOL; Function InternetCanonicalizeUrl(lpszUrl:PChar;lpszBuffer:PChar; var lpdwBufferLength:DWORD;dwFlags:DWORD):BOOL; Function InternetCombineUrl(lpszBaseUrl,lpszRelativeUrl:PChar;lpszBuffer:PChar;var lpdwBufferLength:Function InternetCloseHandle(hInet:HINTERNET):BOOL; Function InternetConnect(hInet:HINTERNET;lpszServerName:PChar;nServerPort:INTERNET_PORT;lpszUsername:PChar ;lpszPassword:PChar;dwService:DWORD;dwFlags:DWORD; dwContext:DWORD):HINTERNET; Function InternetQueryDataAvailable(hFile:HINTERNET;var lpdwNumbOfBytesAvail:DWORD;dwFlgs,dwContext:DWORD):BOOL; Function FtpFindFirstFile(hConnect:HINTERNET;lpszSearchFile:PChar;var lpFindFileData:TWin32FindData;dwFlags: DWORD; dwContext:DWORD): HINTERNET; Function WFtpGetFile(hConnect:HINTERNET;lpszRemoteFile:PChar;lpszNewFile:PChar;fFailIfExists:BOOL;dwFlagsAndAttributes:DWORD;dwFlags:DWORD;dwContext:DWORD):BOOL; Function WFtpPutFile(hConct:HINTERNET;lpszLocFile:PChar;lpszNewRemFile:PChar;dwFlags:DWORD;dwCotx:DWORD):BOOL; Function FtpDeleteFile( hConnect : HINTERNET; lpszFileName : PChar) : BOOL; Function FtpRenameFile(hConnect:HINTERNET;lpszExisting:PChar;lpszNew:PChar):BOOL; Function FtpOpenFile(hConnect:HINTER;lpszFileName:PChar;dwAccess:DWORD;dwFlags:DWORD;dwContext:DWORD):HINTER; Function FtpCreateDirectory( hConnect : HINTERNET; lpszDirectory : PChar) : BOOL; Function FtpRemoveDirectory( hConnect : HINTERNET; lpszDirectory : PChar) : BOOL; Function FtpSetCurrentDirectory(hConnect:HINTERNET; lpszDirectory : PChar) : BOOL; Function FtpGetCurrentDirectory(hConnect:HINTER;lpszCurrentDir:PChar;var lpdwCurrentDir:DWORD):BOOL; Function FtpCommand(hConnect:HINTER;fExpectResponse:BOOL;dwFlags:DWORD;lpszCommd:PChar;dwContxt:DWORD):BOOL; Function IS_GOPHER_FILE( GopherType : DWORD) : BOOL; Function IS_GOPHER_DIRECTORY( GopherType : DWORD) : BOOL; Function IS_GOPHER_PHONE_SERVER( GopherType : DWORD) : BOOL; Function IS_GOPHER_ERROR( GopherType : DWORD) : BOOL; Function IS_GOPHER_INDEX_SERVER( GopherType : DWORD) : BOOL; Function IS_GOPHER_TELNET_SESSION( GopherType : DWORD) : BOOL; Function IS_GOPHER_BACKUP_SERVER( GopherType : DWORD) : BOOL; Function IS_GOPHER_TN3270_SESSION( GopherType : DWORD) : BOOL; Function IS_GOPHER_ASK( GopherType : DWORD) : BOOL; Function IS_GOPHER_PLUS( GopherType : DWORD) : BOOL; Function IS_GOPHER_TYPE_KNOWN( GopherType : DWORD) : BOOL; Function GopherCreateLocator(lpszHost:PChar;nServerPort:INTERNET_PORT;lpszDisplayString:PChar;lpszSelectorStr:PChar;dwGopherType:DWORD;lpszLocator:PChar;var lpdwBufferLength:DWORD):BOOL; Function GopherGetLocatorType( lpszLocator : PChar; var lpdwGopherType : DWORD):BOOL; Function GopherOpenFile(hConect:HINTERNET;lpszLocat:PChar;lpszView:PChar;dwFlgs:DWORD;dwContext:DWORD):HINTERNET; Function HttpOpenRequest( hConnect:HINTERNET; lpszVerb : PChar; lpszObjectName : PChar; lpszVersion : PChar; lpszReferrer : PChar; lplpszAcceptTypes : PLPSTR; dwFlags : DWORD; dwContext:DWORD):HINTERNET; Function HttpAddRequestHeaders(hReq:HINTERNET;lpszHeaders:PChar;dwHeadersLength:DWORD;dwModifiers:DWORD):BOOL; Function HttpSendRequest(hRequest:HINTERNET; lpszHeaders:PChar; dwHeadersLength:DWORD;lpOptional:Tobject; dwOptionalLength:DWORD):BOOL; Function InternetGetCookie(lpszUrl,lpszCookieName,lpszCookieData:PChar;var lpdwSize:DWORD):BOOL; Function InternetAttemptConnect( dwReserved : DWORD) : DWORD; Function InternetCheckConnection(lpszUrl:PChar; dwFlags:DWORD; dwReserved:DWORD) : BOOL; Function InternetErrorDlg(hWnd:HWND;hRequest:HINTERNET;dwError,dwFlags:DWORD;var lppvData:TObject):DWORD; Function InternetConfirmZoneCrossing(hWnd: HWND; szUrlPrev,szUrlNew: LPSTR; bPost : BOOL) : DWORD; Function CreateUrlCacheGroup( dwFlags : DWORD; lpReserved : TObject) : Int64; Function DeleteUrlCacheGroup(GroupId: Int64; dwFlags : DWORD; lpReserved : TObject) : Bool; Function FindFirstUrlCacheEntry(lpszUrlSearchPattern PChar;var lpFirstCacheEntryInfo:TInternetCacheEntryInfo;var lpdwFirstCacheEntryInfoBufferSize:DWORD):THandle; Function FindNextUrlCacheEntry(hEnumHandle:THandle;var lpNextCacheEntryInfo:TInternetCacheEntryInfo;var lpdwNextCacheEntryInfoBufferSize:DWORD):BOOL; Function FindCloseUrlCache( hEnumHandle : THandle):BOOL; Function DeleteUrlCacheEntry( lpszUrlName : LPCSTR):BOOL; Function InternetDial(hwndParent:HWND;lpszConnect:Pchar;dwFlgs:DWORD;lpdwConnect:DWORD;dwReserved:DWORD):DWORD; Function InternetSetDialState(lpszConnectoid:PChar; dwState:DWORD;dwReserved: DWORD): BOOL; end; procedure SIRegister_Wwstr(CL: TPSPascalCompiler); begin AddTypeS('strCharSet', 'set of char; TwwGetWordOption','(wwgwSkipLeadingBlanks, wwgwQuotesAsWords,wwgwStripQuotes , wwgwSpacesInWords); AddTypeS('TwwGetWordOptions', 'set of TwwGetWordOption; Procedure strBreakApart( s : string; delimeter : string; parts : TStrings); Function strGetToken( s : string; delimeter : string; var APos : Int) : string; Procedure strStripPreceding( var s : string; delimeter : strCharSet); Procedure strStripTrailing( var s : string; delimeter : strCharSet); Procedure strStripWhiteSpace( var s : string); Function strRemoveChar( str : string; removeChar : char) : string; Function wwstrReplaceChar( str : string; removeChar, replaceChar : char) : string; Function strReplaceCharWithStr(str:string; removeChar:char;replaceStr: string) : string; Function wwEqualStr( s1, s2 : string) : boolean; Function strCount( s : string; delimeter : char) : Int; Function strWhiteSpace : strCharSet; Function wwExtractFileNameOnly( const FileName : string) : string; Function wwGetWord(s:string;var APos:Int;Options:TwwGetWordOptions;DelimSet:strCharSet):string; Function strTrailing( s : string; delimeter : char) : string; Function strPreceding( s : string; delimeter : char) : string; Function wwstrReplace( s, Find, Replace : string) : string; end; Ex.: tex2:= 'Finally, we recognize that the 8% is calculated over all states of the world.' delimset:= [',','?',';','.',':','-','=','{','}','[',']','(',')','>','<','%']; while length(tex2)>0 do begin k:=1; s:= wwGetWord(tex2, k, [wwgwStripQuotes, wwgwSpacesInWords], delimSet); delete(tex2,1,k); write(' '+s) end; procedure SIRegister_DataBkr(CL: TPSPascalCompiler); begin SIRegister_TRemoteDataModule(CL); SIRegister_TCRemoteDataModule(CL); Procedure RegisterPooled(const ClassID:string; Max,Timeout : Int; Singleton : Boolean); Procedure UnregisterPooled( const ClassID : string); Procedure EnableSocketTransport( const ClassID : string); Procedure DisableSocketTransport( const ClassID : string); Procedure EnableWebTransport( const ClassID : string); Procedure DisableWebTransport( const ClassID : string); end; procedure SIRegister_Mathbox(CL: TPSPascalCompiler); begin Function mxArcCos( x : Real) : Real; Function mxArcSin( x : Real) : Real; Function Comp2Str( N : Comp) : String; Function Int2StrPad0( N : LongInt; Len : Int) : String; Function Int2Str( N : LongInt) : String; Function mxIsEqual( R1, R2 : Double) : Boolean; Function LogXY( x, y : Real) : Real; Function Pennies2Dollars( C : Comp) : String; Function mxPower( X : Int; Y : Int) : Real; Function Real2Str( N : Real; Width, Places : Int) : String; Function mxStr2Comp( MyString : string) : Comp; Function mxStr2Pennies( S : String) : Comp; Function Str2Real( MyString : string) : Real; Function XToTheY( x, y : Real) : Real; end; //*************************Cindy Functions!****************************** procedure SIRegister_cyIndy(CL: TPSPascalCompiler); begin TypeS('TContentTypeMessage', '( cmPlainText, cmPlainText_Attach, cmHtml' +'_Attach, cmHtml_RelatedAttach, cmAlterText_Html, cmAlterText_Html_Attach, ' +'cmAlterText_Html_RelatedAttach,cmAlterText_Html_Attach_RelatedAttach,cmReadNotification); MessagePlainText','String 'text/plain; ConstantN('MessagePlainText_Attach','String 'multipart/mixed; MessageAlterText_Html','String 'multipart/alternative; MessageHtml_Attach','String 'multipart/mixed; MessageHtml_RelatedAttach','String 'multipart/related; type="text/html"; MessageAlterText_Html_Attach','String 'multipart/mixed; MessageAlterText_Html_RelatedAttach,String)('multipart/related;type="multipart/alternative"'; MessageAlterText_Html_Attach_RelatedAttach','String 'multipart/mixed; MessageReadNotificatin String).(multipart/report;report-type="disposition-notification"'; Function ForceDecodeHeader( aHeader : String) : String; Function Base64_EncodeString( Value : String; const aEncoding : TEncoding) : string; Function Base64_DecodeToString(Value: String; const aBytesEncoding:TEncoding): String;; Function Base64_DecodeToBytes( Value : String) : TBytes;; Function IdHttp_DownloadFile(aSrcUrlFile,aDestFile:String;const OnWorkEvent:TWorkEvent):Boolean; Function Get_MD5( const aFileName : string) : string; Function Get_MD5FromString( const aString : string) : string; end; procedure SIRegister_cySysUtils(CL: TPSPascalCompiler); begin Function IsFolder( SRec : TSearchrec) : Boolean; Function isFolderReadOnly( Directory : String) : Boolean; Function DirectoryIsEmpty( Directory : String) : Boolean; Function DirectoryWithSubDir( Directory : String) : Boolean; Procedure GetSubDirs( FromDirectory : String; aList : TStrings); Function DiskFreeBytes( Drv : Char) : Int64; Function DiskBytes( Drv : Char) : Int64; Function GetFileBytes( Filename : String) : Int64; Function GetFilesBytes( Directory, Filter : String) : Int64; SE_CREATE_TOKEN_NAME','String 'SeCreateTokenPrivilege; SE_ASSIGNPRIMARYTOKEN_NAME','String 'SeAssignPrimaryTokenPrivilege; SE_LOCK_MEMORY_NAME','String 'SeLockMemoryPrivilege; SE_INCREASE_QUOTA_NAME','String 'SeIncreaseQuotaPrivilege; SE_UNSOLICITED_INPUT_NAME','String 'SeUnsolicitedInputPrivilege; SE_MACHINE_ACCOUNT_NAME','String 'SeMachineAccountPrivilege; SE_TCB_NAME','String 'SeTcbPrivilege; SE_SECURITY_NAME','String 'SeSecurityPrivilege; SE_TAKE_OWNERSHIP_NAME','String 'SeTakeOwnershipPrivilege; SE_LOAD_DRIVER_NAME','String 'SeLoadDriverPrivilege; SE_SYSTEM_PROFILE_NAME','String 'SeSystemProfilePrivilege; SE_SYSTEMTIME_NAME','String 'SeSystemtimePrivilege; SE_PROF_SINGLE_PROCESS_NAME','String 'SeProfileSingleProcessPrivilege; SE_INC_BASE_PRIORITY_NAME','String 'SeIncreaseBasePriorityPrivilege; SE_CREATE_PAGEFILE_NAME','String 'SeCreatePagefilePrivilege; SE_CREATE_PERMANENT_NAME','String 'SeCreatePermanentPrivilege; SE_BACKUP_NAME','String 'SeBackupPrivilege; SE_RESTORE_NAME','String 'SeRestorePrivilege; SE_SHUTDOWN_NAME','String 'SeShutdownPrivilege; SE_DEBUG_NAME','String 'SeDebugPrivilege; SE_AUDIT_NAME','String 'SeAuditPrivilege; SE_SYSTEM_ENVIRONMENT_NAME','String 'SeSystemEnvironmentPrivilege; SE_CHANGE_NOTIFY_NAME','String 'SeChangeNotifyPrivilege; SE_REMOTE_SHUTDOWN_NAME','String 'SeRemoteShutdownPrivilege; SE_UNDOCK_NAME','String 'SeUndockPrivilege; SE_SYNC_AGENT_NAME','String 'SeSyncAgentPrivilege; SE_ENABLE_DELEGATION_NAME','String 'SeEnableDelegationPrivilege; SE_MANAGE_VOLUME_NAME','String 'SeManageVolumePrivilege; end; procedure SIRegister_cyWinUtils(CL: TPSPascalCompiler); begin Type(TWindowsVersion','( wvUnknown, wvWin31, wvWin95, wvWin98, wvWin' +Me, wvWinNt3, wvWinNt4,wvWin2000,wvWinXP,wvWinVista, wvWin7,wvWin8 wvWin8_Or_Upper ); Function ShellGetExtensionName( FileName : String) : String; Function ShellGetIconIndex( FileName : String) : Int; Function ShellGetIconHandle( FileName : String) : HIcon; Procedure ShellThreadCopy( App_Handle : THandle; fromFile : string; toFile : string); Procedure ShellThreadMove( App_Handle : THandle; fromFile : string; toFile : string); Procedure ShellRenameDir( DirFrom, DirTo : string); Function cyShellExecute(Operation,FileName,Parameters,Directory:String;ShowCmd:Int):Cardinal; Procedure cyShellExecute1(ExeFilename,Parameters,ApplicName,ApplicationClass:String;Restore:Bool); Procedure ShellExecuteAsModal( ExeFilename, ApplicationName, Directory : String); Procedure ShellExecuteExAsAdmin( hWnd : HWND; Filename : string; Parameters : string); Function ShellExecuteEx(aFileName:string;const Parameters:string;const Directory:string;const WaitCloseCompletion:bool):Bool; Procedure RestoreAndSetForegroundWindow( Hnd : Int); Function RemoveDuplicatedPathDelimiter( Str : String) : String; Function cyFileTimeToDateTime( _FT : TFileTime) : TDateTime; Function GetModificationDate( Filename : String) : TDateTime; Function GetCreationDate( Filename : String) : TDateTime; Function GetLastAccessDate( Filename : String) : TDateTime; Function FileDelete( Filename : String) : Boolean; Function FileIsOpen( Filename : string) : boolean; Procedure FilesDelete( FromDirectory : String; Filter : ShortString); Function DirectoryDelete( Directory : String) : Boolean; Function GetPrinters( PrintersList : TStrings) : Int; Procedure SetDefaultPrinter( PrinterName : String); Procedure ShowDefaultPrinterWindowProperties( FormParent_Handle : Int); Function WinToDosPath( WinPathName : String) : String; Function DosToWinPath( DosPathName : String) : String; Function cyGetWindowsVersion : TWindowsVersion; Function NTSetPrivilege( sPrivilege : string; bEnabled : Boolean) : Boolean; Procedure WindowsShutDown( Restart : boolean); Procedure CreateShortCut(FileSrc,Parametres,FileLnk,Descript,DossierDeTravail,FileIcon:string;NumIcone:Int); Procedure GetWindowsFonts( FontsList : TStrings); Function GetAvailableFilename( DesiredFileName : String): String; end; procedure SIRegister_cyStrUtils(CL: TPSPascalCompiler); begin Type(TStrLocateOption', '( strloCaseInsensitive, strloPartialKey ); Type(TStrLocateOptions', 'set of TStrLocateOption; Type(TStringRead', '( srFromLeft, srFromRight ); Type(TStringReads', 'set of TStringRead; Type(TCaseSensitive', '( csCaseSensitive, csCaseNotSensitive ); Type(TWordsOption', '( woOnlyFirstWord, woOnlyFirstCar ); Type(TWordsOptions', 'set of TWordsOption; Type(TCarType', '(ctAlphabeticUppercase, ctAlphabeticLowercase, ctNumeric, ctOther ); Type(TCarTypes', 'set of TCarType; //TypeS('TUnicodeCategories', 'set of TUnicodeCategory; CarTypeAlphabetic','LongInt'):= ord(ctAlphabeticUppercase) or ord(ctAlphabeticLowercase); Function Char_GetType( aChar : Char) : TCarType; Function SubString_Count( Str : String; Separator : Char) : Int; Function SubString_AtPos( Str : String; Separator : Char; SubStringIndex : Word) : Int; Function SubString_Get( Str : String; Separator : Char; SubStringIndex : Word) : String; Function SubString_Length( Str : String; Separator : Char; SubStringIndex : Word) : Int; Procedure SubString_Add( var Str : String; Separator : Char; Value : String); Procedure SubString_Insert(var Str:String;Separator:Char;SubStrIndex:Word;Value:String); Procedure SubString_Edit(var Str:String;Separator:Char;SubStringIndex:Word; NewValue:String); Function SubString_Remove(var Str:string; Separator:Char; SubStringIndex : Word) : Boolean; Function SubString_Locate(Str:string;Separator:Char;SubString:String;Options:TStrLocateOptions):Int; Function SubString_Ribbon(Str:string; Separator:Char;Current: Word; MoveBy:Int):Int;; Function SubString_Ribbon1(Str:string;Separator:Char;Current:String;MoveBy:Int):String;; Function String_Quote( Str : String) : String; Function String_GetCar(Str:String; Position : Word; ReturnCarIfNotExists : Char) : Char; Function String_ExtractCars(fromStr:String;CarTypes:TCarTypes;IncludeCars,ExcludeCars:String):String; Function String_GetWord( Str : String; StringRead : TStringRead) : String; Function String_GetInt( Str : String; StringRead : TStringRead) : String; Function String_ToInt( Str : String) : Int; Function String_Uppercase( Str : String; Options : TWordsOptions) : String; Function String_Lowercase( Str : String; Options : TWordsOptions) : String; Function String_Reverse( Str : String) : String; Function String_Pos(SubStr:String;Str:String;fromPos:Int;CaseSensitive:TCaseSensitiv)Int; Function String_Pos1(SubStr:String;Str:String;StringRead:TStringRead;Occurrence:Word;CaseSensitive:TCaseSensitive):Int Function String_Copy( Str : String; fromIndex : Int; toIndex : Int) : String;; Function String_Copy1(Str:String;StringRead:TStringRead;UntilFind:String;_Inclusive:Boolean):String; Function String_Copy2(Str:String;Between1:String;Between1MustExist:Boolean;Between2:String; Between2MustExist:Boolean;CaseSensitive:TCaseSensitive):String; Function String_Delete( Str : String; fromIndex : Int; toIndex : Int) : String;; Function String_Delete1(Str:String; delStr:String; CaseSensitive:TCaseSensitive):String;; Function String_BoundsCut( Str : String; CutCar : Char; Bounds : TStringReads) : String; Function String_BoundsAdd( Str : String; AddCar : Char; ReturnLength : Int) : String; Function String_Add(Str:String;StringRead:TStringRead;aCar:Char;ReturnLength:Int):String; Function String_End( Str : String; Cars : Word) : String; Function String_Subst(OldStr:String;NewStr:String;Str:String; CaseSensitive:TCaseSensitive;AlwaysFindFromBeginning:Bool): String; Function String_SubstCar( Str : String; Old, New : Char) : String; Function String_Count(Str: String; SubStr: String; CaseSenSitive : TCaseSensitive) : Int; Function String_SameCars(Str1,Str2:String;StopCount_IfDiferent:Bool;CaseSensitive:TCaseSensitive):Int; Function String_IsNumbers( Str : String) : Boolean; Function SearchPos( SubStr : String; Str : String; MaxErrors : Int) : Int; Function StringToCsvCell( aStr : String) : String; end; procedure SIRegister_cyDateUtils(CL: TPSPascalCompiler); begin Function LongDayName( aDate : TDate) : String; Function LongMonthName( aDate : TDate) : String; Function ShortYearOf( aDate : TDate) : byte; Function DateToStrYYYYMMDD( aDate : TDate) : String; Function StrYYYYMMDDToDate( aStr : String) : TDate; Function SecondsToMinutes( Seconds : Int) : Double; Function MinutesToSeconds( Minutes : Double) : Int; Function MinutesToHours( Minutes : Int) : Double; Function HoursToMinutes( Hours : Double) : Int; Function ShortTimeStringToTime( ShortTimeStr : String; const ShortTimeFormat : String) : TDateTime; Procedure cyAddMonths( var aMonth, aYear : Word; Months : Int); Function MergeDateWithTime( aDate : TDate; aTime : TDateTime) : TDateTime; Function GetMinutesBetween( DateTime1, DateTime2 : TDateTime) : Int64;; Function GetMinutesBetween1(From_ShortTimeStr,To_ShortTimeStr:String;const ShortTimeFormat:String):Int64; Function GetSecondsBetween( DateTime1, DateTime2 : TDateTime) : Int64;; Function IntersectPeriods(Period1Begin,Period1End,Period2Begin,Period2End:TDateTime;var RsltBegin:TDateTime;RsltEnd:TDateTime):Bool; Function IntersectPeriods1(Period1Begin,Period1End,Period2Begin,Period2End:TDateTime):Boolean; Function TryToEncodeDate( Year, Month, Day : Int; var RsltDate : TDateTime) : Boolean; end; procedure SIRegister_cyObjUtils(CL: TPSPascalCompiler); begin Type(TStringsSortType', '( stNone, stStringSensitive, stStringInsensitive, stExtended ); Type(TStringsValueKind', '( skStringSensitive, skStringInsensitive, skExtended ); Type(TcyLocateOption', '( lCaseInsensitive, lPartialKey ); Type(TcyLocateOptions', 'set of TcyLocateOption; Function StringsLocate(aList: TStrings; Value:String; Options:TcyLocateOptions): Int;; Function StringsLocate1(aList:TStrings; Value: String; ValueKind:TStringsValueKind):Int;; Function StringsAdd(aList:TStrings;Value:String;Unique:Boolean;SortType:TStringsSortType): Int; Procedure StringsReplace(aList:TStrings;OldStr:String; NewStr:String;ValueKind : TStringsValueKind); Procedure StringsSort( aList : TStrings; SortType : TStringsSortType); Function TreeNodeLocate( ParentNode : TTreeNode; Value : String) : TTreeNode; Function TreeNodeLocateOnLevel(TreeView:TTreeView;OnLevel:Int;Value:String): TTreeNode; Function TreeNodeGetChildFromIndex(TreeView:TTreeView;ParentNode:TTreeNode;ChildIndex:Int):TTreeNode; Function TreeNodeGetParentOnLevel(ChildNode: TTreeNode; ParentLevel : Int) : TTreeNode; Procedure TreeNodeCopy(FromNode:TTreeNode;ToNode:TTreeNode;const CopyChildren:Boolean;const CopySubChildren:Bool; Procedure RichEditSetStr( aRichEdit : TRichEdit; FormatedString : String); Procedure RichEditStringReplace(aRichEdit:TRichEdit;OldPattern,NewPattern:string;Flags:TReplaceFlags); Function GetTopMostControlAtPos(FromControl:TWinControl; aControlPoint : TPoint): TControl; Procedure cyCenterControl( aControl : TControl); Function GetLastParent( aControl : TControl) : TWinControl; Function GetControlBitmap( aControl : TWinControl) : TBitmap; Function GetRichEditBitmap( aRichEdit : TRichEdit) : TBitmap; end; procedure SIRegister_cyBDE(CL: TPSPascalCompiler); begin Function TablePackTable( Tab : TTable) : Boolean; Function TableRegenIndexes( Tab : TTable) : Boolean; Function TableShowDeletedRecords( Tab : TTable; Show : Boolean) : Boolean; Function TableUndeleteRecord( Tab : TTable) : Boolean; Function TableAddIndex(Tab:TTable;FieldName String;FieldExpression:String;IOpt:TIndexOptions):Bool; Function TableDeleteIndex( Tab : TTable; IndexFieldName : String) : Boolean; Function TableEmptyTable( Tab : TTable) : Boolean; Function TableFindKey( aTable : TTable; Value : String) : Boolean; Procedure TableFindNearest( aTable : TTable; Value : String); Function TableCreate(Owner:TComponent;DBaseName:ShortString;TblName:String;IdxName:ShortString;ReadOnly:Bool):TTable; Function TableOpen(Tab:TTable;FileName:String;IndexFieldName:String;RecordIndexValue:Variant;GotoRecordIndexValue:Bool):Bool; Function DateToBDESQLDate( aDate : TDate; const DateFormat : String) : String; end; procedure SIRegister_cyClasses(CL: TPSPascalCompiler); begin SIRegister_TcyRunTimeDesign(CL); SIRegister_TcyShadowText(CL); SIRegister_TcyBgPicture(CL); SIRegister_TcyGradient(CL); SIRegister_tcyBevel(CL); //TypeS('TcyBevelClass', 'class of tcyBevel; SIRegister_tcyBevels(CL); SIRegister_TcyImagelistOptions(CL); Procedure cyDrawBgPicture( aCanvas : TCanvas; aRect : TRect; aBgPicture : TcyBgPicture); end; procedure SIRegister_cyGraphics(CL: TPSPascalCompiler); begin Procedure cyGradientFill( aCanvas : TCanvas; aRect : TRect; fromColor, toColor : TColor; adgradOrientation : TdgradOrientation; Balance, AngleDegree : Word; balanceMode : TDgradBalanceMode; Maxdegrade : Byte;'+ SpeedPercent : Int; const AngleClipRect : Boolean; const AngleBuffer : TBitmap); Procedure cyGradientFillVertical(aCanvas:TCanvas;aRect:TRect;fromColor,toColor:TColor;MaxDegrad:byte); Procedure cyGradientFillHorizontal(aCanvas:TCanvas;aRect:TRect;fromCol,toColor:TColor;MaxDegrad:byte); Procedure cyGradientFillShape(aCanvas:TCanvas;aRect:TRect;fromColor,toColor:TColor;MaxDegrad: Byte;toRect:TRect;OrientationShape:TDgradOrientationShape); Procedure cyGradientFillAngle(aCanvas:TCanvas;aRect TRect;fromColor,toColor:TColor;MaxDegrad: Byte;AngleDegree:Word;const ClipRect:Boolean;const Buffer:TBitmap); Procedure DrawRectangleInside( aCanvas : TCanvas; InsideRect : TRect; FrameWidth : Int); Procedure cyFrame(aCanvas:TCanvas; var InsideRect:TRect;Color:TColor;const Width:Int);; Procedure cyFrame1(Canvas:TCanvas;var InsideRect:TRect;LeftColor,TopColor,ightColor,BottomColor:TColor;const Width:Int;const RoundRect:bool);; Procedure cyFrame3D(Canvas:TCanvas;var Rect:TRect;TopLeftColor,BottomRightColor:TColor;Width:Int;const DrawLeft:Boolean;const DrawTop:Bool;const DrawRight:Bool;const DrawBottom:Bool;const RoundRect:bool; Procedure cyDrawButtonFace(Canvas:TCanvas; var Rect:Rect;GradientColor1,GradientColor2:TColor;aState:TButtonState;Focused,Hot:Bool); Procedure cyDrawButton(Canvas:TCanvas;Caption:String;ARect:TRect;radientColor1,GradientColor2:TColor;aState TButtonState;Focused,Hot : Bool); Procedure cyDrawSpeedButtonFace(Canvas:TCanvas;var Rect:TRect;GradientColor1,GradientColor2:TColor;aState:TButtonState;Focused,Hot:Bool); Procedure cyDrawSpeedButton(Canvas:TCanvas;Caption:String;ARect:TRect;GradientColor1,GradientColor2:TColor;aState: TButtonState;Focused,Hot:oolean); Procedure cyDrawCheckBox(Canvas:TCanvas;IsChecked:Boolean;ARect:TRect;const BgColor:TColor;const DarkFrameColor:TColor;const LightFrameColor:TColor;const MarkColor:TColor); Procedure cyDrawSingleLineText(Canvas:TCanvas;Text:String;ARect:TRect;Alignment:TAlignment;TextLayout:TTextLayout; const IndentX:Int;const IndentY:Int); Function DrawTextFormatFlags(aTextFormat:LongInt;Alignment TAlignment;Layout:TTextLayout;WordWrap:Bool):LongInt; Function DrawTextFormatFlags1(aTextFormat:LongInt;Alignment:TAlignment;Layout:TTextLayout; WordWrap:Boolean;CaptionRender:TCaptionRender):LongInt;; Procedure cyDrawText(CanvasHandl:Cardinal;Text:String;var Rect:TRect;TextFormat:LongInt); Function cyCreateFontIndirect(fromFont : TFont; Angle : Double) : TFont;; Function cyCreateFontIndirect1(fromFont: TFont;CaptionOrientation:TCaptionOrientation):TFont; Procedure cyDrawVerticalText(Canvas : TCanvas; Text : String; var Rect : TRect; TextFormat : Longint; CaptionOrientation:TCaptionOrientation;Alignment:TAlignment;Layout: TextLayout); Function DrawLeftTurnPageEffect(Canvas:TCanvas;PageColor:TColor;PageRect:TRect;PercentDone:Int; const OnlyCalcFoldLine:Boolean):TLineCoord; Function DrawRightTurnPageEffect(Canvas:TCanvas;PageColor:TColor;PageRect:TRect;PercentDone:Int;const OnlyCalcFoldLine:Boolean):TLineCoord; Function PictureIsTransparentAtPos( aPicture : TPicture; aPoint : TPoint):boolean; Function IconIsTransparentAtPos(aIcon : TIcon; aPoint : TPoint) : boolean; Function MetafileIsTransparentAtPos( aMetafile : TMetafile; aPoint : TPoint) : boolean; Function PngImageIsTransparentAtPos( aPngImage : TPngImage; aPoint : TPoint) : boolean; Procedure DrawCanvas(Destination:TCanvas;DestRect:TRect;Source:TCanvas;SourceRect:TRect); Procedure DrawCanvas1(Destination:TCanvas;DestRect:TRect;Src:TCanvas;SrcRect:TRect;TransparentColor:TColor;const aStyle:TBgStyle;const aPosition:TBgPosition;const IndentX:Int;const IndentY:Int;const IntervalX:Int;const IntervalY:Int;const RepeatX:Int;const RepeatY:Int); Procedure DrawGraphic(Destination:TCanvas;DestRect:TRect;aGraphic:TGraphic;SrcRect:TRect;TransparentColor:TColor;const aStyle:TBgStyle;const aPosition:TBgPosition;const IndentX:Int; const IndentY:Int;const IntervalX:Int;const IntervalY:Int;const RepeatX:Int;const RepeatY:Int; Procedure DrawGraphic1(Destination:TCanvas; DestRect:TRect;aGraphic : TGraphic; Transparent : Boolean; const aStyle : TBgStyle; const aPosition:TBgPosition;const IndentX:Int;const IndentY:Int;const IntervalX:Int;const IntervalY:Int;const RepeatX:Int;const RepeatY:Int); Procedure DrawMosaicPortion( Destination : TCanvas; Portion : TRect; Pattern : TBitmap); Function ValidGraphic( aGraphic : TGraphic) : Boolean; Function ColorSetPercentBrightness( Color : TColor; PercentLight : Int) : TColor; Function ColorModify( Color : TColor; incR, incG, incB : Int) : TColor; Function ColorSetPercentContrast( Color : TColor; IncPercent : Int) : TColor; Function ColorSetPercentPale( Color : TColor; IncPercent : Int) : TColor; Function MediumColor( Color1, Color2 : TColor) : TColor; Function ClientToScreenRect( aControl : TControl; aControlRect : TRect) : TRect; Function ScreenToClientRect( aControl : TControl; aScreenRect : TRect) : TRect; Function CombineRectKeepingCenterPosition( RectPos, AddRect : TRect) : TRect; Procedure InflateRectPercent( var aRect : TRect; withPercent : Double); Function GetIntermediateRect( Rect1, Rect2 : TRect; Percent : Double) : TRect; Function GetProportionalRect( fromRect, InsideRect : TRect) : TRect; Function PointInRect( const aPt : TPoint; const aRect : TRect) : boolean; Function PointInEllispe( const aPt : TPoint; const aRect : TRect) : boolean; Function CanvasAcceleratorTextWidth( aCanvas : TCanvas; aText : String) : Int; end; procedure SIRegister_cyTypes(CL: TPSPascalCompiler); begin Type(TGlyphAlignment', '( gaLeft, gaCenter, gaRight ); Type(TGlyphLayout', '( glTop, glCenter, glBottom ); Type(TDisabledGlyphOptions', '( dgDoNotDraw, dgDrawNormal, dgDrawMonochrome ); Type(TCaptionRender', '( crNormal, crPathEllipsis, crEndEllipsis, crWordEllipsis ); Type(TCaptionOrientation', '( coHorizontal, coHorizontalReversed, coVertical, coVerticalReversed ); Type(TBgPosition', '( bgCentered, bgTopLeft, bgTopCenter, bgTopRight,' +' bgCenterRight, bgBottomRight, bgBottomCenter, bgBottomLeft, bgCenterLeft); Type(TBgStyle', '( bgNone, bgNormal, bgMosaic, bgStretch, bgStretchProportional ); Type(TcyBevelCut', '( bcLowered, bcRaised, bcNone, bcTransparent, bcGradientToNext ); Type(TDgradOrientation','( dgdVertical,dgdHorizontal,dgdAngle,dgdRadial,dgdRectangle ); Type(TDgradOrientationShape', '( osRadial, osRectangle ); Type(TDgradBalanceMode(bmNormal,bmMirror,bmReverse,bmReverseFromColor,bmInvertReverse,bmInvertReverseFromColor); Type(TRunTimeDesignJob','(rjNothing,rjMove,rjResizeTop,rjResizeBottom,rjResizeLeft,rjResizeTopLeft,rjResizeBottomLeft,rjResizeRight,rjResizeTopRight,rjResizeBottomRight ); Type(TLineCoord', 'record BottomCoord : TPoint; TopCoord : TPoint; end; cCaptionOrientationWarning,String)(Note text orientation doesnt work with all fonts!; end; procedure SIRegister_WinSvc(CL: TPSPascalCompiler); begin Const SERVICES_ACTIVE_DATABASEA','String 'ServicesActive; SERVICES_ACTIVE_DATABASEW','String') 'ServicesActive; Const SERVICES_ACTIVE_DATABASE','String')' SERVICES_ACTIVE_DATABASEA; Const SERVICES_FAILED_DATABASEA','String' 'ServicesFailed; Const SERVICES_FAILED_DATABASEW','String' 'ServicesFailed; Const SERVICES_FAILED_DATABASE','String' 'SERVICES_FAILED_DATABASEA; Const SC_GROUP_IDENTIFIERA','String'). '+; Const SC_GROUP_IDENTIFIERW','String') '+; Const SC_GROUP_IDENTIFIER','string 'SC_GROUP_IDENTIFIERA; Const SERVICE_NO_CHANGE','LongWord $FFFFFFFF); Const SERVICE_ACTIVE','LongWord')( $00000001); Const SERVICE_INACTIVE','LongWord $00000002); Const SERVICE_CONTROL_STOP','LongWord $00000001); Const SERVICE_CONTROL_PAUSE','LongWord $00000002); Const SERVICE_CONTROL_CONTINUE','LongWord $00000003); Const SERVICE_CONTROL_INTERROGATE','LongWord $00000004); Const SERVICE_CONTROL_SHUTDOWN','LongWord $00000005); Const SERVICE_STOPPED','LongWord $00000001); Const SERVICE_START_PENDING','LongWord $00000002); Const SERVICE_STOP_PENDING','LongWord $00000003); Const SERVICE_RUNNING','LongWord $00000004); Const SERVICE_CONTINUE_PENDING','LongWord $00000005); Const SERVICE_PAUSE_PENDING','LongWord $00000006); Const SERVICE_PAUSED','LongWord $00000007); Const SERVICE_ACCEPT_STOP','LongWord $00000001); Const SERVICE_ACCEPT_PAUSE_CONTINUE','LongWord $00000002); Const SERVICE_ACCEPT_SHUTDOWN','LongWord $00000004); Const SC_MANAGER_CONNECT','LongWord $0001); Const SC_MANAGER_CREATE_SERVICE','LongWord $0002; Const SC_MANAGER_ENUMERATE_SERVICE','LongWord $0004); Const SC_MANAGER_LOCK','LongWord $0008); Const SC_MANAGER_QUERY_LOCK_STATUS','LongWord $0010); Const SC_MANAGER_MODIFY_BOOT_CONFIG','LongWord $0020); Const SERVICE_QUERY_CONFIG','LongWord $0001); Const SERVICE_CHANGE_CONFIG','LongWord $0002); Const SERVICE_QUERY_STATUS','LongWord $0004); Const SERVICE_ENUMERATE_DEPENDENTS','LongWord $0008); Const SERVICE_START','LongWord $0010); Const SERVICE_STOP','LongWord $0020); Const SERVICE_PAUSE_CONTINUE','LongWord $0040); Const SERVICE_INTERROGATE','LongWord $0080); Const SERVICE_USER_DEFINED_CONTROL','LongWord $0100); Const SERVICE_KERNEL_DRIVER','LongWord $00000001); Const SERVICE_FILE_SYSTEM_DRIVER','LongWord $00000002); Const SERVICE_ADAPTER','LongWord $00000004); Const SERVICE_RECOGNIZER_DRIVER','LongWord $00000008); Const SERVICE_WIN32_OWN_PROCESS','LongWord $00000010); Const SERVICE_WIN32_SHARE_PROCESS','LongWord $00000020); Const SERVICE_INTERACTIVE_PROCESS','LongWord $00000100); Const SERVICE_BOOT_START','LongWord $00000000); Const SERVICE_SYSTEM_START','LongWord $00000001); Const SERVICE_AUTO_START','LongWord $00000002); Const SERVICE_DEMAND_START','LongWord $00000003); Const SERVICE_DISABLED','LongWord $00000004); Const SERVICE_ERROR_IGNORE','LongWord $00000000); Const SERVICE_ERROR_NORMAL','LongWord $00000001); Const SERVICE_ERROR_SEVERE','LongWord $00000002); Const SERVICE_ERROR_CRITICAL','LongWord $00000003); TypeS('SC_HANDLE', 'THandle; //TypeS('LPSC_HANDLE', '^SC_HANDLE // will not work; TypeS('SERVICE_STATUS_HANDLE', 'DWORD; Const _SERVICE_STATUS', 'record dwServiceType : DWORD; dwCurrentState ' +': DWORD; dwControlsAccepted : DWORD; dwWin32ExitCode : DWORD; dwServiceSpe' +'cificExitCode : DWORD; dwCheckPoint : DWORD; dwWaitHint : DWORD; end; Const SERVICE_STATUS', '_SERVICE_STATUS; Const TServiceStatus', '_SERVICE_STATUS; TypeS('_ENUM_SERVICE_STATUSA', 'record lpServiceName : PChar; lpDis' +'playName : PChar; ServiceStatus : TServiceStatus; end; ENUM_SERVICE_STATUSA', '_ENUM_SERVICE_STATUSA; _ENUM_SERVICE_STATUS', '_ENUM_SERVICE_STATUSA; TEnumServiceStatusA', '_ENUM_SERVICE_STATUSA; TEnumServiceStatus', 'TEnumServiceStatusA; SC_LOCK', '___Pointer; _QUERY_SERVICE_LOCK_STATUSA','record fIsLocked:DWORD;lpLockOner:PChar;dwLockDuration:DWORD;end; _QUERY_SERVICE_LOCK_STATUS', '_QUERY_SERVICE_LOCK_STATUSA; QUERY_SERVICE_LOCK_STATUSA', '_QUERY_SERVICE_LOCK_STATUSA; QUERY_SERVICE_LOCK_STATUS', 'QUERY_SERVICE_LOCK_STATUSA; TQueryServiceLockStatusA', '_QUERY_SERVICE_LOCK_STATUSA; //TQueryServiceLockStatusW', '_QUERY_SERVICE_LOCK_STATUSW; TQueryServiceLockStatus', 'TQueryServiceLockStatusA; _QUERY_SERVICE_CONFIGA', 'record dwServiceType : DWORD; dwStartT' +ype : DWORD; dwErrorControl : DWORD; lpBinaryPathName : PChar; lpLoadO' +rderGroup: PChar;dwTagId: DWORD; lpDependencies:PChar;lpServiceStartName:PChar;lpDisplayName:PChar; end; _QUERY_SERVICE_CONFIG', '_QUERY_SERVICE_CONFIGA; QUERY_SERVICE_CONFIGA', '_QUERY_SERVICE_CONFIGA; QUERY_SERVICE_CONFIG', 'QUERY_SERVICE_CONFIGA; TQueryServiceConfigA', '_QUERY_SERVICE_CONFIGA; TQueryServiceConfig', 'TQueryServiceConfigA; Function CloseServiceHandle( hSCObject : SC_HANDLE) : BOOL; Function ControlService(hService:SC_HANDLE;dwControl DWORD;var lpServiceStatus:TServiceStatus):BOOL; Function CreateService( hSCManager : SC_HANDLE; lpServiceName, lpDisplayName : PChar; dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl : DWORD; lpBinaryPathName, lpLoadOrderGroup : PChar;' +' lpdwTagId: DWORD;lpDependencies,lpServiceStartName, lpPassword : PChar): SC_HANDLE; Function CreateServiceA( hSCManager : SC_HANDLE; lpServiceName, lpDisplayName : PChar; dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl : DWORD; lpBinaryPathName, lpLoadOrderGroup : PChar; ' +'lpdwTagId : DWORD; lpDependencies, lpServiceStartName, lpPassword : PChar) : SC_HANDLE; Function DeleteService( hService : SC_HANDLE) : BOOL; Function EnumDependentServices(hService: SC_HANDLE; dwServiceState: DWORD; var lpServices:TEnumServiceStatus;cbBufSize:DWORD;var pcbBytesNeeded,lpServicesReturned: DWORD) : BOOL; Function EnumServicesStatus( hSCManager : SC_HANDLE; dwServiceType, dwServiceState:DWORD;var lpServices: TEnumServiceStatus;cbBufSize:DWORD;var pcbBytesNeeded,lpServicesReturned,lpResumeHandle:DWORD):BOOL; Function GetServiceKeyName(hSCManager:SC_HANDLE;pDisplayName,lpServiceName:PChar;var lpcchBuffer:DWORD):BOOL; Function GetServiceDisplayName(hSCManager:SC_HANDLE;lpServiceNme,lpDisplayName:PChar;var lpcchBuffer:DWORD):BOOL; Function LockServiceDatabase( hSCManager : SC_HANDLE) : SC_LOCK; Function NotifyBootConfigStatus( BootAcceptable : BOOL) : BOOL; Function OpenSCManager( lpMachineName, lpDatabaseName : PChar; dwDesiredAccess : DWORD) : SC_HANDLE; Function OpenService(hSCManager:SC_HANDLE;lpServiceNam:PChar;dwDesiredAccess:DWORD):SC_HANDLE; Function QueryServiceLockStatus( hSCManager : SC_HANDLE; var lpLockStatus : TQueryServiceLockStatus; cbBufSize : DWORD; var pcbBytesNeeded : DWORD) : BOOL; Function QueryServiceStatus(hService:SC_HANDLE;var lpServiceStatus:TServiceStatus):BOOL; Function SetServiceStatus(hServiceStatus:SERVICE_STATUS_HANDLE;var lpServiceStatus:TServiceStatus):BOOL; Function StartService(hService:SC_HANDLE;dwNumServiceArgs:DWORD;var lpServiceArgVectors:PChar):BOOL; Function UnlockServiceDatabase( ScLock : SC_LOCK) : BOOL; end; procedure SIRegister_JvPickDate(CL: TPSPascalCompiler); begin Function SelectDate(Sender:TWinControl; var Date:TDateTime; const DlgCaption:TCaption; AStartOfWeek: TDayOfWeekName;AWeekends:TDaysOfWeek;AWeekendColor:TColor;BtnHints:TStrings;MinDate:TDateTime;MaxDate:TDateTime):Bool; Function SelectDateStr(Sender:TWinControl;var StrDate:string;const DlgCaption:TCaption;AStartOfWeek:TDayOfWeekName;AWeekend:TDaysOfWeek;AWeekendClr:TColor;BtnHints:TStrings;MinDate:TDateTime;MaxDate:TDateTime):Bool; Function PopupDate(var Date:TDateTime; Edit:TWinControl;MinDate:TDateTime;MaxDate:TDateTime):Boolean; Function CreatePopupCalendar(AOwner:TComponent;ABiDiMode:TBiDiMode;MinDate:TDateTime;MaxDate:TDateTime):TWinControl; Procedure SetupPopupCalendar(PopupCalendar:TWinControl;AStartOfWeek:TDayOfWeekName;AWeekends:TDaysOfWeek; AWeekendColor:TColor;BtnHints:TStrings;FourDigitYear:Boolean;MinDate:TDateTime;MaxDate:TDateTime); Function CreateNotifyThread(const FolderName:string;WatchSubtree:Bool;Filter:TFileChangeFilters):TJvNotifyThread; end; procedure SIRegister_JclNTFS2(CL: TPSPascalCompiler); begin ClassN(CL.FindClass('TOBJECT'),'EJclNtfsError; TypeS(TFileCompressionState,(fcNoCompression,fcDefaultCompression,fcLZNT1Compression); Function NtfsGetCompression2( const FileName : TFileName; var State : Short) : Boolean;; Function NtfsGetCompression12( const FileName : TFileName) : TFileCompressionState;; Function NtfsSetCompression2( const FileName : TFileName; const State : Short) : Boolean; Procedure NtfsSetFileCompression2(const FileName : TFileName; const State : TFileCompressionState); Procedure NtfsSetDirectoryTreeCompression2(const Directy:string;const State:TFileCompressionState); Procedure NtfsSetDefaultFileCompression2(const Directory: string;const State:TFileCompressionState); Procedure NtfsSetPathCompression2(const Path:string;const State:TFileCompressionState;Recurve:Bool); Function NtfsSetSparse2( const FileName : string) : Boolean; Function NtfsZeroDataByHandle2(const Handle: THandle; const First, Last : Int64) : Boolean; Function NtfsZeroDataByName2(const FileName: string;const First,Last: Int64) : Boolean; Function NtfsSparseStreamsSupported2( const Volume : string) : Boolean; Function NtfsGetSparse2( const FileName : string) : Boolean; Function NtfsDeleteReparsePoint2( const FileName : string; ReparseTag : DWORD) : Boolean; Function NtfsSetReparsePoint2(const FileName:string;var ReparseData,Size : Longword) : Bool); Function NtfsGetReparseTag2( const Path : string; var Tag : DWORD) : Boolean; Function NtfsReparsePointsSupported2( const Volume : string) : Boolean; Function NtfsFileHasReparsePoint2( const Path : string) : Boolean; Function NtfsIsFolderMountPoint2( const Path : string) : Boolean; Function NtfsMountDeviceAsDrive2( const Device : WideString; Drive : Char) : Boolean; Function NtfsMountVolume2(const Volume:WideChar;const MountPoint:WideString) : Boolean; TypeS('TOpLock', '( olExclusive, olReadOnly, olBatch, olFilter ); Function NtfsOpLockAckClosePending2( Handle : THandle; Overlapped : TOverlapped) : Boolean; Function NtfsOpLockBreakAckNo22( Handle : THandle; Overlapped : TOverlapped) : Boolean; Function NtfsOpLockBreakAcknowledge2(Handle:THandle; Overlapped: TOverlapped) : Boolean; Function NtfsOpLockBreakNotify2( Handle : THandle; Overlapped : TOverlapped) : Boolean; Function NtfsRequestOpLock2(Handle:THandle; Kind:TOpLock; Overlapped: TOverlapped):Boolean; Function NtfsCreateJunctionPoint2( const Source, Destination : string) : Boolean; Function NtfsDeleteJunctionPoint2( const Source : string) : Boolean; Function NtfsGetJunctionPointDestination2(const Source:string;var Destination: string):Bool; TypeS(TStreamId', '( siInvalid, siStandard, siExtendedAttribute, siSec' +urity,siAlternate,siHardLink,siProperty, siObjectIdentifier,siReparsePoints,siSparseFile); TypeS(TStreamIds', 'set of TStreamId; TInternalFindStreamData','record FileHandle:THandle;Context:TObject; StreamIds:TStreamIds;end; TypeS(TFindStreamData', 'record Internal : TInternalFindStreamData; At' +tributes : DWORD; StreamID : TStreamId; Name: WideString; Size : Int64; end; Function NtfsFindFirstStream2(const FileName:string;StreamIds:TStreamIds;var Data:TFindStreamData):Bool; Function NtfsFindNextStream2( var Data : TFindStreamData) : Boolean; Function NtfsFindStreamClose2( var Data : TFindStreamData) : Boolean; Function NtfsCreateHardLink2( const LinkFileName, ExistingFileName : String) : Boolean; Function NtfsCreateHardLinkA2(const LinkFileName,ExistingFileName:AnsiString): Boolean; Function NtfsCreateHardLinkW2(const LinkFileName,ExistingFileName: WideString): Boolean; TypeS('TNtfsHardLinkInfo', 'record LinkCount : Cardinal; FileIndex : Int64; end; Function NtfsGetHardLinkInfo2(const FileName:string;var Info:TNtfsHardLinkInfo):Boolean; Function NtfsFindHardLinks2(const Path:string;const FileIdxHigh,FIdxLow:Card;const List:TStrings):Bool Function NtfsDeleteHardLinks2( const FileName : string) : Boolean; FindClass('TOBJECT'),'EJclFileSummaryError; TJclFileSummaryAccess', '( fsaRead, fsaWrite, fsaReadWrite ); TJclFileSummaryShare', '( fssDenyNone, fssDenyRead, fssDenyWrite, fssDenyAll ); TJclFileSummaryPropSetCallback', 'Function ( const FMTID : TGUID) : Boolean; ClassN(CL.FindClass('TOBJECT'),'TJclFileSummary; SIRegister_TJclFilePropertySet(CL); //TypeS('TJclFilePropertySetClass', 'class of TJclFilePropertySet; SIRegister_TJclFileSummary(CL); SIRegister_TJclFileSummaryInformation(CL); SIRegister_TJclDocSummaryInformation(CL); SIRegister_TJclMediaFileSummaryInformation(CL); SIRegister_TJclMSISummaryInformation(CL); SIRegister_TJclShellSummaryInformation(CL); SIRegister_TJclStorageSummaryInformation(CL); SIRegister_TJclImageSummaryInformation(CL); SIRegister_TJclDisplacedSummaryInformation(CL); SIRegister_TJclBriefCaseSummaryInformation(CL); SIRegister_TJclMiscSummaryInformation(CL); SIRegister_TJclWebViewSummaryInformation(CL); SIRegister_TJclMusicSummaryInformation(CL); SIRegister_TJclDRMSummaryInformation(CL); SIRegister_TJclVideoSummaryInformation(CL); SIRegister_TJclAudioSummaryInformation(CL); SIRegister_TJclControlPanelSummaryInformation(CL); SIRegister_TJclVolumeSummaryInformation(CL); SIRegister_TJclShareSummaryInformation(CL); SIRegister_TJclLinkSummaryInformation(CL); SIRegister_TJclQuerySummaryInformation(CL); SIRegister_TJclImageInformation(CL); SIRegister_TJclJpegSummaryInformation(CL); end; procedure SIRegister_Jcl8087(CL: TPSPascalCompiler); begin AddTypeS('T8087Precision', '( pcSingle, pcReserved, pcDouble, pcExtended ); T8087Rounding','( rcNearestOrEven, rcDownInfinity, rcUpInfinity, rcChopOrTruncate ); T8087Infinity','( icProjective, icAffine ); T8087Exception','(emInvalidOp,emDenormalizedOperand,emZeroDivide,emOverflow,emUnderflow,emPrecision; TypeS('T8087Exceptions', set of T8087Exception; Function Get8087ControlWord : Word; Function Get8087Infinity : T8087Infinity; Function Get8087Precision : T8087Precision; Function Get8087Rounding : T8087Rounding; Function Get8087StatusWord( ClearExceptions : Boolean) : Word; Function Set8087Infinity( const Infinity : T8087Infinity) : T8087Infinity; Function Set8087Precision( const Precision : T8087Precision) : T8087Precision; Function Set8087Rounding( const Rounding : T8087Rounding) : T8087Rounding; Function Set8087ControlWord( const Control : Word) : Word; Function ClearPending8087Exceptions : T8087Exceptions; Function GetPending8087Exceptions : T8087Exceptions; Function GetMasked8087Exceptions : T8087Exceptions; Function SetMasked8087Exceptions(Exceptions:T8087Exceptions;ClearBefore:Boolean):T8087Exceptions; Function Mask8087Exceptions( Exceptions:T8087Exceptions) : T8087Exceptions; Function Unmask8087Exceptions(Exceptions:T8087Exceptions;ClearBefore:Bool): T8087Exceptions; end; procedure SIRegister_JvBoxProcs(CL: TPSPascalCompiler); begin Procedure BoxMoveSelectedItems( SrcList, DstList : TWinControl); Procedure BoxMoveAllItems( SrcList, DstList : TWinControl); Procedure BoxDragOver(List:TWinControl;Sorce:TObject;X,Y:Int;State:TDragState;var Accept:Bool;Sorted:Bool; Procedure BoxMoveFocusedItem( List : TWinControl; DstIndex : Int); Procedure BoxMoveSelected( List : TWinControl; Items : TStrings); Procedure BoxSetItem( List : TWinControl; Index : Int); Function BoxGetFirstSelection( List : TWinControl) : Int; Function BoxCanDropItem(List:TWinControl; X,Y:Int; var DragIndex : Int) : Boolean; end; procedure SIRegister_UrlMon(CL: TPSPascalCompiler); begin //ConstantN('SZ_URLCONTEXT','POLEStr').SetString( 'URL Context; //ConstantN('SZ_ASYNC_CALLEE','POLEStr').SetString( 'AsyncCallee; ConstantN('MKSYS_URLMONIKER','LongInt').SetInt( 6); type ULONG', 'Cardinal; LPCWSTR', 'PChar; TypeS('LPWSTR', 'PChar; LPSTR', 'PChar; TBindVerb', 'ULONG; TBindInfoF', 'ULONG; TBindF', 'ULONG; TBSCF', 'ULONG; TBindStatus', 'ULONG; TCIPStatus', 'ULONG; TBindString', 'ULONG; TPiFlags', 'ULONG; TOIBdgFlags', 'ULONG; TParseAction', 'ULONG; TPSUAction', 'ULONG; TQueryOption', 'ULONG; TPUAF', 'ULONG; TSZMFlags', 'ULONG; TUrlZone', 'ULONG; TUrlTemplate', 'ULONG; TZAFlags', 'ULONG; TUrlZoneReg', 'ULONG; 'URLMON_OPTION_USERAGENT','LongWord').SetUInt( $10000001); ConstantN('URLMON_OPTION_USERAGENT_REFRESH','LongWord').SetUInt( $10000002); const 'URLMON_OPTION_URL_ENCODING','LongWord').SetUInt( $10000004); const 'URLMON_OPTION_USE_BINDSTRINGCREDS','LongWord').SetUInt( $10000008); const 'CF_NULL','LongInt').SetInt( 0); const 'CFSTR_MIME_NULL','LongInt').SetInt( 0); const 'CFSTR_MIME_TEXT','String').SetString( 'text/plain; const 'CFSTR_MIME_RICHTEXT','String').SetString( 'text/richtext; const 'CFSTR_MIME_X_BITMAP','String').SetString( 'image/x-xbitmap; const 'CFSTR_MIME_POSTSCRIPT','String').SetString( 'application/postscript; const 'CFSTR_MIME_AIFF','String').SetString( 'audio/aiff; const 'CFSTR_MIME_BASICAUDIO','String').SetString( 'audio/basic; const 'CFSTR_MIME_WAV','String').SetString( 'audio/wav; const 'CFSTR_MIME_X_WAV','String').SetString( 'audio/x-wav; const 'CFSTR_MIME_GIF','String').SetString( 'image/gif; const 'CFSTR_MIME_PJPEG','String').SetString( 'image/pjpeg; const 'CFSTR_MIME_JPEG','String').SetString( 'image/jpeg; const 'CFSTR_MIME_TIFF','String').SetString( 'image/tiff; const 'CFSTR_MIME_X_PNG','String').SetString( 'image/x-png; const 'CFSTR_MIME_BMP','String').SetString( 'image/bmp; const 'CFSTR_MIME_X_ART','String').SetString( 'image/x-jg; const 'CFSTR_MIME_X_EMF','String').SetString( 'image/x-emf; const 'CFSTR_MIME_X_WMF','String').SetString( 'image/x-wmf; const 'CFSTR_MIME_AVI','String').SetString( 'video/avi; const 'CFSTR_MIME_MPEG','String').SetString( 'video/mpeg; const 'CFSTR_MIME_FRACTALS','String').SetString( 'application/fractals; const 'CFSTR_MIME_RAWDATA','String').SetString( 'application/octet-stream; const 'CFSTR_MIME_RAWDATASTRM','String').SetString( 'application/octet-stream; const 'CFSTR_MIME_PDF','String').SetString( 'application/pdf; const 'CFSTR_MIME_X_AIFF','String').SetString( 'audio/x-aiff; const 'CFSTR_MIME_X_REALAUDIO','String').SetString( 'audio/x-pn-realaudio; const 'CFSTR_MIME_XBM','String').SetString( 'image/xbm; const 'CFSTR_MIME_QUICKTIME','String').SetString( 'video/quicktime; const 'CFSTR_MIME_X_MSVIDEO','String').SetString( 'video/x-msvideo; const 'CFSTR_MIME_X_SGI_MOVIE','String').SetString( 'video/x-sgi-movie; const 'CFSTR_MIME_HTML','String').SetString( 'text/html; const 'MK_S_ASYNCHRONOUS','LongWord').SetUInt( $000401E8); const 'S_ASYNCHRONOUS','LongWord').SetUInt( $000401E8); const 'E_PENDING','LongWord').SetUInt( $8000000A); Interface(CL.FindInterface('IUNKNOWN'),IBinding, 'IBinding; SIRegister_IPersistMoniker(CL); SIRegister_IBindProtocol(CL); SIRegister_IBinding(CL); const 'BINDVERB_GET','LongWord').SetUInt( $00000000); const 'BINDVERB_POST','LongWord').SetUInt( $00000001); const 'BINDVERB_PUT','LongWord').SetUInt( $00000002); const 'BINDVERB_CUSTOM','LongWord').SetUInt( $00000003); const 'BINDINFOF_URLENCODESTGMEDDATA','LongWord').SetUInt( $00000001); const 'BINDINFOF_URLENCODEDEXTRAINFO','LongWord').SetUInt( $00000002); const 'BINDF_ASYNCHRONOUS','LongWord').SetUInt( $00000001); const 'BINDF_ASYNCSTORAGE','LongWord').SetUInt( $00000002); const 'BINDF_NOPROGRESSIVERENDERING','LongWord').SetUInt( $00000004); const 'BINDF_OFFLINEOPERATION','LongWord').SetUInt( $00000008); const 'BINDF_GETNEWESTVERSION','LongWord').SetUInt( $00000010); const 'BINDF_NOWRITECACHE','LongWord').SetUInt( $00000020); const 'BINDF_NEEDFILE','LongWord').SetUInt( $00000040); const 'BINDF_PULLDATA','LongWord').SetUInt( $00000080); const 'BINDF_IGNORESECURITYPROBLEM','LongWord').SetUInt( $00000100); const 'BINDF_RESYNCHRONIZE','LongWord').SetUInt( $00000200); const 'BINDF_HYPERLINK','LongWord').SetUInt( $00000400); const 'BINDF_NO_UI','LongWord').SetUInt( $00000800); const 'BINDF_SILENTOPERATION','LongWord').SetUInt( $00001000); const 'BINDF_PRAGMA_NO_CACHE','LongWord').SetUInt( $00002000); const 'BINDF_FREE_THREADED','LongWord').SetUInt( $00010000); const 'BINDF_DIRECT_READ','LongWord').SetUInt( $00020000); const 'BINDF_FORMS_SUBMIT','LongWord').SetUInt( $00040000); const 'BINDF_GETFROMCACHE_IF_NET_FAIL','LongWord').SetUInt( $00080000); //const 'BINDF_DONTUSECACHE','').SetString( BINDF_GETNEWESTVERSION); //const 'BINDF_DONTPUTINCACHE','').SetString( BINDF_NOWRITECACHE); //const 'BINDF_NOCOPYDATA','').SetString( BINDF_PULLDATA); const 'BSCF_FIRSTDATANOTIFICATION','LongWord').SetUInt( $00000001); const 'BSCF_INTERMEDIATEDATANOTIFICATION','LongWord').SetUInt( $00000002); const 'BSCF_LASTDATANOTIFICATION','LongWord').SetUInt( $00000004); const 'BSCF_DATAFULLYAVAILABLE','LongWord').SetUInt( $00000008); const 'BSCF_AVAILABLEDATASIZEUNKNOWN','LongWord').SetUInt( $00000010); const 'BINDSTATUS_FINDINGRESOURCE','LongInt').SetInt( 1); const 'BINDSTATUS_CONNECTING','LongInt').SetInt( BINDSTATUS_FINDINGRESOURCE + 1); const 'BINDSTATUS_REDIRECTING','LongInt').SetInt( BINDSTATUS_CONNECTING + 1); const 'BINDSTATUS_BEGINDOWNLOADDATA','LongInt').SetInt( BINDSTATUS_REDIRECTING + 1); const 'BINDSTATUS_DOWNLOADINGDATA','LongInt').SetInt( BINDSTATUS_BEGINDOWNLOADDATA + 1); const 'BINDSTATUS_ENDDOWNLOADDATA','LongInt').SetInt( BINDSTATUS_DOWNLOADINGDATA + 1); const BINDSTATUS_BEGINDOWNLOADCOMPONENTS,LongInt).SetInt(BINDSTATUS_ENDDOWNLOADDATA + 1); const 'BINDSTATUS_INSTALLINGCOMPONENTS',LongInt).SetInt(BINDSTATUS_BEGINDOWNLOADCOMPONENTS+1); const BINDSTATUS_ENDDOWNLOADCOMPONENTS,LongInt).SetInt(BINDSTATUS_INSTALLINGCOMPONENTS+1); const BINDSTATUS_USINGCACHEDCOPY,LongInt).SetInt( BINDSTATUS_ENDDOWNLOADCOMPONENTS + 1); const 'BINDSTATUS_SENDINGREQUEST','LongInt').SetInt( BINDSTATUS_USINGCACHEDCOPY + 1); const 'BINDSTATUS_CLASSIDAVAILABLE','LongInt').SetInt( BINDSTATUS_SENDINGREQUEST + 1); const 'BINDSTATUS_MIMETYPEAVAILABLE','LongInt').SetInt( BINDSTATUS_CLASSIDAVAILABLE + 1); const BINDSTATUS_CACHEFILENAMEAVAILABLE,LongInt).SetInt(BINDSTATUS_MIMETYPEAVAILABLE+1); const 'BINDSTATUS_BEGINSYNCOPERATION','LongInt').SetInt(BINDSTATUS_CACHEFILENAMEAVAILABLE+1); const BINDSTATUS_ENDSYNCOPERATION',LongInt').SetInt( BINDSTATUS_BEGINSYNCOPERATION + 1); const 'BINDSTATUS_BEGINUPLOADDATA','LongInt').SetInt( BINDSTATUS_ENDSYNCOPERATION + 1); const 'BINDSTATUS_UPLOADINGDATA','LongInt').SetInt( BINDSTATUS_BEGINUPLOADDATA + 1); const 'BINDSTATUS_ENDUPLOADDATA','LongInt').SetInt( BINDSTATUS_UPLOADINGDATA + 1); const 'BINDSTATUS_PROTOCOLCLASSID','LongInt').SetInt( BINDSTATUS_ENDUPLOADDATA + 1); const 'BINDSTATUS_ENCODING','LongInt').SetInt( BINDSTATUS_PROTOCOLCLASSID + 1); const 'BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE','LongInt').SetInt( BINDSTATUS_ENCODING + 1); const 'BINDSTATUS_CLASSINSTALLLOCATION','LongInt').SetInt( BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE + 1); const 'BINDSTATUS_DECODING','LongInt').SetInt( BINDSTATUS_CLASSINSTALLLOCATION + 1); const 'BINDSTATUS_LOADINGMIMEHANDLER','LongInt').SetInt( BINDSTATUS_DECODING + 1); const BINDSTATUS_CONTENTDISPOSITIONATTACH,LongInt).SetInt(BINDSTATUS_LOADINGMIMEHANDLER+1); const 'BINDSTATUS_FILTERREPORTMIMETYPE',LongInt).SetInt(BINDSTAT_CONTENTDISPOSITIONATTACH+1); const BINDSTATUS_CLSIDCANINSTANTIATE,LongInt).SetInt(BINDSTATUS_FILTERREPORTMIMETYPE+ 1); const BINDSTATUS_IUNKNOWNAVAILABLE,LongInt).SetInt( BINDSTATUS_CLSIDCANINSTANTIATE + 1); const 'BINDSTATUS_DIRECTBIND','LongInt').SetInt( BINDSTATUS_IUNKNOWNAVAILABLE + 1); const 'BINDSTATUS_RAWMIMETYPE','LongInt').SetInt( BINDSTATUS_DIRECTBIND + 1); const 'BINDSTATUS_PROXYDETECTING','LongInt').SetInt( BINDSTATUS_RAWMIMETYPE + 1); const 'BINDSTATUS_ACCEPTRANGES','LongInt').SetInt( BINDSTATUS_PROXYDETECTING + 1); const 'BINDSTATUS_COOKIE_SENT','LongInt').SetInt( BINDSTATUS_ACCEPTRANGES + 1); const 'BINDSTATUS_COMPACT_POLICY_RECEIVED','LongInt').SetInt(BINDSTATUS_COOKIE_SENT + 1); const BINDSTATUS_COOKIE_SUPPRESSED,LongInt).SetInt(BINDSTATUS_COMPACT_POLICY_RECEIVED+1); const BINDSTATUS_COOKIE_STATE_UNKNOWN,LongInt).SetInt( BINDSTATUS_COOKIE_SUPPRESSED + 1); const BINDSTATUS_COOKIE_STATE_ACCEPT,LongInt).SetInt(BINDSTATUS_COOKIE_STATE_UNKNOWN+ 1); const BINDSTATUS_COOKIE_STATE_REJECT,LongInt).SetInt(BINDSTATUS_COOKIE_STATE_ACCEPT + 1); const BINDSTATUS_COOKIE_STATE_PROMPT,LongInt).SetInt(BINDSTATUS_COOKIE_STATE_REJECT + 1); const BINDSTATUS_COOKIE_STATE_LEASH,LongInt).SetInt( BINDSTATUS_COOKIE_STATE_PROMPT + 1); const BINDSTATUS_COOKIE_STATE_DOWNGRADE,LongInt).SetInt(BINDSTATUS_COOKIE_STATE_LEASH+1); const 'BINDSTATUS_POLICY_HREF','LongInt').SetInt( BINDSTATUS_COOKIE_STATE_DOWNGRADE + 1); const 'BINDSTATUS_P3P_HEADER','LongInt').SetInt( BINDSTATUS_POLICY_HREF + 1); const 'BINDSTATUS_SESSION_COOKIE_RECEIVED','LongInt').SetInt( BINDSTATUS_P3P_HEADER + 1); const 'BINDSTATUS_PERSISTENT_COOKIE_RECEIVED','LongInt').SetInt(BINDSTATUS_SESSION_COOKIE_RECEIVED+1); const 'BINDSTATUS_SESSION_COOKIES_ALLOWED','LongInt').SetInt(BINDSTATUS_PERSISTENT_COOKIE_RECEIVED+1); const BINDSTATUS_CACHECONTROL,LongInt).SetInt( BINDSTATUS_SESSION_COOKIES_ALLOWED + 1); const BINDSTATUS_CONTENTDISPOSITIONFILENAME,LongInt).SetInt(BINDSTATUS_CACHECONTROL + 1); const 'BINDSTATUS_MIMETEXTPLAINMISMATCH','LongInt').SetInt(BINDSTATUS_CONTENTDISPOSITIONFILENAME+1); const BINDSTATUS_PUBLISHERAVAILABLE,LongInt).SetInt(BINDSTATUS_MIMETEXTPLAINMISMATCH+1); const BINDSTATUS_DISPLAYNAMEAVAILABLE,LongInt).SetInt(BINDSTATUS_PUBLISHERAVAILABLE + 1); // PBindInfo', '^TBindInfo // will not work; {_tagBINDINFO', 'record cbSize : ULONG; szExtraInfo : LPWSTR; stg' +'medData : TStgMedium; grfBindInfoF : DWORD; dwBindVerb : DWORD; szCustomVe' +'rb : LPWSTR; cbstgmedData : DWORD; dwOptions : DWORD; dwOptionsFlags : DWO' +'RD; dwCodePage : DWORD; securityAttributes : TSecurityAttributes; iid : TG' +'UID; pUnk : IUnknown; dwReserved : DWORD; end; TBindInfo', '_tagBINDINFO; BINDINFO', '_tagBINDINFO;} _REMSECURITY_ATTRIBUTES', 'record nLength : DWORD; lpSecurityDes' +'criptor : DWORD; bInheritHandle : BOOL; end; TRemSecurityAttributes', '_REMSECURITY_ATTRIBUTES; REMSECURITY_ATTRIBUTES', '_REMSECURITY_ATTRIBUTES; //PRemBindInfo', '^TRemBindInfo // will not work; {_tagRemBINDINFO', 'record cbSize : ULONG; szExtraInfo : LPWSTR; ' +'grfBindInfoF : DWORD; dwBindVerb : DWORD; szCustomVerb : LPWSTR; cbstgmedD' +'ata : DWORD; dwOptions : DWORD; dwOptionsFlags : DWORD; dwCodePage : DWORD' +'; securityAttributes : TRemSecurityAttributes; iid : TGUID; pUnk : IUnknow' +'n; dwReserved : DWORD; end; TRemBindInfo', '_tagRemBINDINFO; RemBINDINFO', '_tagRemBINDINFO;} //PRemFormatEtc', '^TRemFormatEtc // will not work; tagRemFORMATETC','record cfFormat:DWORD; ptd:DWORD; dwAspect:DWORD;lindex:Longint;tymed:DWORD; end; TRemFormatEtc', 'tagRemFORMATETC; RemFORMATETC', 'tagRemFORMATETC; SIRegister_IBindStatusCallback(CL); SIRegister_IAuthenticate(CL); SIRegister_IHttpNegotiate(CL); SIRegister_IWindowForBindingUI(CL); const 'CIP_DISK_FULL','LongInt').SetInt( 0); const 'CIP_ACCESS_DENIED','LongInt').SetInt( CIP_DISK_FULL + 1); const 'CIP_NEWER_VERSION_EXISTS','LongInt').SetInt( CIP_ACCESS_DENIED + 1); const 'CIP_OLDER_VERSION_EXISTS','LongInt').SetInt( CIP_NEWER_VERSION_EXISTS + 1); const 'CIP_NAME_CONFLICT','LongInt').SetInt( CIP_OLDER_VERSION_EXISTS + 1); const CIP_TRUST_VERIFICATION_COMPONENT_MISSING,LongInt).SetInt( CIP_NAME_CONFLICT + 1); const CIP_EXE_SELF_REGISTERATION_TIMEOUT,LongInt(CIP_TRUST_VERIFICATION_COMPONET_MISSING+1); const 'CIP_UNSAFE_TO_ABORT','LongInt').SetInt( CIP_EXE_SELF_REGISTERATION_TIMEOUT + 1); const 'CIP_NEED_REBOOT','LongInt').SetInt( CIP_UNSAFE_TO_ABORT + 1); const 'CIP_NEED_REBOOT_UI_PERMISSION','LongInt').SetInt( CIP_NEED_REBOOT + 1); SIRegister_ICodeInstall(CL); SIRegister_IWinInetInfo(CL); const 'WININETINFO_OPTION_LOCK_HANDLE','LongInt').SetInt( 65534); SIRegister_IHttpSecurity(CL); SIRegister_IWinInetHttpInfo(CL); SIRegister_IBindHost(CL); const 'URLOSTRM_USECACHEDCOPY_ONLY','LongWord').SetUInt( $00000001); const 'URLOSTRM_USECACHEDCOPY','LongWord').SetUInt( $00000002); const 'URLOSTRM_GETNEWESTVERSION','LongWord').SetUInt( $00000003); Function URLOpenStream(p1:IUnknown;p2:PChar; p3:DWORD; p4:IBindStatusCallback): HResult; Function URLOpenPullStream(p1:IUnknown;p2:PChar;p3:DWORD; BSC:IBindStatusCallback):HResult; Function URLDownloadToFile(Caller:IUnknown;URL:PChar;FileName:PChar;Reserved:DWORD;StatusCB:IBindStatusCallback): HResult; Function URLDownloadToCacheFile(p1:IUnknown;p2:PChar;p3:PChar;p4:DWORD;p5:DWORD;p6:IBindStatusCallback): HResult; Function URLOpenBlockingStream(p1:IUnknown;p2:PChar;out p3:IStream;p4:DWORD;p5:IBindStatusCallback):HResult; Function HlinkGoBack( unk : IUnknown) : HResult; Function HlinkGoForward( unk : IUnknown) : HResult; Function HlinkNavigateString( unk : IUnknown; szTarget : LPCWSTR) : HResult; // Function HlinkNavigateMoniker( Unk : IUnknown; mkTarget : IMoniker) : HResult; SIRegister_IInternet(CL); const 'BINDSTRING_HEADERS','LongInt').SetInt( 1); const 'BINDSTRING_ACCEPT_MIMES','LongInt').SetInt( BINDSTRING_HEADERS + 1); const 'BINDSTRING_EXTRA_URL','LongInt').SetInt( BINDSTRING_ACCEPT_MIMES + 1); const 'BINDSTRING_LANGUAGE','LongInt').SetInt( BINDSTRING_EXTRA_URL + 1); const 'BINDSTRING_USERNAME','LongInt').SetInt( BINDSTRING_LANGUAGE + 1); const 'BINDSTRING_PASSWORD','LongInt').SetInt( BINDSTRING_USERNAME + 1); const 'BINDSTRING_UA_PIXELS','LongInt').SetInt( BINDSTRING_PASSWORD + 1); const 'BINDSTRING_UA_COLOR','LongInt').SetInt( BINDSTRING_UA_PIXELS + 1); const 'BINDSTRING_OS','LongInt').SetInt( BINDSTRING_UA_COLOR + 1); const 'BINDSTRING_USER_AGENT','LongInt').SetInt( BINDSTRING_OS + 1); const 'BINDSTRING_ACCEPT_ENCODINGS','LongInt').SetInt( BINDSTRING_USER_AGENT + 1); const 'BINDSTRING_POST_COOKIE','LongInt').SetInt( BINDSTRING_ACCEPT_ENCODINGS + 1); const 'BINDSTRING_POST_DATA_MIME','LongInt').SetInt( BINDSTRING_POST_COOKIE + 1); const 'BINDSTRING_URL','LongInt').SetInt( BINDSTRING_POST_DATA_MIME + 1); //POLEStrArray', '^TOLESTRArray // will not work; SIRegister_IInternetBindInfo(CL); const 'PI_PARSE_URL','LongWord').SetUInt( $00000001); const 'PI_FILTER_MODE','LongWord').SetUInt( $00000002); const 'PI_FORCE_ASYNC','LongWord').SetUInt( $00000004); const 'PI_USE_WORKERTHREAD','LongWord').SetUInt( $00000008); const 'PI_MIMEVERIFICATION','LongWord').SetUInt( $00000010); const 'PI_CLSIDLOOKUP','LongWord').SetUInt( $00000020); const 'PI_DATAPROGRESS','LongWord').SetUInt( $00000040); const 'PI_SYNCHRONOUS','LongWord').SetUInt( $00000080); const 'PI_APARTMENTTHREADED','LongWord').SetUInt( $00000100); const 'PI_CLASSINSTALL','LongWord').SetUInt( $00000200); const 'PD_FORCE_SWITCH','LongWord').SetUInt( $00010000); //const 'PI_DOCFILECLSIDLOOKUP','').SetString( PI_CLSIDLOOKUP); //PProtocolData', '^TProtocolData // will not work; _tagPROTOCOLDATA,record grfFlags:DWORD; dwState:DWORD; pData:TObject;cbData:ULONG; end; TProtocolData', '_tagPROTOCOLDATA; PROTOCOLDATA', '_tagPROTOCOLDATA; Interface(CL.FindInterface('IUNKNOWN'),IInternetProtocolSink,'IInternetProtocolSink; SIRegister_IInternetProtocolRoot(CL); SIRegister_IInternetProtocol(CL); SIRegister_IInternetProtocolSink(CL); const 'OIBDG_APARTMENTTHREADED','LongWord').SetUInt( $00000100); SIRegister_IInternetSession(CL); SIRegister_IInternetThreadSwitch(CL); SIRegister_IInternetPriority(CL); const 'PARSE_CANONICALIZE','LongInt').SetInt( 1); const 'PARSE_FRIENDLY','LongInt').SetInt( PARSE_CANONICALIZE + 1); const 'PARSE_SECURITY_URL','LongInt').SetInt( PARSE_FRIENDLY + 1); const 'PARSE_ROOTDOCUMENT','LongInt').SetInt( PARSE_SECURITY_URL + 1); const 'PARSE_DOCUMENT','LongInt').SetInt( PARSE_ROOTDOCUMENT + 1); const 'PARSE_ANCHOR','LongInt').SetInt( PARSE_DOCUMENT + 1); const 'PARSE_ENCODE','LongInt').SetInt( PARSE_ANCHOR + 1); const 'PARSE_DECODE','LongInt').SetInt( PARSE_ENCODE + 1); const 'PARSE_PATH_FROM_URL','LongInt').SetInt( PARSE_DECODE + 1); const 'PARSE_URL_FROM_PATH','LongInt').SetInt( PARSE_PATH_FROM_URL + 1); const 'PARSE_MIME','LongInt').SetInt( PARSE_URL_FROM_PATH + 1); const 'PARSE_SERVER','LongInt').SetInt( PARSE_MIME + 1); const 'PARSE_SCHEMA','LongInt').SetInt( PARSE_SERVER + 1); const 'PARSE_SITE','LongInt').SetInt( PARSE_SCHEMA + 1); const 'PARSE_DOMAIN','LongInt').SetInt( PARSE_SITE + 1); const 'PARSE_LOCATION','LongInt').SetInt( PARSE_DOMAIN + 1); const 'PARSE_SECURITY_DOMAIN','LongInt').SetInt( PARSE_LOCATION + 1); const 'PSU_DEFAULT','LongInt').SetInt( 1); const 'PSU_SECURITY_URL_ONLY','LongInt').SetInt( PSU_DEFAULT + 1); const 'QUERY_EXPIRATION_DATE','LongInt').SetInt( 1); const 'QUERY_TIME_OF_LAST_CHANGE','LongInt').SetInt( QUERY_EXPIRATION_DATE + 1); const 'QUERY_CONTENT_ENCODING','LongInt').SetInt( QUERY_TIME_OF_LAST_CHANGE + 1); const 'QUERY_CONTENT_TYPE','LongInt').SetInt( QUERY_CONTENT_ENCODING + 1); const 'QUERY_REFRESH','LongInt').SetInt( QUERY_CONTENT_TYPE + 1); const 'QUERY_RECOMBINE','LongInt').SetInt( QUERY_REFRESH + 1); const 'QUERY_CAN_NAVIGATE','LongInt').SetInt( QUERY_RECOMBINE + 1); const 'QUERY_USES_NETWORK','LongInt').SetInt( QUERY_CAN_NAVIGATE + 1); const 'QUERY_IS_CACHED','LongInt').SetInt( QUERY_USES_NETWORK + 1); const 'QUERY_IS_INSTALLEDENTRY','LongInt').SetInt( QUERY_IS_CACHED + 1); const 'QUERY_IS_CACHED_OR_MAPPED','LongInt').SetInt( QUERY_IS_INSTALLEDENTRY + 1); const 'QUERY_USES_CACHE','LongInt').SetInt( QUERY_IS_CACHED_OR_MAPPED + 1); const 'QUERY_IS_SECURE','LongInt').SetInt( QUERY_USES_CACHE + 1); const 'QUERY_IS_SAFE','LongInt').SetInt( QUERY_IS_SECURE + 1); SIRegister_IInternetProtocolInfo(CL); IOInet', 'IInternet; IOInetBindInfo', 'IInternetBindInfo; IOInetProtocolRoot', 'IInternetProtocolRoot; IOInetProtocol', 'IInternetProtocol; IOInetProtocolSink', 'IInternetProtocolSink; IOInetProtocolInfo', 'IInternetProtocolInfo; IOInetSession', 'IInternetSession; IOInetPriority', 'IInternetPriority; IOInetThreadSwitch', 'IInternetThreadSwitch; Function CoInternetParseUrl( pwzUrl : LPCWSTR; ParseAction : TParseAction; dwFlags : DWORD; pszResult:LPWSTR; cchResult : DWORD; var pcchResult : DWORD; dwReserved : DWORD) : HResult; Function CoInternetCombineUrl( pwzBaseUrl, pwzRelativeUrl : LPCWSTR; dwCombineFlags : DWORD; pszResult:LPWSTR; cchResult : DWORD; var pcchResult : DWORD; dwReserved : DWORD) : HResult; Function CoInternetCompareUrl( pwzUrl1, pwzUrl2 : LPCWSTR; dwFlags : DWORD) : HResult; Function CoInternetGetProtocolFlags(pwzUrl:LPCWSTR;var dwFlags DWORD;dwReserved:DWORD):HResult; Function CoInternetQueryInfo(pwzUrl:LPCWSTR;QueryOptions:TQueryOption;dwQueryFlags:DWORD;pvBuffer:TObject;cbBuffer : DWORD; var pcbBuffer : DWORD; dwReserved : DWORD) : HResult; Function CoInternetGetSession(dwSessionMode:DWORD;var pIInternetSession:IInternetSes;dwReserved:DWORD):HResult; Function CoInternetGetSecurityUrl(pwzUrl:LPCWSTR;var pwzSecUrl:LPWSTR;psuAct:TPSUAction;dwReserv:DWORD):HResult; Function OInetParseUrl( pwzUrl : LPCWSTR; ParseAction : TParseAction; dwFlags : DWORD; pszResult:LPWSTR; cchResult : DWORD; var pcchResult : DWORD; dwReserved : DWORD) : HResult; Function OInetCombineUrl( pwzBaseUrl, pwzRelativeUrl : LPCWSTR; dwCombineFlags : DWORD; pszResult:LPWSTR; cchResult: DWORD;var pcchResult:DWORD; dwReserved : DWORD) : HResult; Function OInetCompareUrl( pwzUrl1, pwzUrl2 : LPCWSTR; dwFlags : DWORD) : Hresult; Function OInetGetProtocolFlags(pwzUrl : LPCWSTR; var dwFlags: DWORD; dwReserved : DWORD) : HResult; Function OInetQueryInfo( pwzUrl : LPCWSTR; QueryOptions : TQueryOption; dwQueryFlags : DWORD; pvBuffer : TObject; cbBuffer : DWORD; var pcbBuffer : DWORD; dwReserved : DWORD) : HResult; Function OInetGetSession(dwSessionMode:DWORD; var pIInternetSession:IInternetSession;dwReserved:DWORD):HResult; //Function CopyBindInfo( const cbiSrc : TBindInfo; var biDest : TBindInfo) : HResult; //Procedure ReleaseBindInfo( const bindinfo : TBindInfo); // const 'INET_E_USE_DEFAULT_PROTOCOLHANDLER','LongWord').SetUInt( HResult ( $800C0011 )); // const 'INET_E_USE_DEFAULT_SETTING','LongWord').SetUInt( HResult ( $800C0012 )); //const 'INET_E_DEFAULT_ACTION','LongWord').SetUInt( HResult ( $800C0011 )); //const 'INET_E_QUERYOPTION_UNKNOWN','LongWord').SetUInt( HResult ( $800C0013 )); //const 'INET_E_REDIRECTING','LongWord').SetUInt( HResult ( $800C0014 )); const 'PROTOCOLFLAG_NO_PICS_CHECK','LongWord').SetUInt( $00000001); SIRegister_IInternetSecurityMgrSite(CL); const 'MUTZ_NOSAVEDFILECHECK','LongWord').SetUInt( $00000001); const 'MUTZ_ISFILE','LongWord').SetUInt( $00000002); const 'MUTZ_ACCEPT_WILDCARD_SCHEME','LongWord').SetUInt( $00000080); const 'MUTZ_ENFORCERESTRICTED','LongWord').SetUInt( $00000100); const 'MUTZ_REQUIRESAVEDFILECHECK','LongWord').SetUInt( $00000400); const 'MAX_SIZE_SECURITY_ID','LongInt').SetInt( 512); const 'PUAF_DEFAULT','LongWord').SetUInt( $00000000); const 'PUAF_NOUI','LongWord').SetUInt( $00000001); const 'PUAF_ISFILE','LongWord').SetUInt( $00000002); const 'PUAF_WARN_IF_DENIED','LongWord').SetUInt( $00000004); const 'PUAF_FORCEUI_FOREGROUND','LongWord').SetUInt( $00000008); const 'PUAF_CHECK_TIFS','LongWord').SetUInt( $00000010); const 'PUAF_DONTCHECKBOXINDIALOG','LongWord').SetUInt( $00000020); const 'PUAF_TRUSTED','LongWord').SetUInt( $00000040); const 'PUAF_ACCEPT_WILDCARD_SCHEME','LongWord').SetUInt( $00000080); const 'PUAF_ENFORCERESTRICTED','LongWord').SetUInt( $00000100); const 'PUAF_NOSAVEDFILECHECK','LongWord').SetUInt( $00000200); const 'PUAF_REQUIRESAVEDFILECHECK','LongWord').SetUInt( $00000400); const 'PUAF_LMZ_UNLOCKED','LongWord').SetUInt( $00010000); const 'PUAF_LMZ_LOCKED','LongWord').SetUInt( $00020000); const 'PUAF_DEFAULTZONEPOL','LongWord').SetUInt( $00040000); const 'PUAF_NPL_USE_LOCKED_IF_RESTRICTED','LongWord').SetUInt( $00080000); const 'PUAF_NOUIIFLOCKED','LongWord').SetUInt( $00100000); const 'PUAFOUT_DEFAULT','LongWord').SetUInt( $0); const 'PUAFOUT_ISLOCKZONEPOLICY','LongWord').SetUInt( $1); const 'SZM_CREATE','LongWord').SetUInt( $00000000); const 'SZM_DELETE','LongWord').SetUInt( $00000001); SIRegister_IInternetSecurityManager(CL); SIRegister_IInternetHostSecurityManager(CL); SIRegister_IInternetSecurityManagerEx(CL); const URLACTION_MIN','LongWord').SetUInt( $00001000); const URLACTION_DOWNLOAD_MIN','LongWord').SetUInt( $00001000); const URLACTION_DOWNLOAD_SIGNED_ACTIVEX','LongWord').SetUInt( $00001001); const URLACTION_DOWNLOAD_UNSIGNED_ACTIVEX','LongWord').SetUInt( $00001004); const URLACTION_DOWNLOAD_CURR_MAX','LongWord').SetUInt( $00001004); const URLACTION_DOWNLOAD_MAX','LongWord').SetUInt( $000011FF); const 'URLACTION_ACTIVEX_MIN','LongWord').SetUInt( $00001200); const 'URLACTION_ACTIVEX_RUN','LongWord').SetUInt( $00001200); const 'URLACTION_ACTIVEX_OVERRIDE_OBJECT_SAFETY','LongWord').SetUInt( $00001201); const 'URLACTION_ACTIVEX_OVERRIDE_DATA_SAFETY','LongWord').SetUInt( $00001202); const 'URLACTION_ACTIVEX_OVERRIDE_SCRIPT_SAFETY','LongWord').SetUInt( $00001203); const 'URLACTION_SCRIPT_OVERRIDE_SAFETY','LongWord').SetUInt( $00001401); const 'URLACTION_ACTIVEX_CONFIRM_NOOBJECTSAFETY','LongWord').SetUInt( $00001204); const 'URLACTION_ACTIVEX_TREATASUNTRUSTED','LongWord').SetUInt( $00001205); const 'URLACTION_ACTIVEX_NO_WEBOC_SCRIPT','LongWord').SetUInt( $00001206); const 'URLACTION_ACTIVEX_CURR_MAX','LongWord').SetUInt( $00001206); const 'URLACTION_ACTIVEX_MAX','LongWord').SetUInt( $000013FF); const 'URLACTION_SCRIPT_MIN','LongWord').SetUInt( $00001400); const 'URLACTION_SCRIPT_RUN','LongWord').SetUInt( $00001400); const 'URLACTION_SCRIPT_JAVA_USE','LongWord').SetUInt( $00001402); const 'URLACTION_SCRIPT_SAFE_ACTIVEX','LongWord').SetUInt( $00001405); const 'URLACTION_SCRIPT_CURR_MAX','LongWord').SetUInt( $00001405); const 'URLACTION_SCRIPT_MAX','LongWord').SetUInt( $000015FF); const 'URLACTION_HTML_MIN','LongWord').SetUInt( $00001600); const 'URLACTION_HTML_SUBMIT_FORMS','LongWord').SetUInt( $00001601); const 'URLACTION_HTML_SUBMIT_FORMS_FROM','LongWord').SetUInt( $00001602); const 'URLACTION_HTML_SUBMIT_FORMS_TO','LongWord').SetUInt( $00001603); const 'URLACTION_HTML_FONT_DOWNLOAD','LongWord').SetUInt( $00001604); const 'URLACTION_HTML_JAVA_RUN','LongWord').SetUInt( $00001605); const 'URLACTION_HTML_CURR_MAX','LongWord').SetUInt( $00001605); const 'URLACTION_HTML_MAX','LongWord').SetUInt( $000017FF); const 'URLACTION_SHELL_MIN','LongWord').SetUInt( $00001800); const 'URLACTION_SHELL_INSTALL_DTITEMS','LongWord').SetUInt( $00001800); const 'URLACTION_SHELL_MOVE_OR_COPY','LongWord').SetUInt( $00001802); const 'URLACTION_SHELL_FILE_DOWNLOAD','LongWord').SetUInt( $00001803); const 'URLACTION_SHELL_VERB','LongWord').SetUInt( $00001804); const 'URLACTION_SHELL_WEBVIEW_VERB','LongWord').SetUInt( $00001805); const 'URLACTION_SHELL_SHELLEXECUTE','LongWord').SetUInt( $00001806); const 'URLACTION_SHELL_EXECUTE_HIGHRISK','LongWord').SetUInt( $00001806); const 'URLACTION_SHELL_EXECUTE_MODRISK','LongWord').SetUInt( $00001807); const 'URLACTION_SHELL_EXECUTE_LOWRISK','LongWord').SetUInt( $00001808); const 'URLACTION_SHELL_POPUPMGR','LongWord').SetUInt( $00001809); const 'URLACTION_SHELL_CURR_MAX','LongWord').SetUInt( $00001809); const 'URLACTION_SHELL_MAX','LongWord').SetUInt( $000019ff); const 'URLACTION_NETWORK_MIN','LongWord').SetUInt( $00001A00); const 'URLACTION_CREDENTIALS_USE','LongWord').SetUInt( $00001A00); const 'URLPOLICY_CREDENTIALS_SILENT_LOGON_OK','LongWord').SetUInt( $00000000); const 'URLPOLICY_CREDENTIALS_MUST_PROMPT_USER','LongWord').SetUInt( $00010000); const 'URLPOLICY_CREDENTIALS_CONDITIONAL_PROMPT','LongWord').SetUInt( $00020000); const 'URLPOLICY_CREDENTIALS_ANONYMOUS_ONLY','LongWord').SetUInt( $00030000); const 'URLACTION_AUTHENTICATE_CLIENT','LongWord').SetUInt( $00001A01); const 'URLPOLICY_AUTHENTICATE_CLEARTEXT_OK','LongWord').SetUInt( $00000000); const 'URLPOLICY_AUTHENTICATE_CHALLENGE_RESPONSE','LongWord').SetUInt( $00010000); const 'URLPOLICY_AUTHENTICATE_MUTUAL_ONLY','LongWord').SetUInt( $00030000); const 'URLACTION_NETWORK_CURR_MAX','LongWord').SetUInt( $00001A01); const 'URLACTION_NETWORK_MAX','LongWord').SetUInt( $00001BFF); const 'URLACTION_JAVA_MIN','LongWord').SetUInt( $00001C00); const 'URLACTION_JAVA_PERMISSIONS','LongWord').SetUInt( $00001C00); const 'URLPOLICY_JAVA_PROHIBIT','LongWord').SetUInt( $00000000); const 'URLPOLICY_JAVA_HIGH','LongWord').SetUInt( $00010000); const 'URLPOLICY_JAVA_MEDIUM','LongWord').SetUInt( $00020000); const 'URLPOLICY_JAVA_LOW','LongWord').SetUInt( $00030000); const 'URLPOLICY_JAVA_CUSTOM','LongWord').SetUInt( $00800000); const 'URLACTION_JAVA_CURR_MAX','LongWord').SetUInt( $00001C00); const 'URLACTION_JAVA_MAX','LongWord').SetUInt( $00001CFF); const 'URLACTION_INFODELIVERY_MIN','LongWord').SetUInt( $00001D00); const 'URLACTION_INFODELIVERY_NO_ADDING_CHANNELS','LongWord').SetUInt( $00001D00); const 'URLACTION_INFODELIVERY_NO_EDITING_CHANNELS','LongWord').SetUInt( $00001D01); const 'URLACTION_INFODELIVERY_NO_REMOVING_CHANNELS','LongWord').SetUInt( $00001D02); const 'URLACTION_INFODELIVERY_NO_ADDING_SUBSCRIPTIONS','LongWord').SetUInt( $00001D03); const 'URLACTION_INFODELIVERY_NO_EDITING_SUBSCRIPTIONS','LongWord').SetUInt( $00001D04); const 'URLACTION_INFODELIVERY_NO_REMOVING_SUBSCRIPTIONS','LongWord').SetUInt( $00001D05); const 'URLACTION_INFODELIVERY_NO_CHANNEL_LOGGING','LongWord').SetUInt( $00001D06); const 'URLACTION_INFODELIVERY_CURR_MAX','LongWord').SetUInt( $00001D06); const 'URLACTION_INFODELIVERY_MAX','LongWord').SetUInt( $00001Dff); const 'URLACTION_CHANNEL_SOFTDIST_MIN','LongWord').SetUInt( $00001E00); const 'URLACTION_CHANNEL_SOFTDIST_PERMISSIONS','LongWord').SetUInt( $00001E05); const 'URLPOLICY_CHANNEL_SOFTDIST_PROHIBIT','LongWord').SetUInt( $00010000); const 'URLPOLICY_CHANNEL_SOFTDIST_PRECACHE','LongWord').SetUInt( $00020000); const 'URLPOLICY_CHANNEL_SOFTDIST_AUTOINSTALL','LongWord').SetUInt( $00030000); const 'URLACTION_CHANNEL_SOFTDIST_MAX','LongWord').SetUInt( $00001EFF); const 'URLACTION_BEHAVIOR_MIN','LongWord').SetUInt( $00002000); const 'URLACTION_BEHAVIOR_RUN','LongWord').SetUInt( $00002000); const 'URLPOLICY_BEHAVIOR_CHECK_LIST','LongWord').SetUInt( $00010000); const 'URLACTION_FEATURE_MIN','LongWord').SetUInt( $00002100); const 'URLACTION_FEATURE_MIME_SNIFFING','LongWord').SetUInt( $00002100); const 'URLACTION_FEATURE_ZONE_ELEVATION','LongWord').SetUInt( $00002101); const 'URLACTION_FEATURE_WINDOW_RESTRICTIONS','LongWord').SetUInt( $00002102); const 'URLACTION_AUTOMATIC_DOWNLOAD_UI_MIN','LongWord').SetUInt( $00002200); const 'URLACTION_AUTOMATIC_DOWNLOAD_UI','LongWord').SetUInt( $00002200); const 'URLACTION_AUTOMATIC_ACTIVEX_UI','LongWord').SetUInt( $00002201); const 'URLACTION_ALLOW_RESTRICTEDPROTOCOLS','LongWord').SetUInt( $00002300); const 'URLPOLICY_ALLOW','LongWord').SetUInt( $00); const 'URLPOLICY_QUERY','LongWord').SetUInt( $01); const 'URLPOLICY_DISALLOW','LongWord').SetUInt( $03); const 'URLPOLICY_NOTIFY_ON_ALLOW','LongWord').SetUInt( $10); const 'URLPOLICY_NOTIFY_ON_DISALLOW','LongWord').SetUInt( $20); const 'URLPOLICY_LOG_ON_ALLOW','LongWord').SetUInt( $40); const 'URLPOLICY_LOG_ON_DISALLOW','LongWord').SetUInt( $80); const 'URLPOLICY_MASK_PERMISSIONS','LongWord').SetUInt( $0f); Function GetUrlPolicyPermissions( dw : DWORD) : DWORD; Function SetUrlPolicyPermissions( dw, dw2 : DWORD) : DWORD; const 'URLZONE_PREDEFINED_MIN','LongInt').SetInt( 0); const 'URLZONE_LOCAL_MACHINE','LongInt').SetInt( 0); const 'URLZONE_INTRANET','LongInt').SetInt( URLZONE_LOCAL_MACHINE + 1); const 'URLZONE_TRUSTED','LongInt').SetInt( URLZONE_INTRANET + 1); const 'URLZONE_INTERNET','LongInt').SetInt( URLZONE_TRUSTED + 1); const 'URLZONE_UNTRUSTED','LongInt').SetInt( URLZONE_INTERNET + 1); const 'URLZONE_PREDEFINED_MAX','LongInt').SetInt( 999); const 'URLZONE_USER_MIN','LongInt').SetInt( 1000); const 'URLZONE_USER_MAX','LongInt').SetInt( 10000); const 'URLTEMPLATE_CUSTOM','LongWord').SetUInt( $00000000); const 'URLTEMPLATE_PREDEFINED_MIN','LongWord').SetUInt( $00010000); const 'URLTEMPLATE_LOW','LongWord').SetUInt( $00010000); const 'URLTEMPLATE_MEDIUM','LongWord').SetUInt( $00011000); const 'URLTEMPLATE_HIGH','LongWord').SetUInt( $00012000); const 'URLTEMPLATE_PREDEFINED_MAX','LongWord').SetUInt( $00020000); const 'MAX_ZONE_PATH','LongInt').SetInt( 260); const 'MAX_ZONE_DESCRIPTION','LongInt').SetInt( 200); const 'ZAFLAGS_CUSTOM_EDIT','LongWord').SetUInt( $00000001); const 'ZAFLAGS_ADD_SITES','LongWord').SetUInt( $00000002); const 'ZAFLAGS_REQUIRE_VERIFICATION','LongWord').SetUInt( $00000004); const 'ZAFLAGS_INCLUDE_PROXY_OVERRIDE','LongWord').SetUInt( $00000008); const 'ZAFLAGS_INCLUDE_INTRANET_SITES','LongWord').SetUInt( $00000010); const 'ZAFLAGS_NO_UI','LongWord').SetUInt( $00000020); const 'ZAFLAGS_SUPPORTS_VERIFICATION','LongWord').SetUInt( $00000040); const 'ZAFLAGS_UNC_AS_INTRANET','LongWord').SetUInt( $00000080); const 'ZAFLAGS_USE_LOCKED_ZONES','LongWord').SetUInt( $00010000); //PZoneAttributes', '^TZoneAttributes // will not work; _ZONEATTRIBUTES','record cbSize:ULONG;szDisplayName:array [0..260-1] of Char;szDescription:array [0..200 - 1] of Char;szIconPath: array [0..260 - 1] of char; dwTemplateMinLevel: DWORD; dwTemplateRecommended: DWORD; dwTemplateCurrentLevel: DWORD; dwFlags: DWORD; end; { _ZONEATTRIBUTES = packed record cbSize: ULONG; szDisplayName: array [0..260 - 1] of WideChar; szDescription: array [0..200 - 1] of WideChar; szIconPath: array [0..260 - 1] of WideChar; dwTemplateMinLevel: DWORD; dwTemplateRecommended: DWORD; dwTemplateCurrentLevel: DWORD; dwFlags: DWORD; end; } TZoneAttributes', '_ZONEATTRIBUTES; ZONEATTRIBUTES', '_ZONEATTRIBUTES; const 'URLZONEREG_DEFAULT','LongInt').SetInt( 0); const 'URLZONEREG_HKLM','LongInt').SetInt( URLZONEREG_DEFAULT + 1); const 'URLZONEREG_HKCU','LongInt').SetInt( URLZONEREG_HKLM + 1); SIRegister_IInternetZoneManager(CL); SIRegister_IInternetZoneManagerEx(CL); const 'SOFTDIST_FLAG_USAGE_EMAIL','LongWord').SetUInt( $00000001); const 'SOFTDIST_FLAG_USAGE_PRECACHE','LongWord').SetUInt( $00000002); const 'SOFTDIST_FLAG_USAGE_AUTOINSTALL','LongWord').SetUInt( $00000004); const 'SOFTDIST_FLAG_DELETE_SUBSCRIPTION','LongWord').SetUInt( $00000008); const 'SOFTDIST_ADSTATE_NONE','LongWord').SetUInt( $00000000); const 'SOFTDIST_ADSTATE_AVAILABLE','LongWord').SetUInt( $00000001); const 'SOFTDIST_ADSTATE_DOWNLOADED','LongWord').SetUInt( $00000002); const 'SOFTDIST_ADSTATE_INSTALLED','LongWord').SetUInt( $00000003); //PCodeBaseHold', '^TCodeBaseHold // will not work; _tagCODEBASEHOLD', 'record cbSize : ULONG; szDistUnit : LPWSTR; ' +'szCodeBase : LPWSTR; dwVersionMS : DWORD; dwVersionLS : DWORD; dwStyle : DWORD; end; TCodeBaseHold', '_tagCODEBASEHOLD; CODEBASEHOLD', '_tagCODEBASEHOLD; //PSoftDistInfo', '^TSoftDistInfo // will not work; _tagSOFTDISTINFO', 'record cbSize : ULONG; dwFlags : DWORD; dwAd' +'State : DWORD; szTitle : LPWSTR; szAbstract : LPWSTR; szHREF : LPWSTR; dwI' +'nstalledVersionMS : DWORD; dwInstalledVersionLS : DWORD; dwUpdateVersionMS' +' : DWORD; dwUpdateVersionLS : DWORD; dwAdvertisedVersionMS : DWORD; dwAdve' +'rtisedVersionLS : DWORD; dwReserved : DWORD; end; TSoftDistInfo', '_tagSOFTDISTINFO; SOFTDISTINFO', '_tagSOFTDISTINFO; SIRegister_ISoftDistExt(CL); Function GetSoftwareUpdateInfo( szDistUnit : LPCWSTR; var dsi : TSoftDistInfo) : HResult; Function SetSoftwareUpdateAdvertisementState(szDistUnit: LPCWSTR; dwAdState, dwAdvertisedVersionMS, dwAdvertisedVersionLS : DWORD) : HResult; SIRegister_IDataFilter(CL); // PProtocolFilterData', '^TProtocolFilterData // will not work; _tagPROTOCOLFILTERDATA', 'record cbSize : DWORD; ProtocolSink : ' +'IInternetProtocolSink; Protocol : IInternetProtocol; Unk : IUnknown; dwFil' +'terFlags : DWORD; end; TProtocolFilterData', '_tagPROTOCOLFILTERDATA; PROTOCOLFILTERDATA', '_tagPROTOCOLFILTERDATA; //PDataInfo', '^TDataInfo // will not work; _tagDATAINFO', 'record ulTotalSize : ULONG; ulavrPacketSize : UL' +'ONG; ulConnectSpeed : ULONG; ulProcessorSpeed : ULONG; end; TDataInfo', '_tagDATAINFO; DATAINFO', '_tagDATAINFO; SIRegister_IEncodingFilterFactory(CL); Function IsLoggingEnabled( pszUrl : PChar) : BOOL; //Function IsLoggingEnabledA( pszUrl : PAnsiChar) : BOOL; //Function IsLoggingEnabledW( pszUrl : PWideChar) : BOOL; //PHitLoggingInfo', '^THitLoggingInfo // will not work; _tagHIT_LOGGING_INFO', 'record dwStructSize : DWORD; lpszLoggedU' +rlName:LPSTR;StartTime : TSystemTime;EndTime:TSystemTime; lpszExtendedInfo : LPSTR; end; THitLoggingInfo', '_tagHIT_LOGGING_INFO; HIT_LOGGING_INFO', '_tagHIT_LOGGING_INFO; Function WriteHitLogging( const Logginginfo : THitLoggingInfo) : BOOL; end; procedure SIRegister_DFFUtils(CL: TPSPascalCompiler); begin Procedure reformatMemo( const m : TCustomMemo); Procedure SetMemoMargins( m : TCustomMemo; const L, T, R, B : Int); Procedure MoveToTop( memo : TMemo); Procedure ScrollToTop( memo : TMemo); Function LineNumberClicked( memo : TMemo) : Int; Function MemoClickedLine( memo : TMemo) : Int; Function ClickedMemoLine( memo : TMemo) : Int; Function MemoLineClicked( memo : TMemo) : Int; Function LinePositionClicked( Memo : TMemo) : Int; Function ClickedMemoPosition( memo : TMemo) : Int; Function MemoPositionClicked( memo : TMemo) : Int; Procedure AdjustGridSize( grid : TDrawGrid); Procedure DeleteGridRow( Grid : TStringGrid; const ARow : Int); Procedure InsertgridRow( Grid : TStringGrid; const ARow : Int); Procedure Sortgrid( Grid : TStringGrid; const SortCol : Int);; Procedure Sortgrid1(Grid:TStringGrid; const SortCol : Int; sortascending : boolean);; Procedure sortstrDown( var s : string); Procedure sortstrUp( var s : string); Procedure rotatestrleft( var s : string); Function dffstrtofloatdef( s : string; default : extended) : extended; Function deblank( s : string) : string; Function IntToBinaryString( const n : Int; MinLength : Int) : string; Procedure FreeAndClearListBox( C : TListBox);; Procedure FreeAndClearMemo( C : TMemo);; Procedure FreeAndClearStringList( C : TStringList);; Function dffgetfilesize( f : TSearchrec) : int64; end; procedure SIRegister_MathsLib(CL: TPSPascalCompiler); begin TypeS('intset', 'set of byte; TPoint64', 'record x : int64; y : int64; end; Function GetNextPandigital( size : Int; var Digits : array of Int) : boolean; Function IsPolygonal( T : int64; var rank : array of Int) : boolean; Function GeneratePentagon( n : Int) : Int; Function IsPentagon( p : Int) : boolean; Function isSquare( const N : int64) : boolean; Function isCube( const N : int64) : boolean; Function isPalindrome( const n : int64) : boolean;; Function isPalindrome1( const n : int64; var len : Int) : boolean;; Function GetEulerPhi( n : int64) : int64; Function dffIntPower( a, b : int64) : int64;; Function IntPower1( a : extended; b : int64) : extended;; Function gcd2( a, b : int64) : int64; Function GCDMany( A : array of Int) : Int; Function LCMMany( A : array of Int) : Int; Procedure ContinuedFraction(A: array of int64;const wholepart:int;var numerator,denominator:int64); Function dffFactorial( n : int64) : int64; Function digitcount( n : int64) : Int; Function nextpermute( var a : array of Int) : boolean; Function convertfloattofractionstring(N:extended;maxdenom:Int;multipleof:boolean):string; Function convertStringToDecimal( s : string; var n : extended) : Boolean; Function InttoBinaryStr( nn : Int) : string; Function StrtoAngle( const s : string; var angle : extended) : boolean; Function AngleToStr( angle : extended) : string; Function AngleToStr2( angle : extended; decimal:boolean) : string; Function deg2rad( deg : extended) : extended; Function rad2deg( rad : extended) : extended; Function GetLongToMercProjection( const long : extended) : extended; Function GetLatToMercProjection( const Lat : Extended) : Extended; Function GetMercProjectionToLong( const ProjLong : extended) : extended; Function GetMercProjectionToLat( const ProjLat : extended) : extended; SIRegister_TPrimes(CL); //RIRegister_TPrimes(CL); //ConstantN('deg','LongInt').SetInt( char( 176)); ConstantN('minmark','LongInt').SetInt(( 180)); Function Random64( const N : Int64) : Int64;; Procedure Randomize64; Function Random641 : extended;; Procedure GetParens( Variables : string; OpChar : char; var list : TStringlist)//DFFUtils add 4.7.4.62 function MercScaling(Long0,lat0, long1, lat1:extended; x0,y0,x1,y1:integer) :TMercScalingRec'); function LonglatToPlotPt(Long,lat:Extended; Scalerec:TMercScalingrec):TPoint'); function PlotPtToLonglat(PlotPt:TPoint; Scalerec:TMercScalingrec):TRealPoint'); Function SphericalEarthDistance(lat1,lon1,lat2,lon2:extended; Units:integer):extended'); end; procedure SIRegister_UGeometry(CL: TPSPascalCompiler); begin TrealPoint', 'record x : extended; y : extended; end; Tline', 'record p1 : TPoint; p2 : TPoint; end; TRealLine', 'record p1 : TRealPoint; p2 : TRealPoint; end; TCircle', 'record cx : Int; cy : Int; r : Int; end; TRealCircle', 'record cx : extended; cy : extended; r : extended; end; PPResult', '( PPoutside, PPInside, PPVertex, PPEdge, PPError ); Function realpoint( x, y : extended) : TRealPoint; Function dist( const p1, p2 : TrealPoint) : extended; Function intdist( const p1, p2 : TPoint) : Int; Function dffLine( const p1, p2 : TPoint) : Tline;; Function Line1( const p1, p2 : TRealPoint) : TRealline;; Function dffCircle( const cx, cy, R : Int) : TCircle;; Function Circle1( const cx, cy, R : extended) : TRealCircle;; Function GetTheta( const L : TLine) : extended;; Function GetTheta1( const p1, p2 : TPoint) : extended;; Function GetTheta2( const p1, p2 : TRealPoint) : extended;; Procedure Extendline( var L : TLine; dist : Int);; Procedure Extendline1( var L : TRealLine; dist : extended);; Function Linesintersect( line1, line2 : TLine) : boolean; Function ExtendedLinesIntersect(Line1,Line2:TLine;const extendlines:bool;var IP:TPoint):bool; Function ExtendedLinesIntersect1(const Line1,Line2:TLine;const extendlines:bool;var IP:TRealPoint):bool; Function Intersect(L1,L2: TLine; var pointonborder:boolean; var IP : TPoint) : boolean; Function PointPerpendicularLine( L : TLine; P : TPoint) : TLine; Function PerpDistance( L : TLine; P : TPoint) : Int; Function AngledLineFromLine(L:TLine;P:TPoint;Dist:extended; alpha : extended) : TLine;; Function AngledLineFromLine1(L:TLine;P:TPoint;Dist:extended;alpha:extended;useScreenCoordiates:bool):TLine; Function PointInPoly( const p : TPoint; Points : array of TPoint) : PPResult; Function PolygonArea(const points:array of TPoint;const screencoordinates:boolean;var Clockwise:bool):Int; Procedure InflatePolygon(const points:array of Tpoint;var points2:array of TPoint;var area:Int;const screenCoordinates:bool; const inflateby : Int); Function PolyBuiltClockwise(const points:array of TPoint;const screencoordies:bool):bool; Function DegtoRad( d : extended) : extended; Function RadtoDeg( r : extended) : extended; Procedure TranslateLeftTo( var L : TLine; newend : TPoint);; Procedure TranslateLeftTo1( var L : TrealLine; newend : TrealPoint);; Procedure RotateRightEndBy( var L : TLine; alpha : extended); Procedure RotateRightEndTo( var L : TLine; alpha : extended);; Procedure RotateRightEndTo1( var p1, p2 : Trealpoint; alpha : extended);; Function CircleCircleIntersect( c1, c2 : TCircle; var IP1, Ip2 : TPoint) : boolean;; Function CircleCircleIntersect1(c1,c2:TRealCircle; var IP1,Ip2 TRealPoint) : boolean;; Function PointCircleTangentLines(const C:TCircle;const P:TPoint;var L1,L2:TLine):bool; Function CircleCircleExtTangentLines(C1,C2:TCircle;var C3:TCircle;var L1,L2,PL1,PL2,TL1,Tl2:TLine):Bool; end; procedure SIRegister_UAstronomy(CL: TPSPascalCompiler); begin TCoordType', '( ctUnknown, ctAzAlt, ctEclLonLat, ctRADecl, ctHADecl, ctGalLonLat ); TDTType', '( ttLocal, ttUT, ttGST, ttLST ); TRPoint', 'record x : extended; y : extended; CoordType : TCoordType; end; TSunrec', 'record TrueEclLon:extended; AppEclLon:extended;AUDistance:extended;TrueHADecl:TRPoint;TrueRADecl:TRPoint; TrueAzAl:TRPoint;AppHADecl:TRPoint;AppRADecl:TRPoint;AppAzAlt:TRpoint;SunMeanAnomaly:extended;end; TMoonRec', 'record ECLonLat : TRPoint; AZAlt : TRPoint; RADecl :' + TRPoint; HorizontalParallax : extended; AngularDiameter : extended; KMtoE' +arth : extended; Phase : extended; end; TMoonEclipseAdd', 'record UmbralStartTime : TDatetime; UmbralEnd' +Time : TDatetime; TotalStartTime : TDatetime; TotalEndTime : TDateTime; end; TEclipseRec', 'record Msg : string; Status : Int; FirstConta' +ct: TDatetime;LastContact:TDateTime;Magnitude:Extended;MaxeclipseUTime:TDateTime;end; TPlanet', '( MERCURY, VENUS, MARS, JUPITER, SATURN, URANUS, NEPTUNE, PLUTO ); TPlanetRec', 'record AsOf : TDateTime; Name : string; MeanLon : ' +extended; MeanLonMotion : extended; LonOfPerihelion : extended; Eccentrici' +ty : extended; Inclination : extended; LonAscendingNode : extended; SemiMa' +jorAxis : extended; AngularDiameter : extended; Magnitude : extended; end; TPlanetLocRec', 'record PlanetBaseData : TPlanetrec; HelioCentricLonLat : TRpoint; RadiusVector : extended; UncorrectedEarthDistance:extended;GeoEclLonLat:TRpoint;CorrectedEarthDistance:extended;ApparentRaDecl:TRPoint;end; SIRegister_TAstronomy(CL); Function AngleToStr( angle : extended) : string; Function AngleToStr2( angle : extended; decimal:boolean) : string; Function StrToAngle( s : string; var angle : extended) : boolean; Function HoursToStr24( t : extended) : string; Function RPoint( x, y : extended) : TRPoint; Function getStimename( t : TDTType) : string; end; procedure SIRegister_UCardComponentV2(CL: TPSPascalCompiler); begin TCardValue', 'Int; TCardSuit', '( Spades, Diamonds, Clubs, Hearts ); TShortSuit', '( cardS, cardD, cardC, cardH ); Type(TDecks,Standard1,Standard2,Fishes1,Fishes2,Beach,Leaves1,Leaves2,Robot,Roses,Shell,Castle,Hand); SIRegister_TCard(CL); SIRegister_TDeck(CL); end; procedure SIRegister_UTGraphSearch(CL: TPSPascalCompiler); begin tMethodCall', 'Procedure;tVerboseCall', 'Procedure ( s : string); // PTEdge', '^TEdge // will not work; TEdge', 'record FromNodeIndex : Int; ToNodeIndex : Int; ' +Weight : Int; work : Int; Len : Int; Highlight : boolean; end; SIRegister_TNode(CL); SIRegister_TGraphList(CL); end; procedure SIRegister_UParser10(CL: TPSPascalCompiler); begin ParserFloat', 'extended; //PParserFloat', '^ParserFloat // will not work; TDFFToken', '( variab, constant, minus, sum, diff, prod, divis, mod' +ulo, IntDiv,IntDIVZ,Intpower,realpower,square,third,fourth,FuncOneVar,FuncTwoVar ); //POperation', '^TOperation // will not work; TDFFOperation', 'record Arg1 : PParserFloat; Arg2 : PParserFloat; D' +est : PParserFloat; NextOperation : POperation; Operation : TMathProcedure' +; Token : TDFFToken; end; TMathProcedure','procedure(AnOperation: TDFFOperation); (TOBJECT'),'EMathParserError; TOBJECT'),'ESyntaxError; 'TOBJECT'),'EExpressionHasBlanks; ('TOBJECT'),'EExpressionTooComplex; (TOBJECT'),'ETooManyNestings; ('TOBJECT'),'EMissMatchingBracket; (TOBJECT'),'EBadName; (CL.FindClass('TOBJECT'),'EParserInternalError; ('TExParserExceptionEvent', 'Procedure ( Sender : TObject; E : Exception); SIRegister_TCustomParser(CL); SIRegister_TExParser(CL); end; function isService: boolean; begin result:= NOT(Application is TApplication); {result:= Application is TServiceApplication;} end; function isApplication: boolean; begin result:= Application is TApplication; end; //SM_REMOTESESSION = $1000 function isTerminalSession: boolean; begin result:= GetSystemMetrics(SM_REMOTESESSION) > 0; end; writeln(inttostr(getmemoryload)) procedure SIRegister_cyIEUtils(CL: TPSPascalCompiler); begin TypeS('TwbPageSetup', record font : String; footer : String; header : ' +String; margin_bottom : String; margin_left : String; margin_right : Strin' +g; margin_top : String; Print_Background : String; Shrink_To_Fit : String; end; Function cyURLEncode( const S : string) : string; Function MakeResourceURL(const ModulName:string;const ResName:PChar;const ResType:PChar):string; Function MakeResourceURL1(const Modul:HMODULE;const ResName:PChar;const ResType:PChar):str; Function cyColorToHtml( aColor : TColor) : String; Function HtmlToColor( aHtmlColor : String) : TColor; //Function GetStreamEncoding( aStream : TStream) : TEncoding; // Function IsStreamEncodedWith( aStream : TStream; Encoding : TEncoding) : Boolean; Function AddHtmlUnicodePrefix( aHtml : String) : String; Function RemoveHtmlUnicodePrefix( aHtml : String) : String; Procedure GetPageSetupFromRegistry( var awbPageSetup : TwbPageSetup); Procedure SetPageSetupToRegistry( awbPageSetup : TwbPageSetup); ConstantN('IEBodyBorderless','String').SetString( 'none; ConstantN('IEBodySingleBorder','String').SetString( '; ConstantN('IEDesignModeOn','String').SetString( 'On; ConstantN('IEDesignModeOff','String').SetString( 'Off; ConstantN('cHtmlUnicodePrefixChar','Char').SetString( #$FEFF); ConstantN('cHtmlUnicodePrefixChar','Char').SetString( #$FE); end; procedure SIRegister_UcomboV2(CL: TPSPascalCompiler); begin ConstantN('UMaxEntries','LongInt').SetInt( 600); TypeS('TCombotype', '( Combinations, Permutations, CombinationsDown, Pe' +'rmutationsDown, CombinationsCoLex, CombinationsCoLexDown, PermutationsRepe' +'at, PermutationsWithRep, PermutationsRepeatDown, CombinationsWithrep, Comb' +'inationsRepeat, CombinationsRepeatDown ); TypeS('TByteArray64', 'array[0..600 + 1] of int64;; SIRegister_TComboSet(CL); end; procedure SIRegister_cyBaseComm(CL: TPSPascalCompiler); begin TcyCommandType', '( ctDevelopperDefined, ctUserDefined ); TStreamContentType', '( scDevelopperDefined, scUserDefined, scString ); TProcOnReceiveCommand', 'Procedure (Sender: TObject; aCommand: Word; userParam : Int); TProcOnReceiveString', 'Procedure ( Sender : TObject; fromBaseCo' +'mmHandle : THandle; aString : String; userParam : Int); TProcOnReceiveMemoryStream', 'Procedure ( Sender : TObject; from' +'BaseCommHandle : THandle; aStream : TMemoryStream; userParam : Int); SIRegister_TcyBaseComm(CL); ConstantN('MsgCommand','LongInt').SetInt( WM_USER + 1); ConstantN('MsgResultOk','LongInt').SetInt( 99); Function ValidateFileMappingName( aName : String) : String; procedure makeCaption(leftSide, Rightside:string; form:TForm); end; procedure SIRegister_cyDERUtils(CL: TPSPascalCompiler); begin TypeS('DERString', 'String; TypeS('DERChar', 'Char; TypeS('TElementsType', ( etText, etExpressionKeyWord, etNumbers, etInt' +eger,etFloat,etPercentage,etwebSite,etWebMail,etMoney,etDate,etTextLine,etParagraph); TypeS('TElementsTypes', 'set of TElementsType; TypeS('DERNString', 'String; const DERDecimalSeparator','String').SetString( '.; const DERDefaultChars','String')('+º@/%-_.:0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ; const DERNDefaultChars','String').SetString( '/%-.0123456789abcdefghjkmnopqrstuvwxyz; Function isValidWebSiteChar( aChar : Char) : Boolean; Function isValidWebMailChar( aChar : Char) : Boolean; Function isValidwebSite( aStr : String) : Boolean; Function isValidWebMail( aStr : String) : Boolean; Function ValidateDate( aDERStr : DERString; var RsltFormat : String) : Boolean; Function DERStrToDate( aDERStr, aFormat : String) : TDate; Function IsDERChar( aChar : Char) : Boolean; Function IsDERDefaultChar( aChar : Char) : Boolean; Function IsDERMoneyChar( aChar : Char) : Boolean; Function IsDERExceptionCar( aChar : Char) : Boolean; Function IsDERSymbols( aDERString : String) : Boolean; Function StringToDERCharSet( aStr : String) : DERString; Function IsDERNDefaultChar( aChar : Char) : Boolean; Function IsDERNChar( aChar : Char) : Boolean; Function DERToDERNCharset( aDERStr : DERString) : DERNString; Function DERExtractwebSite( aDERStr : DERString; SmartRecognition : Boolean) : String; Function DERExtractWebMail( aDERStr : DERString) : String; Function DERExtractPhoneNr( aDERStr : DERString) : String; Function DERExecute(aDERStr:DERString;SmartNumbersRecognition,SmartWebsiteRecognition:Boolean):TElementsType; Function DERExecute1(aDERStr : DERString; var RsltNumbers, RsltInt, RsltFloat, RsltPercentage, RsltwebSite, RsltWebMail,RsltMoney,RsltDate:String;SmartNumbersRecognition,SmartWebsiteRecognition:Bool):TElementsType; Function RetrieveElementValue(aStr:String;SmartNumbersRecognition,SmartWebsiteRecognition:Bool;aElementsType:TElementsType):String;; Procedure RetrieveElementValue1(aStr: String; SmartNumbersRecognition, SmartWebsiteRecognition : Boolean; var RsltDERStr : DERString; var RsltElementType : TElementsType);; end; procedure SIRegister_cyImage(CL: TPSPascalCompiler); begin pRGBQuadArray', '^TRGBQuadArray // will not work; Function BitmapsCompare(Bmp1:TBitmap;Bmp2:TBitmap;FirstCol,LastCol,FirstRow,LastRow:Int):Int); Procedure BitmapSetPercentBrightness(Bmp: TBitmap; IncPercent:Int; RefreshBmp : Boolean); Procedure BitmapSetPixelsBrightness(Bmp:TBitmap; IncPixels : Int; RefreshBmp: Boolean); Procedure BitmapSetPercentContrast(Bmp:TBitmap; IncPercent : Int; RefreshBmp: Boolean); Procedure BitmapSetPixelsContrast(Bmp: TBitmap; IncPixels : Int; RefreshBmp: Boolean); Procedure BitmapNegative( Bmp : TBitmap; RefreshBmp : Boolean); Procedure BitmapModifyRGB(Bmp:TBitmap;IncRed:Int;IncGreen:Int;IncBlue:Int;RefreshBmp:Bool; Procedure BitmapReplaceColor(Bmp:TBitmap;OldColor:TColor;NewColor:TColor;RangeRed,RangeGreen, RangeBlue:Word;SingleDestinationColor:Bool;RefreshBmp:Bool); Procedure BitmapReplaceColor1(Bmp:TBitmap; OldColor:TColor;NewColor:TColor;PercentRange1Red,PercentRange1Green, PercentRange1Blue:Extended;PercentRange2Red,PercentRange2Green,PercentRange2Blue:Double;SingleDestinationColor: Boolean;RefreshBmp:Bool;; Procedure BitmapReplaceColors(Bmp:TBitmap; Array_OldPalette,Array_NewPalette:array of TColor;SingleDestinationColor,RefreshBmp:Bool); Procedure BitmapResize(SourceBmp TBitmap;DestinationBmp:TBitmap;Percent:Extended;RefreshBmp:Bool); Procedure BitmapRotate( Bmp : TBitmap; AngleDegree : Word; AdjustSize : Boolean; BkColor : TColor); Procedure BitmapBlur(SourceBmp:TBitmap;DestinationBmp:TBitmap;Pixels:Word;Percent:Int;RefreshBmp:Bool; Procedure GraphicMirror(Source:TGraphic;Destination:TCanvas;Left,Top:Int;Horizontal,Vertical:Bool; Procedure GraphicMirror1(Source:TGraphic;Destination:TBitmap;Horizontal:Boolean;Vertical:Bool; Function BitmapCreate(BmpWidth:Int;BmpHeight:Int;BgColor:TColor;PixelFormat:TPixelFormat):TBitmap; Procedure BitmapSaveToJpegFile(Bmp : TBitmap; FileName : String; QualityPercent : Word); Procedure JpegSaveToBitmapFile(JPEG : TJPEGImage; FileName : String); end; procedure SIRegister_WaveUtils(CL: TPSPascalCompiler); begin TMS2StrFormat', '( msHMSh, msHMS, msMSh, msMS, msSh, msS, msAh,msA ); TPCMChannel', '( cMono, cStereo ); TPCMSamplesPerSec', '( ss8000Hz, ss11025Hz, ss22050Hz, ss44100Hz, ss48000Hz ); TPCMBitsPerSample', '( bs8Bit, bs16Bit ); TPCMFormat', '( nonePCM, Mono8Bit8000Hz, Stereo8bit8000Hz, Mono1' +'6bit8000Hz, Stereo16bit8000Hz, Mono8bit11025Hz, Stereo8bit11025Hz, Mono16b' +'it11025Hz, Stereo16bit11025Hz, Mono8bit22050Hz, Stereo8bit22050Hz, Mono16b' +'it22050Hz, Stereo16bit22050Hz, Mono8bit44100Hz, Stereo8bit44100Hz, Mono16b' +'it44100Hz, Stereo16bit44100Hz, Mono8bit48000Hz, Stereo8bit48000Hz, Mono16b' +'it48000Hz, Stereo16bit48000Hz ); PWaveFormatEx', 'record wFormatTag : word; nChannels: word; nSamplesPerSec: DWORD; ' +'nAvgBytesPerSec: DWORD; nBlockAlign: Word; wBitsPerSample: Word; ecbSiz: Word; end; tWaveFormatEx', 'PWaveFormatEx; HMMIO', 'Int; TWaveDeviceFormats', 'set of TPCMFormat; TWaveOutDeviceSupport', '( dsVolume, dsStereoVolume, dsPitch, ds' +'PlaybackRate, dsPosition, dsAsynchronize, dsDirectSound ); TypeS('TWaveOutDeviceSupports', 'set of TWaveOutDeviceSupport; TWaveOutOption', '( woSetVolume, woSetPitch, woSetPlaybackRate ); TWaveOutOptions', 'set of TWaveOutOption; TStreamOwnership2', '( soReference, soOwned ); TWaveStreamState', '( wssReady, wssReading, wssWriting, wssWritingEx ); // PRawWave', '^TRawWave // will not work; TRawWave', 'record pData : TObject; dwSize : DWORD; end; ClassN(CL.FindClass('TOBJECT'),'EWaveAudioError; ClassN(CL.FindClass('TOBJECT'),'EWaveAudioSysError; ClassN(CL.FindClass('TOBJECT'),'EWaveAudioInvalidOperation; TWaveAudioEvent', 'Procedure ( Sender : TObject); TWaveAudioGetFormatEvent', 'Procedure ( Sender : TObject; var pW' +'aveFormat : PWaveFormatEx; var FreeIt : Boolean); TWaveAudioGetDataEvent', 'Function ( Sender : TObject; const Buf' +'fer : TObject; BufferSize : DWORD; var NumLoops : DWORD) : DWORD; TWaveAudioGetDataPtrEvent', 'Function ( Sender : TObject; var Bu' +'ffer : TObject; var NumLoops : DWORD; var FreeIt : Boolean) : DWORD; TWaveAudioDataReadyEvent', 'Procedure ( Sender : TObject; const ' +'Buffer : TObject; BufferSize : DWORD; var FreeIt : Boolean); TWaveAudioLevelEvent', 'Procedure ( Sender : TObject; Level : Int); TWaveAudioFilterEvent,Procedure(Sender:TObject;const Buffer:TObject; BufferSize:DWORD); GetWaveAudioInfo(mmIO:HMMIO;var pWaveFormat:PWaveFormatEx;var DataSize,DataOffset:DWORD):Bool; CreateWaveAudio(mmIO:HMMIO;const pWaveFormat:PWaveFormatEx;var ckRIFF,ckData:TMMCKInfo):Bool; CloseWaveAudio( mmIO : HMMIO; var ckRIFF, ckData : TMMCKInfo); GetStreamWaveAudioInfo(Stream:TStream;var pWaveFormat:PWaveFormatEx;var DataSize,DataOffset:DWORD):Bool; CreateStreamWaveAudio(Stream:TStream;const pWaveFormat:PWaveFormatEx; var ckRIFF,ckData:TMMCKInfo):HMMIO; OpenStreamWaveAudio( Stream : TStream) : HMMIO; CalcWaveBufferSize( const pWaveFormat : PWaveFormatEx; Duration : DWORD) : DWORD; GetAudioFormat( FormatTag : Word) : String; GetWaveAudioFormat( const pWaveFormat : PWaveFormatEx) : String; GetWaveAudioLength( const pWaveFormat : PWaveFormatEx; DataSize : DWORD) : DWORD; GetWaveAudioBitRate( const pWaveFormat : PWaveFormatEx) : DWORD; GetWaveAudioPeakLevel(const Data:TObject;DataSize:DWORD;const pWaveFormat:PWaveFormatEx): Int; InvertWaveAudio(const Data:TObject;DataSize:DWORD;const pWaveFormat:PWaveFormatEx):Bool; SilenceWaveAudio(const Data:TObject;DataSize:DWORD;const pWaveFormat:PWaveFormatEx): Boolean; ChangeWaveAudioVolume(const Data:TObject;DataSize:DWORD;const pWaveFormat:PWaveFormatEx;Percent:Int):Bool; MixWaveAudio(const RawWaves:TRawWave;Count:Int;const pWaveFormat:PWaveFormatEx;Buffer:TObject;BufferSize:DWORD):Bool; ConvertWaveFormat( const srcFormat : PWaveFormatEx; srcData : TObject; srcDataSize : DWORD; const dstFormat : PWaveFormatEx; var dstData : TObject; var dstDataSize : DWORD) : Boolean; SetPCMAudioFormat(const pWaveFormat: PWaveFormatEx; Channels : TPCMChannel; SamplesPerSec : TPCMSamplesPerSec; BitsPerSample : TPCMBitsPerSample); Procedure SetPCMAudioFormatS( const pWaveFormat : PWaveFormatEx; PCMFormat : TPCMFormat); GetPCMAudioFormat( const pWaveFormat : PWaveFormatEx) : TPCMFormat; GetWaveDataPositionOffset( const pWaveFormat : PWaveFormatEx; Position : DWORD) : DWORD; MS2Str( Milliseconds : DWORD; Fmt : TMS2StrFormat) : Str