Article View: comp.windows.ms.programmer
Article #1129Re: GlobalDosAlloc
From: Ed Schwalenberg
Date: Thu, 24 Jan 1991 15:23
Date: Thu, 24 Jan 1991 15:23
13 lines
1317 bytes
1317 bytes
In article <ELHADAD.91Jan23121418@mermaid.cs.columbia.edu> 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.
Technical Details
Message-ID:
<1991Jan24.152328.6875@odi.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!samsung!olivea!uunet!odi!edReferences:
<ELHADAD.91Jan23121418@mermaid.cs.columbia.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <ELHADAD.91Jan23121418@mermaid.cs.columbia.edu> 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