External-Functions

LA.Docs
March 1st, 2016

List of External-Functions


CDecl_Bool(LibHandle: int64; ProcName: string; Args: Array): bool

Make call to a external C-Library that returns a boolean value.

CDecl_Double(LibHandle: int64; ProcName: string; Args: Array): double

Make call to a external C-Library that returns a double value.

CDecl_Integer(LibHandle: int64; ProcName: string; Args: Array): int

Make call to a external C-Library that returns an integer value.

CDecl_String(LibHandle: int64; ProcName: string; Args: Array): string

Make call to a external C-Library that returns a pChar value.

CDecl_Void(LibHandle: int64; ProcName: string; Args: Array)

Make call to a external C-Library.

Example Pascal:
var
    module: int64;
begin
    module := LoadLibrary(’libsetx.so’);
    if module <> 0 then
        CDecl_Void(module, ’SetXVector’, [0.1, 0.2]);
    FreeLibrary(module);
end;

FreeLibrary(LibHandle: int64)

Unloads and frees the loaded external library from memory.

LoadLibrary(LibName: string): int64

Loads a external library (.dll, .so, .dylib)

StdCall_Bool(LibHandle: int64; ProcName: string; Args: Array): bool

Make call to a external Standard-Library that returns a boolean value.

StdCall_Double(LibHandle: int64; ProcName: string; Args: Array): double

Make call to a external Standard-Library that returns a double value.

StdCall_Integer(LibHandle: int64; ProcName: string; Args: Array): int

Make call to a external Standard-Library that returns an integer value.

StdCall_String(LibHandle: int64; ProcName: string; Args: Array): string

Make call to a external Standard-Library that returns a pChar value.

StdCall_Void(LibHandle: int64; ProcName: string; Args: Array)

Make call to a external Standard-Library.

Example Pascal on Windows:
var
    module: int64;
begin
    module := LoadLibrary(’user32.dll’);
    if module <> 0 then
        StdCall_Void(module, ’MessageBoxA’, 
            [TForm(Sender.Owner).Handle, ’This is an error!’, ’Error’, 0]);
    FreeLibrary(module);
end;