Skip to content

Dlluminator v0.2.0

Latest

Choose a tag to compare

@jarroddavis68 jarroddavis68 released this 24 Apr 20:17
· 12 commits to main since this release

Dlluminator -- Win64 Memory DLL Loader

Load Win64 DLLs directly from memory. Generate Delphi import units from C headers. No filesystem dependency, no separate DLL files to distribute.

Highlights

  • Memory DLL loading -- load Win64 DLLs from byte arrays, embedded resources, or memory streams. Standard GetProcAddress and FreeLibrary work as normal after loading.
  • Cross-DLL dependency resolution -- load multiple interdependent DLLs from memory (e.g. sdl3_image.dll importing from sdl3.dll) with automatic topological ordering. Register DLLs in any order, call LoadAll, dependencies resolve themselves.
  • CImporter -- converts C header files into complete Delphi import units. Preprocesses with tinycc, parses structs/enums/unions/typedefs/functions/constants, and generates .pas units with typed function pointers, .rc resource scripts, and compiled .RES files embedding the DLL binary.
  • Windows 11 24H2+ compatible -- works around internal loader changes in build 26200+ using LdrGetDllHandle and LdrLoadDll hooks, LdrpHashTable re-linking, and NtQueryVirtualMemory/NtManageHotPatch hooks.
  • Generated imports included -- ready-to-use Delphi bindings for raylib, SDL3, SDL3_image, and SDL3_mixer with embedded DLL resources. Add the unit to your project and call C functions directly.

Release contents:

Path Description
src/Dlluminator.pas Core memory DLL loader
src/Dlluminator.CImporter.pas C header to Delphi import converter
src/Dlluminator.Config.pas TOML-based CImporter configuration
src/Dlluminator.TOML.pas TOML parser
src/Dlluminator.Utils.pas Shared utilities
src/Dlluminator.Resources.pas Resource helpers
src/Dlluminator.Defines.inc Compiler defines
tinycc/ Bundled tinycc compiler (tcc.exe, libtcc.dll, headers)
libs/ C library packages (raylib, SDL3, SDL3_image, SDL3_mixer)
imports/ Generated Delphi import units + compiled .RES files
examples/ImportLibs/ Example: generate imports from C headers
examples/TestImports/ Example: use generated imports with Dlluminator
bin/ Pre-built example executables
README.md Documentation
LICENSE Apache 2.0 license

Quick start (memory loading):

uses Dlluminator;

var H: THandle;
begin
  H := Dlluminator.LoadLibrary(MyDllPtr, MyDllSize);
  MyFunc := GetProcAddress(H, 'MyFunction');
  // ...
  FreeLibrary(H);
end;

Quick start (CImporter):

uses Dlluminator.CImporter;

var LImporter: TDlmCImporter;
begin
  LImporter := TDlmCImporter.Create();
  LImporter.SetModuleName('raylib');
  LImporter.SetDllName('raylib');
  LImporter.SetDllPath('..\libs\raylib\bin\raylib.dll');
  LImporter.SetOutputPath('..\imports');
  LImporter.AddIncludePath('..\libs\raylib\include');
  LImporter.SetHeader('..\libs\raylib\include\raylib.h');
  LImporter.Process();
  LImporter.Free();
end;

Requirements: Windows 10/11 x64. Building from source requires Delphi 12.3. The tinycc binaries are included in the release archive and are required for CImporter functionality.

File Integrity

Files are signed with minisign using this public key:
RWQqjFkbJ5MpCO03yJuQV8NBQGP5iGhb4nxIbw31Oa0ctj3nWi75Zoll