Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!comp.vuw.ac.nz!waikato!iam From: iam@waikato.ac.nz (Ian McDonald) Newsgroups: comp.windows.ms.programmer Subject: Memory models Message-ID: <2365.27537b67@waikato.ac.nz> Date: 27 Nov 90 19:55:03 GMT Organization: University of Waikato, New Zealand Lines: 22 I am having fun at the moment with memory models. At the moment I am using code like : read(hFile,lpMsgBuffer,size); and compiling in large model. I would prefer to have it compiled under small or medium model as that gives moveable data segments. If I do though it can't seem to reference lpMsgBuffer which is a far pointer to a buffer - because it is global heap. If I use small model (ie near data pointers) then lpMsgBuffer is converted to near incorrectly. BTW I am using Microsoft C 6. Is there an easy solution? I will post a summary of any replies received as I am sure other people will have this problem!! (Maybe it should be included in FAQ??) -- ------------------------------------------------------------------------- Ian McDonald | 52 Cook Street| Hamilton | This space free for advertising !! New Zealand | +64-71-563438 | I am not ignoring you - I can't return mail!!