home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / mswindo / programm / win32 / 330 < prev    next >
Encoding:
Text File  |  1992-07-29  |  2.6 KB  |  56 lines

  1. Newsgroups: comp.os.ms-windows.programmer.win32
  2. Path: sparky!uunet!news.mentorg.com!mentorg.com!pbrooks
  3. From: pbrooks@mentorg.com (Phil Brooks)
  4. Subject: Re: DLL questions
  5. Sender: news@news.mentorg.com (News User)
  6. Message-ID: <1992Jul29.190208.19794@news.mentorg.com>
  7. Date: Wed, 29 Jul 1992 19:02:08 GMT
  8. References: <1992Jul28.173235.29091@news.mentorg.com> <Bs5wsE.H5@fmsrl7.srl.ford.com>
  9. Nntp-Posting-Host: decoy.mentorg.com
  10. Organization: Mentor Graphics Corporation
  11. Keywords: 
  12. Followup-To: 
  13. Lines: 41
  14.  
  15. In article <Bs5wsE.H5@fmsrl7.srl.ford.com>, vscarafi@eccdb1.pms.ford.com (Vincent F. Scarafino) writes: 
  16. |> My understanding of DLLs doesn't have any hierarchy involved.  If the
  17. |> DLL is specifyed via a full pathname, then that determines the only
  18. |> DLL that will be checked for the external reference.  If only the
  19. |> name of the DLL is used, then DLLs are searched in the order specified
  20. |> in the PATH statement until the first one that meets the criteria is
  21. |> found.  I believe this to be the case, but I haven't extensively tested
  22. |> it.
  23.  
  24. |> >                 main()
  25. |> >                 /    \
  26. |> >              aa.dll   bb.dll
  27. |> >              /    \       \
  28. |> >            cc.dll   \     dd.dll
  29. |> >                       \    /
  30. |> >                        ee.dll
  31.  
  32. The hierarchy I am trying to portray has to do with link time, not anything
  33. to do with where things are found or how.  The above diagram implies that
  34. when aa.dll is built, cc.dll and ee.dll are specified on the linker command
  35. line and used to satisfy external references in aa.dll.  Likewise, when main() is
  36. linked, aa.dll and bb.dll are specified on the linker command line and used
  37. to satisfy external references in main().  I don't have an NT system in front
  38. of me, so I can't experiment yet to find this out.  I am just working from
  39. documentation and an understanding of SVR4 Unix dynamic linking and shared
  40. libraries.  Given that setup, the manuals say that the libraries are loaded
  41. at invoke time and LibMain() is called for each one.  My question is what order
  42. are the LibMain() functions called in.  In particular if aa.dll LibMain() 
  43. calls something in cc.dll and the function in cc.dll requires that its LibMain()
  44. function be called before any of its internal functions are called, then 
  45. aa.dll's LibMain should be called after cc.dll's LibMain().  Is this in fact
  46. the case with Windows/NT?
  47.  
  48. The first question just has to do with scoping rules with regard to dlls.
  49. Is the scoping for dlls different than it is for objects that are linked
  50. monolithically for functions?  for data? for dll's loaded using LibMain()?
  51. for dll's specified at link time?
  52.   
  53. -- 
  54. Phil Brooks
  55. phil_brooks@mentorg.com
  56.