Yet another effort at translating the Win32 API headers

Don Clugston dac at nospam.com.au
Wed Apr 5 07:03:58 PDT 2006


Stewart Gordon wrote:
> Stewart Gordon wrote:
> <snip>
>> There are numerous other versioning #ifdefs in the C headers.  How 
>> many of them do we really need?  I'm in the process of rounding up a 
>> list of them....
> 
> Here's the list of versions that we _might_ want to keep in:
> 
> DIRECT3D_VERSION
> ODBCVER
> 
> COBJMACROS
> DESC_CHAR_UNICODE
> INITGUID
> MCI_USE_OFFEXT
> NEC_98
> ODBC_STD
> OLE2ANSI
> PROXY_CLSID
> PROXY_CLSID_IS
> PROXY_DELEGATION
> REGISTER_PROXY_DLL
> RPC_UNICODE_SUPPORTED
> SERVERONLY
> SH3
> SNMPSTRICT
> UNDER_CE
> UNICODE_ONLY
> USE_STUBLESS_PROXY
> WIN32_LEAN_AND_MEAN
> XFree86Server
> _FIX_ENABLEMODELESS_CONFLICT
> __COMPILING_LARGEINT
> __USE_NTOSKRNL__
> __USE_W32_SOCKETS
> __W32API_USE_DLLIMPORT__
> 
> 
> The first two of these identify versions in much the same way as 
> _WIN32_WINDOWS and _WIN32_WINNT do, and so probably want to be treated 
> in a similar way.

I'd like to see almost all of those things disappear. DIRECT3D is 
important, and probably ODBCVER, but most of the others should vanish. 
Many of them only exist to reduce compilation time.

There seem to be a few that are for compatibility with the DDK headers, 
but the ones I've seen are mostly to avoid duplicate definitions, so 
shouldn't be a problem with D.

> And I'm not sure if the largeint stuff is necessary at all.  I suppose 
> there's no point in translating largeint.h, as it's all stuff that D has 
> built in.  But do we need to keep the LARGE_INTEGER and ULARGE_INTEGER 
> structures (defined in winnt.h) for compatibility?

It would be good to get rid of them, I don't think it will cause any 
problems (it's almost as if the WinAPI uses standard D types, and C code 
needs LARGE_INTEGER as a workaround for the absence of int64 in C. We 
don't need that stuff).

One other thing I've done is remove any macros that are stated as being 
only for Win16 compatibility *and* that have no effect.

We should probably remove the aliases for near pointers. There's not 
many of them, and most of them were a bad idea even in the Win 3.0 days.



More information about the Digitalmars-d-announce mailing list