Unloads import library.function FreeImportLibrary(H: Cardinal): LongBool;See Also
Loads a dll which contains imported Delphi classes.function LoadImportLibrary(const DllName: String): Cardinal;LoadImportLibrary allows you to import Delphi classes from a dll. You can generate source code of the dll by means of paxScript importer (paximp.exe).
See Also
Registeres a Delphi class.function RegisterClassType(PClass: TClass; Owner: Integer): Integer;Arguments
PClassA Delphi class.OwnerDetermines handle of namespace which contains the class.Returns handle of the namespace.
Example
Delphi: initialization ..................... H := RegisterNamespace('MyNamespace'); H := RegisterClassType(TMyClass, H); C++ Builder: void __fastcall TForm1::FormCreate(TObject *Sender) { int h = RegisterNamespace("MyNamespace", - 1); RegisterClassType(__classid(TMyClass), h); }The class becomes available for all TPaxScripter instances.
Registeres a constant.procedure RegisterConstant(const Name: String; Value: Variant; Owner: Integer = -1);Arguments
NameName of constant.ValueValue of constant.OwnerDetermines handle of namespace which contains constant.
Example
initialization ................ H := RegisterNamespace('MyNamespace'); RegisterConstant('MyConst', 90, H);The constant becomes available for all TPaxScripter instances.
Allows you to register a private, protected or public field of a Delphi class.procedure RegisterField(PClass: TClass; const FieldName, FieldType: String; Offset: Integer);Arguments
PClassA Delphi class.FieldNameName of field.FieldTypeType of field.OffsetOffset of field.
Example
Click here.
Allows you to register an interface type.function RegisterInterfaceType(const Name: String; const Guid: TGuid; const ParentName: String; const ParentGuid: TGUID; OwnerIndex: Integer = -1): Integer;Arguments
NameName of interface typeGuidGUID of the interface type.ParentNameName of parent typeParentGuidGUID of parent type.OwnerIndexIndex of namespace.
Example
H := RegisterNamespace('MyUnit', -1); RegisterInterfaceType('ITest',ITest,'IUnknown',IUnknown,H); RegisterInterfaceMethod(ITest, 'procedure Proc(A: Integer); overload;');
Allows you to register a method of interface type.procedure RegisterInterfaceMethod(const Guid: TGUID; const Header: String;MethodIndex: Integer = -1);Arguments
GuidGuid of the interfaceHeaderHeader of methodMethodIndexIndex of method. QueryInterface has index 1, _AddRef has index 1, _Release has index 3 and go on. If MethodIndex is -1, it will be determined automatically.
Example
H := RegisterNamespace('MyUnit', -1); RegisterInterfaceType('ITest',ITest,'IUnknown',IUnknown,H); RegisterInterfaceMethod(ITest, 'procedure Proc(A: Integer); overload;');
Registeres a method of Delphi class.procedure RegisterMethod(PClass: TClass; const Header: String; Address: Pointer);Arguments
PClassA Delphi class.HeaderHeader of method.AddressAddress of method.
Example
initialization .......................... RegisterMethod(TStringList, 'procedure Clear; override;', @TStringList.Clear);The method becomes available for all TPaxScripter instances.
See Also
Registeres method of a C++ Builder defined class.procedure RegisterBCBMethod(PClass: TClass; const Header: String; Address: Pointer);
Example
void __fastcall TForm1::Foo() { ShowMessage("Foo"); } void __fastcall TForm1::FormCreate(TObject *Sender) { void ( __closure __fastcall *pp)(); pp = Foo; RegisterClassType(__classid(TForm1), -1); RegisterBCBMethod(__classid(TForm1), "procedure Foo;", &pp); }See Also
Registeres namespace.function RegisterNamespace(const Name: String; Owner: Integer = -1): Integer;Arguments
NameName of the namespace.OwnerDetermines handle of namespace which contains given namespace.Returns handle of the namespace.
Example
initialization ................................ H := RegisterNamespace('MyNamespace'); H := RegisterNamespace('MyNestedNamespace', H);The namespace becomes available for all TPaxScripter instances.
Registeres a property of Delphi class.procedure RegisterProperty(PClass: TClass; const PropDef: String);Arguments
PClassA Delphi class.PropDefA property definition.
Example
initialization .......................................... RegisterMethod(TList, 'function Get(Index: Integer): Pointer;', @TList_Get, Fake); RegisterMethod(TList, 'procedure Put(Index: Integer; Item: Pointer);', @TList_Put, Fake); RegisterProperty(TList, 'property Items[Index: Integer]: Pointer read Get write Put; default;');The property becomes available for all TPaxScripter instances.
Allows you to register a record type defined in your Delphi application.function RegisterRecordType(const TypeName: String; Size: Integer; OwnerIndex: Integer = -1): Integer;Arguments
TypeNameName of the typeSizeSize of the typeOwnerIndexIndex of namespace which contains the record type.
Example
Click here
Allows you to register a field of the record type.procedure RegisterRecordField(OwnerIndex: Integer; const FieldName, FieldType: String; Offset: Integer): Integer;Arguments
OwnerIndexIndex of the record type.FieldNameName of fieldFieldTypeType of fieldOffsetOffset of field.
Example
Click here.
Registeres a global procedure or function.procedure RegisterRoutine(const Header: String; Address: Pointer; Owner: Integer = -1);Arguments
HeaderHeader of the procedure or function.OwnerDetermines handle of namespace which contains given procedure or function.
Example
Delphi: RegisterRoutine('function GetStrTime: String;', @GetStrTime, -1); C++ Builder: AnsiString GetStrTime() { return DateTimeToStr(Now()); } void __fastcall TForm1::FormCreate(TObject *Sender) { RegisterRoutine("function GetStrTime: String; cdecl;", GetStrTime, -1); }The function becomes available for all TPaxScripter instances.