Paul,
No you can't do this. It is a limitation imposed by the OS.
When you call LoadLibrary, the OS maps the disk file that contains the dll into the process memory space. It doesn't necessarily load it into memory. When you try to access anything in the library ( the first time), it will generate a page fault and the OS will actually allocate RAM and really load the library (or parts thereof) into RAM.
Effectively you have a memory to file mapping, and for that to work, the file must exist.
It kinda sucks, but that is the way that Windows works.
Trevor
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Paul A Norman
Sent: Tuesday, 14 March 2006 4:30 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] LoadLibrary from resource?
Hi all,
Is it possible to store a DLL in a RES and access it for loadLibrary() purposes, as a stream or something without having to save it to disk and access as per normal?
Paul
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi
_______________________________________________ Delphi mailing list [email protected] http://ns3.123.co.nz/mailman/listinfo/delphi
