In C / C ++, you can create a DLL where some export functions are transferred to another DLL (without using the loader):
#pragma comment(linker, "/export:TestFunc=Real_Lib.dll.TestFunc")
Or alternatively, using the .def file:
EXPORTS TestFunc=c:/Real_Lib.dll.TestFunc
(note the absence of parameters or return type ).
For example - in DependencyWalker for kernel32.dll - you can see this: 
Question:. Can you achieve a similar result for a DLL in Delphi? (using the CLI compiler is fine.)
In principle, the idea creates a DLL wrapper that overloads only some functions and redirects the rest - without the need to create a stub loader for all exported functions (with parameters, return types, etc.).
Note: I know that you can actually omit the method parameters for the exported function, which refers to import = a big improvement .
But still, you need to specify the correct type of method (procedure / function), return type (for the function), and calling convention.
Sample (TestProgram â Forwarder â Real_DLL):
The real dll file is just your regular dll:
library Real_Lib; function TestFunc(a, b: Integer): Integer; stdcall; begin Result := a+b; end; exports TestFunc; begin end.
DLL forwarder - exports the exported "forward" function to static import:
library Forwarder; function TestFunc: Integer; stdcall; external 'Real_Lib.dll'; exports TestFunc; begin end.
= note that parameters can be safely omitted .
BUT - you still need to specify the type of function to return.
Test program - uses forwarders DLL:
program TestProgram; {$APPTYPE CONSOLE} function TestFunc(a, b: Integer): Integer; stdcall; external 'Forwarder.dll'; begin Writeln('Result: ', TestFunc(2, 7)); Readln; end.
= This compiles and works: Result: 9 .
Although DependencyWalker shows it as a regular export, which simply calls the import function: 
And generates these opcodes:
00403E82 . E8 7DFFFFFF CALL <JMP.&Forwarder.TestFunc> 00403E04 $- FF25 20614000 JMP DWORD PTR DS:[<&Forwarder.TestFunc>] ; Forwarde.TestFunc 00383810 F>- FF25 08613800 JMP DWORD PTR DS:[<&Real_Lib.TestFunc>] ; Real_Lib.TestFunc
Thus - is it true that forwarding any C / C ++ only to the magic of the compiler or is it possible in Delphi too?