home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / mswindo / programm / misc / 3598 < prev    next >
Encoding:
Internet Message Format  |  1992-11-21  |  1.0 KB

  1. Path: sparky!uunet!microsoft!aliasgate!davidl
  2. From: David Long <davidl@microsoft.com>
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Windows DLLs                                                                   
  5. Sender: davidl@microsoft.com
  6. Message-ID: <40nq63h@microsoft.com>
  7. Date: 21 Nov 92 07:13:55 GMT
  8. Lines:    13
  9. X-MSMail-Message-ID:  74501A56
  10. X-MSMail-Conversation-ID:  74501A56
  11. X-MSMail-WiseRemark:  Microsoft Mail -- 3.0.729
  12. To: netnews
  13.  
  14. Why would you want to do this?  Does your DLL carry out some passive 
  15. activity based on interrupts or some other asynchronous event?
  16.  
  17. One way to achieve this effect is to list your DLL on the LOAD= line in 
  18. WIN.INI so that it gets loaded as Windows boots and stays there until 
  19. Windows shuts down.  Another way is for your DLL to be loaded by some 
  20. application, then to immediately do a LoadLibrary() on itself to 
  21. increase its usage count from 1 to 2.  Then when the app that used it 
  22. terminates, Windows decrements your DLL's usage count from 2 to 1 and 
  23. leaves it in memory.
  24.  
  25. David Long
  26. Microsoft Developer Network
  27.