Unit CastleDynLib

Description

Dynamic libraries loading (TDynLib).

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class EDynLibError  
Class TDynLib Load functions from dynamic libraries.

Types

TDynLibHandle = TLibHandle ;
TDynLibSymbolError = (...);

Constants

InvalidDynLibHandle: TDynLibHandle = DynLibs.NilHandle ;

Variables

InternalDisableDynamicLibraries: Boolean = false;

Description

Types

TDynLibHandle = TLibHandle ;

With FPC, use cross-platform DynLibs unit.

TDynLibSymbolError = (...);
 
Values
  • seRaise
  • seReturnNil
  • seWarnAndReturnNil

Constants

InvalidDynLibHandle: TDynLibHandle = DynLibs.NilHandle ;

Invalid TDynLibHandle value (meaning : LoadLibrary failed)

Variables

InternalDisableDynamicLibraries: Boolean = false;

Disable all dynamic libraries loading. All TDynLib.Load calls will return InvalidDynLibHandle. This is useful:

  1. For testing purposes. CGE applications should gracefully work even without various dynamic libraries. E.g. without OpenAL library, no sound is played. Without LibPng we use PNG internal implementation using FpImage.

  2. By the build tool. Commands like "castle-engine compile" and "castle-engine clear" want to delete/override dll files, but it is impossible on Windows, because the build tool would use dll files in the project's directory.

    The build tool doesn't need dynamic libraries for anything, but some code pulled by dependencies could accidentally load them. E.g. OpenAL unit loads it in initialization.


Generated by PasDoc 0.16.0.