🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

casting near & far pointers

#2805
From: Rhoda Neimand
Date: Wed, 22 May 1991 22:16
24 lines
1575 bytes
A unix person has just asked me a curious question.  I'm kind of puzzled
because I've never thought of doing this before.  To me, a far pointer
is a far pointer and a near pointer is a near pointer, period.

His questions:

Can you cast a far pointer to a near pointer?  My answer is that if you did,
you would lose its "farness", therefore it would no longer point to anything
unless you were sure that its segment address was currently in DS.  Is this
correct?

Can you cast a near pointer to a far pointer?  Not sure here.  If you did,
would the segment address be 0?  Does having a segment address of 0 mean
something special?  MAKEINTRESOURCE does something like this.  I am actually
confused about the purpose of MAKEINTRESOURCE.

I feel that either casting is not meaningful.  Is this correct?

Thanks
----------------------------------------------------------------------
Rhoda Neimand			                  [I speak for myself]
{sun,lll-tis,pyramid,pacbell}!sybase!rhoda -or- rhoda@sybase.com
"I didn't want to, Jim"		  Mr. Spock in _This Side Of Paradise_
----------------------------------------------------------------------
Technical Details
Message-ID: <12902@sybase.sybase.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!agate!ucbvax!mtxinu!sybase!rhoda@mercury.sybase.com

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!agate!ucbvax!mtxinu!sybase!rhoda@mercury.sybase.com
From: rhoda@mercury.sybase.com (Rhoda Neimand)
Newsgroups: comp.windows.ms.programmer
Subject: casting near & far pointers
Message-ID: <12902@sybase.sybase.com>
Date: 22 May 91 22:16:27 GMT
Article-I.D.: sybase.12902
Sender: news@Sybase.COM
Organization: Sybase, Inc.
Lines: 24