From: sl AT psycode DOT com DOT REMOVE_THIS Newsgroups: alt.msdos.programmer,comp.os.msdos.djgpp,comp.os.msdos.programmer Subject: Re: DOS-based DLL system Date: 14 Oct 1998 11:30:57 GMT Organization: http://www.supernews.com, The World's Usenet: Discussions Start Here Lines: 56 Message-ID: References: <3622729c DOT 417426724 AT newshost DOT cc DOT utexas DOT edu> <36235C46 DOT 8C452D20 AT arx DOT com> <362393DA DOT AE33780A AT inetlab DOT com> NNTP-Posting-Host: 205.205.70.104 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit X-Trace: 908364657 ZCZSLWF4G4668CDCDC usenet52.supernews.com X-Complaints-To: newsabuse AT supernews DOT com X-Newsreader: ProNews/2 Version 1.50 Beta 1 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Tue, 13 Oct 1998 17:54:34, Ilya Ryzhenkov wrote: > IMHO the world is much brighter than you described. The Ultimate DOS > Dynamic > Load Library Which Will Deal With Any DOS Programs - yes, it's a beast > hard > to implement. But if we are speaking of a particular compiler and > library > to dynamicaly load code - I see not so much problems. At first you > should > see, that one can safely call DATA in DOS environment - so you can > simply > alloc some memory, load DLL image into it, then get symbol address > (somehow - > depends on the DLL layout and your goals) and call the pointer. That is > how > it was done in Windows DLL system - you ask to load dll, then ask for > pointer > to function and then just call it via pointer. Import lib funcs are just > wrappers to this scheme. > Another way is to create a wrap to the whole program - as it was done in > my DLM engine. Special stub starts before all your code and creates the > dynamic environment. What it actually load are object files. It resolves > symbols and call the main. It also export LoadDLM and other API > functions > for modules to be able to access DLM engine features. > > As you see no TSR or DOS hacking required. > > > The whole thing is utterly inefficient since dynamic linking was > > designed for sharing one copy of library among different address spaces. > > In DOS there is a single-tasking environment so DLL system will eat up a > > lot of memory, saving nothing. What do you need it for, what is the > > design goal? > > There are much more reasons to use dynamic linking/loading than you > mentioned. > They include : > - loading drivers - are you going to link in your exe ALL possible > drivers and > thus make you program unextendable ? Or you prefer to make several > DRV/DLL/DLM's > which share interface and contain code specific for the device ? > - plugins - common object interface will help you to create installable > plugins > - overlays. In low memory environment you can load/unload parts of you > program as > needed. > - there are some more. anyone can easely continue the list. I agree with you.. We *do* need DLL support in DOS ;) But are you planning to make this an official (supported) project? I would love to see DLL support built into future versions of DJGPP.. Gili