🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #1902

Re: Generic in Large Model

#1902
From: Barry Press
Date: Wed, 18 Oct 1989 04:01
21 lines
1665 bytes
In article <246@spot.wbst128.xerox.com> Tomer.wbst@Xerox.COM (Shmuel Tomer) writes:
>If you don't use the LARGE memory model, and if you use GlobalAlloc to get
>additional memory, is there any way you could call C library functions (eg,
>strcmp, sprintf), using data from that additional memory? Do you have to
>re-implement any such function? I seem to remember that one of the sample
>programs in the SDK does implement strcmp with mixed NEAR / FAR arguments.
>This is easy, though probably inefficient, but re-implementing sprintf may
>not be exactly where one wants to spend one's time.

You can do string and some other things using some undocumented functions
in the Windows kernel.  See Petzold's excellent book on Programming Windows
for more info.  You can feed mixed arguments to sprintf using the modifiers
that specify near and far addressing -- see the printf documentation.  The
thing you can't do directly is feed sprintf a buffer which has the wrong
address size (but you can do the work to a temporary area and then copy if
you must).

Barry Press

*Of course these are my opinions; when someone else wants my opinion, they
*give it to me.
Technical Details
Message-ID: <82@venice.SEDD.TRW.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!ginosko!usc!trwind!venice!press
References: <7887@microsoft.UUCP> <246@spot.wbst128.xerox.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!ginosko!usc!trwind!venice!press
From: press@venice.SEDD.TRW.COM (Barry Press)
Newsgroups: comp.windows.ms
Subject: Re: Generic in Large Model
Message-ID: <82@venice.SEDD.TRW.COM>
Date: 18 Oct 89 04:01:02 GMT
References: <7887@microsoft.UUCP> <246@spot.wbst128.xerox.com>
Reply-To: press@venice.sedd.trw.com (Barry Press)
Organization: TRW Systems Engineering & Development Division, Redondo Beach, CA
Lines: 21