Article View: comp.windows.ms.programmer
Article #717Re: Memory models
From: Ian McDonald
Date: Tue, 27 Nov 1990 20:16
Date: Tue, 27 Nov 1990 20:16
24 lines
1448 bytes
1448 bytes
> 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? > Sorry about this folks. I have just found out the answer (and how inexperienced I am with PC C). The answer seems to be to use _lread and lstrlen etc. It is a bit of a "dirty" approach and one that I don't like but then this isn't UNIX!! ---------------------------------------------------------------------------- Ian McDonald | 52 Cook Street| Hamilton | This space free for advertising !! New Zealand | +64-71-563438 | I can receive mail but can't reply to it.
Technical Details
Message-ID:
<2367.27538066@waikato.ac.nz>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!comp.vuw.ac.nz!waikato!iamReferences:
<2365.27537b67@waikato.ac.nz>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: Re: Memory models Message-ID: <2367.27538066@waikato.ac.nz> Date: 27 Nov 90 20:16:22 GMT References: <2365.27537b67@waikato.ac.nz> Organization: University of Waikato, New Zealand Lines: 24