home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.win32
- Path: sparky!uunet!news.mentorg.com!mentorg.com!pbrooks
- From: pbrooks@mentorg.com (Phil Brooks)
- Subject: Re: DLL questions
- Sender: news@news.mentorg.com (News User)
- Message-ID: <1992Jul29.190208.19794@news.mentorg.com>
- Date: Wed, 29 Jul 1992 19:02:08 GMT
- References: <1992Jul28.173235.29091@news.mentorg.com> <Bs5wsE.H5@fmsrl7.srl.ford.com>
- Nntp-Posting-Host: decoy.mentorg.com
- Organization: Mentor Graphics Corporation
- Keywords:
- Followup-To:
- Lines: 41
-
- In article <Bs5wsE.H5@fmsrl7.srl.ford.com>, vscarafi@eccdb1.pms.ford.com (Vincent F. Scarafino) writes:
- |> My understanding of DLLs doesn't have any hierarchy involved. If the
- |> DLL is specifyed via a full pathname, then that determines the only
- |> DLL that will be checked for the external reference. If only the
- |> name of the DLL is used, then DLLs are searched in the order specified
- |> in the PATH statement until the first one that meets the criteria is
- |> found. I believe this to be the case, but I haven't extensively tested
- |> it.
-
- |> > main()
- |> > / \
- |> > aa.dll bb.dll
- |> > / \ \
- |> > cc.dll \ dd.dll
- |> > \ /
- |> > ee.dll
-
- The hierarchy I am trying to portray has to do with link time, not anything
- to do with where things are found or how. The above diagram implies that
- when aa.dll is built, cc.dll and ee.dll are specified on the linker command
- line and used to satisfy external references in aa.dll. Likewise, when main() is
- linked, aa.dll and bb.dll are specified on the linker command line and used
- to satisfy external references in main(). I don't have an NT system in front
- of me, so I can't experiment yet to find this out. I am just working from
- documentation and an understanding of SVR4 Unix dynamic linking and shared
- libraries. Given that setup, the manuals say that the libraries are loaded
- at invoke time and LibMain() is called for each one. My question is what order
- are the LibMain() functions called in. In particular if aa.dll LibMain()
- calls something in cc.dll and the function in cc.dll requires that its LibMain()
- function be called before any of its internal functions are called, then
- aa.dll's LibMain should be called after cc.dll's LibMain(). Is this in fact
- the case with Windows/NT?
-
- The first question just has to do with scoping rules with regard to dlls.
- Is the scoping for dlls different than it is for objects that are linked
- monolithically for functions? for data? for dll's loaded using LibMain()?
- for dll's specified at link time?
-
- --
- Phil Brooks
- phil_brooks@mentorg.com
-