🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.windows.ms.programmer
1 messages
1 total messages Started by Mark Hjelm Tue, 28 Jul 1992 19:51
Huge Pointer question
#96
Author: Mark Hjelm
Date: Tue, 28 Jul 1992 19:51
20 lines
1284 bytes
    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
    
    
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads