home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / mswindo / programm / win32 / 694 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  1.3 KB

  1. Path: sparky!uunet!nntp1.radiomail.net!cronos!bombay!sanzgiri
  2. From: sanzgiri@bombay.metaphor.com (Ajit Sanzgiri)
  3. Newsgroups: comp.os.ms-windows.programmer.win32
  4. Subject: Re: Where do a DLL's global variables go?
  5. Message-ID: <2464@cronos.metaphor.com>
  6. Date: 25 Aug 92 20:08:20 GMT
  7. References: <KEVIN.92Aug18182306@buffalobill.edscom.demon.co.uk> <KEVIN.92Aug19123613@buffalobill.edscom.demon.co.uk> <KEVIN.92Aug24173237@buffalobill.edscom.demon.co.uk>
  8. Sender: news@cronos.metaphor.com
  9. Organization: Metaphor Computer Systems, Mountain View, CA
  10. Lines: 20
  11.  
  12.  
  13. In article <KEVIN.92Aug24173237@buffalobill.edscom.demon.co.uk> kevin@edscom.demon.co.uk (Kevin Broadey) writes:
  14.  
  15. >SECTIONS
  16. >.data    READ WRITE SHARED
  17. >.bss    READ WRITE SHARED
  18. >
  19. >Do it for .data to share initialised variables, .bss for uninitialised,
  20. >but watch out, because Microsoft haven't quite sorted out DLLs that have
  21. >both shared and unshared sections.
  22.  
  23.     In this connection, the compiler no longer recognises the /ND option
  24.     which would allow one to individually name (and manage) data segments.
  25.  
  26.     Of course one could use the above to make up a work-around. Break up
  27.     the DLL (which is to have both shared and instance data) into two
  28.     DLLs - one for the shared data and the other for the instance data
  29.     and have the latter be the only client of the former one. 
  30.  
  31.     Ajit Sanzgiri
  32.