🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #118

Re: MetaWare 32-bit Windows Application

#118
From: Martin Heller
Date: Tue, 28 Jul 1992 08:19
31 lines
1591 bytes
In article <1992Jul24.212525.26422@ultb.isc.rit.edu> sxl2259@ritvax.isc.rit.edu writes:
>
>Does anyone know about how to port the Windows programs to MetaWare compiler
>for 32-bit environment (of course, still running under Windows 16-bit
>environemnt). I have trouble to use the GlobalAlloc & GlobalLock. Because
>the MetaWare include a NEW windows.h that declare FAR as "". (nothing)
>
>How to change my program without pain? By the way, no matter what the Local
>or Globle memory API used, I always got a compiler waring like that:
>
>"far pointer address truncated to near pointer"
>
>Why? especially in GlobalLock and LocalLock!?
>
>
>Any suggestion will be very appreciated, 
>
>
>SHen-wei
>

The MetaWare ADK converts the results of GlobalLock and LocalLock to
32-bit Far pointers. What you really want to do is switch to malloc
if you're writing C or new if you're writing C++.

Note that near 32-bit pointers (as returned by malloc or new) give you
the full speed you wanted when you went to 32-bit integers to begin with.
Far 32-bit pointers are just as slow as far 16-bit pointers.

-- Martin Heller
Programming Columnist, WINDOWS Magazine
Technical Details
Message-ID: <9207288981@genesis.nred.ma.us>
Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!bu.edu!transfer!ceylon!genesis!mheller
References: <1992Jul24.212525.26422@ultb.isc.rit.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!bu.edu!transfer!ceylon!genesis!mheller
From: mheller@genesis.nred.ma.us (Martin Heller)
Newsgroups: comp.windows.ms.programmer
Subject: Re: MetaWare 32-bit Windows Application
Message-ID: <9207288981@genesis.nred.ma.us>
Date: 28 Jul 92 08:19:57 GMT
References: <1992Jul24.212525.26422@ultb.isc.rit.edu>
Organization: Genesis Public Access Minix  +1 508 664 0149
Lines: 31