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