Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!samsung!olivea!uunet!odi!ed From: ed@odi.com (Ed Schwalenberg) Newsgroups: comp.windows.ms.programmer Subject: Re: GlobalDosAlloc Message-ID: <1991Jan24.152328.6875@odi.com> Date: 24 Jan 91 15:23:28 GMT References: Distribution: comp Organization: Object Design, Inc. Lines: 13 In-Reply-To: elhadad@cs.columbia.edu's message of 23 Jan 91 17:14:18 GMT In article elhadad@cs.columbia.edu (Michael Elhadad) writes: I'm trying to understand when and why to use GlobalDosAlloc as opposed to GlobalAlloc. Assume I am running in enhanced mode. The only difference I have read in the doc is GloabalDosAlloc will allocate the memory under the 1M line. Why should that make a difference to an application? The only real reason for using GlobalDosAlloc is that your Windows application wants to share memory with a DOS application (like a TSR) which can only access memory under 1MB. Note that GlobalDosAlloc returns TWO addresses: a selector which can be used in protected mode and a paragraph-segment value for the real mode (i.e., DOS) program to use. Normal Windows applications don't ever use GlobalDosAlloc.