TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Dan Larson
from: Dean Roddey
date: 1994-11-12 05:02:06
subject: 16-Bit To 32-Bit Callbac

Thanks Dan Larson for your msg about 16-BIT TO 32-BIT CALLBAC, on
Wednesday, 11-09-1994!

DL> Is there a proper typ
DL> 
DL> casting from 16-bit void to 32 bit void or other types? I would
DL> have a lot of work ahead of me if I had to edit all of those headers
DL> to  

If you are in a 32 bit compiler, then to cast a 16bit pointer to a 32
bit pointer would be:

VOID*    _Seg16    p16Pointer;
VOID*    p32Pointer;

p32Pointer = p16Pointer;

It should be that simple. Since the types of both are known from their
declarations, the compiler should correctly do the cast. I guess you
could always be more explicit (which would also make the code more self
documenting)

p32Pointer = (VOID*)p16Pointer;

But, technically speaking, that would be redudant. If this does not
work for you, then I think maybe your compiler (which one??) is not a
happy camper (or I am very confused, which is always another option.)

___
 X KWQ/2 1.2b X I'm an OS/2 developer...I don't NEED a life!

--- Maximus/2 2.02

* Origin: Fernwood - your source for OS/2 files! (1:141/209)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1
@PATH: 141/209 270/101 396/1 3615/50 229/2 12/2442 711/409 54/54 711/808 809
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.