About time I posted something on these boards.

Anyway, if I were to have code to load in a library, have a little play with it, and free the library, such as in the following code:
[pascal]
procedure SomeProc;
type
TMyProc = Function(A,B,C: Integer): Integer;
PMyProc = ^TMyProc;
var
Handle: Cardinal;
Proc: PMyProc;
begin
Handle:=LoadLibrary(PAnsiChar('SomeLib.dll'));
Proc:=GetProcAddress(Handle,PAnsiChar('SomeProc')) ;
//Do stuff with Proc.
FreeLibrary(Handle);
end;
[/pascal]
Is there any way I could tell Delphi to compile the DLL "SomeLib.dll" somewhere into my program, so that I just have one executable file to play with rather than having to put up with loadsa DLLs? I suppose I could save it into a resource file and use the $R directive to have Delphi compile it into the program's resources, but then I'd be unable to load it without extracting it and saving it to a seperate file first, which seems somewhat pointlessly complicated. :roll:

I've had a search through the Delphi help file, but could only find stuff about design-time and run-time packages. Google and The Microsoft Programmer's Guide to Windows 95 didn't do that much better either...

Cheers.

Edit: If it helps, I'm using Delphi 7 Personal Edition.