home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / windows / ms / programm / 7396 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  1.2 KB

  1. Path: sparky!uunet!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!hjelm
  2. From: hjelm+@cs.cmu.edu (Mark Hjelm)
  3. Newsgroups: comp.windows.ms.programmer
  4. Subject: Huge Pointer question
  5. Message-ID: <1992Jul28.195140.137052@cs.cmu.edu>
  6. Date: 28 Jul 92 19:51:40 GMT
  7. Article-I.D.: cs.1992Jul28.195140.137052
  8. Organization: School of Computer Science, Carnegie Mellon
  9. Lines: 20
  10. Nntp-Posting-Host: g.gp.cs.cmu.edu
  11.  
  12.  
  13.     If I were to allocate two large (>64k) chunks of memory, say
  14. using GlobalAlloc, what would be the proper way to copy the data
  15. from one to the other?  When I use GlobalLock on such things, is
  16. the offset portion of the returned pointer guaranteed to be 0?  If
  17. so, can I just step though the chunks in 64k pieces, converting a
  18. huge pointer to the base of each piece to a far pointer and then
  19. using the standard _fmemcpy and friends?  If so, does this technique
  20. work under both Microsoft C and Borland C (i.e. do they implement
  21. huge pointers the same way)?  If not, what do I do?  What about if
  22. I want to copy some portion of the chunks of memory at different
  23. offsets within the chunks?  Do I need to be really careful about
  24. 64K boundaries? Just for completeness, what about plain DOS and 
  25. halloc?
  26.     
  27. Thanks,
  28. Mark
  29. hjelm@cs.cmu.edu
  30.     
  31.     
  32.