home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / mswindo / programm / misc / 1584 < prev    next >
Encoding:
Text File  |  1992-08-30  |  1.4 KB  |  36 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!mcsun!news.funet.fi!funic!nntp.hut.fi!kaira.hut.fi!v37262d
  3. From: v37262d@kaira.hut.fi (Mancko H|glund)
  4. Subject: Re: Environ or getenv() from a DLL
  5. Message-ID: <1992Aug31.053449.10183@nntp.hut.fi>
  6. Keywords: Windows, DLL, AAAAArgh!
  7. Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
  8. Nntp-Posting-Host: kaira.hut.fi
  9. Reply-To: ebbe@shsibm.shh.fi
  10. Organization: Helsinki University of Technology, Finland
  11. References: <1992Aug27.222425.9328@serval.net.wsu.edu>
  12. Date: Mon, 31 Aug 1992 05:34:49 GMT
  13. Lines: 21
  14.  
  15. In article <1992Aug27.222425.9328@serval.net.wsu.edu> 
  16. mwoodwar@yoda.eecs.wsu.edu (woodward matthew d - CS350) writes:
  17.  
  18. >I'm sure that this is in a FAQ somewhere, but is it at all possible
  19. >to get environ or call getenv() from a windows DLL?  If so, how would
  20. >one go about it?
  21.  
  22. Use GetDOSEnvironment(). It returns a pointer to a string array corresponding
  23. to all of your current environment variables. The array is a memory block of
  24. standard 'C' strings; the end of the block is signalled by an extra 0x00 char
  25. after the end of the last string.
  26.  
  27. I've got the code that looks up a specified variable; holler if you'd like
  28. a copy.
  29.  
  30.     ...ebbe@shsibm.shh.fi    
  31.  
  32. +----------------------------------------------------------------------------+
  33. v37262d@kaira.hut.fi:    Mancko H|glund     (mancko@shsibm.shh.fi) or  
  34.             Ebbe Jonsson    (ebbe@shsibm.shh.fi)
  35. +----------------------------------------------------------------------------+
  36.