This documentation is archived and is not being maintained.

Removing Near and Far Type Declarations

Visual Studio .NET 2003

Win32 does not distinguish between near and far addresses. Because the types NEAR and FAR are defined in WINDEF.H, they are automatically handled by the include file, which redefines them as empty strings for Win32. Thus, NEAR and FAR are ignored. If you do not include WINDEF.H, a convenient solution is to use the /D command-line option to replace the keywords by empty strings. For example:

/D_near=  /D_far= /D__near=  /D__far=

See Also

Porting 16-Bit Code to 32-Bit Windows