1998Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Dynamic Loading of Modules -->
<!--X-From-R13: @vxynf Syzdivfg <q97ryzNqgrx.punyzref.fr> -->
<!--X-Date: Sat, 21 Mar 1998 10:05:06 +0000 -->
<!--X-Message-Id: Pine.SOL.3.96.980321105918.4562A&#45;100000#licia,dtek.chalmers.se -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199803210054.SAA14685@dfw&#45;ix14.ix.netcom.com -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Dynamic Loading of Modules</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:d97elm#dtek,chalmers.se">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00805.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00807.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00800.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00532.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00806">Author</A>
&nbsp;|&nbsp;<A HREF="#00806">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00806">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Dynamic Loading of Modules</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI>
<LI><em>Subject</em>: Dynamic Loading of Modules</LI>
<LI><em>From</em>: Niklas Elmqvist &lt;<A HREF="mailto:d97elm#dtek,chalmers.se">d97elm#dtek,chalmers.se</A>&gt;</LI>
<LI><em>Date</em>: Sat, 21 Mar 1998 11:16:51 +0100 (MET)</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Fri, 20 Mar 1998, Jon A. Lambert wrote:
&gt;
&gt; On 24 Feb 98 at 0:12, Niklas Elmqvist wrote:
&gt; &gt; 
&gt; &gt; Now, if aClass and bClass had been part of the same binary, I would not
&gt; &gt; have been surprised. In fact, as you probably all know, this is called
&gt; &gt; late binding in the O-O community and is an important feature of all
&gt; &gt; serious O-O languages. However, what surprised and delighted me is that
&gt; &gt; late binding *still* works even though the core and shared lib described
&gt; &gt; above are separately compiled, and the bClass is totally unknown to the
&gt; &gt; core! In my eyes, this is the ultimate test of late binding, and G++
&gt; &gt; pulled it off nicely! Incidentally, a friend (the one mentioned above)
&gt; &gt; later reported that this is impossible in Windows-style DLLs.
&gt; 
&gt; Run-time binding, application-level loading and unloading of DLLs 
&gt; have been around in Windows ever since it went to 32-bit.  There is 
&gt; also a standardized API (OLE2) to handle multi-threaded and 
&gt; interprocess communications between disparate (loose/non-coupled) 
&gt; modules.  Reference counts are maintained on DLL modules and by 
&gt; default once an application requests the services of a DLL it will 
&gt; remain loaded either until the application terminates or issues an 
&gt; API call to unload it.  If references are held by other processes or 
&gt; threads the DLL will not be unloaded until all interested parties 
&gt; indicate they have no further use for it.

Yes, I do know that Windows has dynamically linked libraries, just like
Sun and Linux and whatnot (I think they had that *before* it went
32-bit, however). However, I suppose you did not read the earlier
part (this may be blamed on my too-active-snippage), where I explained
about my "discovery" where a server binary with a base class called aClass
could dynamically load a module which implemented a subclass of aClass
called bClass and *still* use the bClass (as a reference to an aClass
object, of course, using polymorphism) even though the server had no idea
of its existence at compile-time. (Phew.) According to my RL friend (I
have no personal experience in this), this scheme is impossible to
implement using Windows DLLs -- I believe he tried after hearing me
explain about it.

Then again, Windows has its own bunch of abominations, COM/DCOM/COM+ being
foremost among these. Although they provide for some nice functionality,
COM objects are expected to delete themselves and call their own
destructor -- need I say more? And this is what some people want instead
of CORBA? *sigh* 

-- Niklas Elmqvist (d97elm#dtek,chalmers.se) ----------------------
"You can't trample infidels when you're a tortoise. I mean, all you 
 could do is give them a meaningful look."	 
	- Terry Pratchett, Small Gods


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00800" HREF="msg00800.html">Re: [MUD-Dev]  Dynamic Loading of Modules (was: Back on the list</A></STRONG>
<UL><LI><EM>From:</EM> "Jon A. Lambert" &lt;jlsysinc#ix,netcom.com&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00805.html">Re: [MUD-Dev]  Parlez vous NPC?</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00807.html">Re: [MUD-Dev]  Parlez vous NPC?</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00800.html">Re: [MUD-Dev]  Dynamic Loading of Modules (was: Back on the list</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00532.html">LDMs (large dynamic maps) was Re: [MUD-Dev] Unique items</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00806"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00806"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>Dynamic Loading of Modules</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00787" HREF="msg00787.html">Dynamic Loading of Modules</A></strong>, 
Niklas Elmqvist <a href="mailto:d97elm#dtek,chalmers.se">d97elm#dtek,chalmers.se</a>, Fri 20 Mar 1998, 11:39 GMT
<UL>
<LI><strong><A NAME="00797" HREF="msg00797.html">Re: [MUD-Dev] Dynamic Loading of Modules</A></strong>, 
Greg Munt <a href="mailto:greg#uni-corn,demon.co.uk">greg#uni-corn,demon.co.uk</a>, Fri 20 Mar 1998, 21:53 GMT
</LI>
<LI><strong><A NAME="00850" HREF="msg00850.html">Re: [MUD-Dev] Dynamic Loading of Modules</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Mon 23 Mar 1998, 19:14 GMT
</LI>
</UL>
</LI>
</ul>
<LI><strong><A NAME="00800" HREF="msg00800.html">Re: [MUD-Dev]  Dynamic Loading of Modules (was: Back on the list</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sat 21 Mar 1998, 00:54 GMT
<UL>
<LI><strong><A NAME="00806" HREF="msg00806.html">Dynamic Loading of Modules</A></strong>, 
Niklas Elmqvist <a href="mailto:d97elm#dtek,chalmers.se">d97elm#dtek,chalmers.se</a>, Sat 21 Mar 1998, 10:05 GMT
</LI>
</UL>
</LI>
</ul>
</ul>
</ul>
</LI>
<LI><strong><A NAME="00532" HREF="msg00532.html">LDMs (large dynamic maps) was Re: [MUD-Dev] Unique items</A></strong>, 
Mike Sellers <a href="mailto:mike#online-alchemy,com">mike#online-alchemy,com</a>, Fri 20 Feb 1998, 08:16 GMT
<UL>
<LI><strong><A NAME="00538" HREF="msg00538.html">Re: [MUD-Dev] Unique items</A></strong>, 
The Eternal City <a href="mailto:eternal#eternal,eternal-city.com">eternal#eternal,eternal-city.com</a>, Fri 20 Feb 1998, 14:27 GMT
<UL>
<LI><strong><A NAME="00566" HREF="msg00566.html">Re: [MUD-Dev] Unique items</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Mon 23 Feb 1998, 19:22 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00563" HREF="msg00563.html">Re: [MUD-Dev] Unique items</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Mon 23 Feb 1998, 19:12 GMT
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>