home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / mswindo / programm / win32 / 829 next >
Encoding:
Text File  |  1992-09-07  |  1.5 KB  |  43 lines

  1. Newsgroups: comp.os.ms-windows.programmer.win32
  2. Path: sparky!uunet!microsoft!hexnut!johnhall
  3. From: johnhall@microsoft.com (John Hall)
  4. Subject: Re: NT, 3.1, and Global Memory
  5. Message-ID: <1992Sep04.165347.10325@microsoft.com>
  6. Date: 04 Sep 92 16:53:47 GMT
  7. Organization: Microsoft Corporation
  8. Keywords: global memory
  9. Lines: 29
  10.  
  11. In article sanzgiri@bombay.metaphor.com (Ajit Sanzgiri) writes:
  12. | In article johnhall@microsoft.com (John Hall) writes:
  13. | >....
  14. | >I even make heroic efforts to force all addresses to be identical
  15. | >across processes.
  16. |     Does one need to be heroic for this ? I thought MapViewOfFileEx
  17. |     provides this routinely.
  18.  
  19. The trick is picking the right memory address to request, since
  20. MapViewOfFileEx() does not guarantee that the memory will actually
  21. be placed where you asked for it.
  22.  
  23. Therefore I grab it on the initialization of a statically linked
  24. library.  However, that still doesn't solve it since there are
  25. different ways you can start an app (foreground/background,
  26. console/windowed) and you can't just use the first exe attach
  27. point with MapViewOfFile() then use that for subsequent attaches.
  28.  
  29. So, I looked at the memory map for a couple of processes and
  30. picked one that looked good (16Mb level).  This I use as a default.
  31. You can register an exe in the registry, assign it a logical process
  32. group, then set the start point and length (1Mb default) for that
  33. logical group of processes.
  34.  
  35.  
  36.  
  37. -- 
  38. -------------------------
  39. My comments are my own.  They are independent and unrelated to the
  40. views of my company , relatives or elected representatives.
  41.  
  42.