I've done About.com guide to embedding dll's in Delphi EXE's which seems to work, so long as I don't actually use the DLL as an external function. Is there anyway to get the code I linked to to work earlier than an unit referenced in the uses clause.
I've tried:
- Doing exactly what this code says.
- Placing this code in the initialization section of the form that uses the unit that uses the external functions.
- Placing this code in the initialization section of the unit that uses the external functions.
And by external functions I'm referring to a function that looks like:
function MyFunction: Integer; stdcall; external 'fundll.dll';
The problem I'm getting is the usual 'fundll.dll' cannot be loaded (because it's not in the directory) . Zarko's code works (pretty sweet, it creates the dll in that folder) when the code gets that far. But it just crashes before the project even gets rolling when I'm using the external functions I need.