Win32 API Tango / using what ?

Lars Ivar Igesund larsivar at igesund.net
Tue Nov 13 14:20:59 PST 2007


Sean Kelly wrote:

> BLS wrote:
>> Confused ... Tango is not in sync. with  the latest efforts of the
>> WINAPI community. no kernel, mm, bla bla, gdi+, and so on
> 
> We originally tried to use the headers provided in the bindings project
> on dsource, but ran into too many problems.  They contained a ton of
> errors (at the time--they may have since improved), and in some cases
> contained duplicate declarations (winsock vs. winsock2) that were too
> troublesome to sort out.  As a result, we ended up using a set of
> headers someone else supplied to us instead.  They've done the trick so
> far, but I won't go so far as to claim that they're perfect or complete.
> 
> I have my hands full just dealing with the Posix headers.  If you or
> someone else wishes to volunteer to sort out the Win32 headers for
> Tango, that would be great.
> 
> 
> Sean

Also note that there are/used to be codegen issues and compile speed issues.
Since all the Win32 headers are linked together like spaghetti, you risk
having to compile all every time (and they are big, so it gets slow).
The above also means that the binary size increase a lot, as every module
compiled into a D program, adds about 500 bytes.
The direct port meant using static const variables a lot, and these was put
into the executable, increasing binary size by a large quantity of bytes.
Using enums instead would fix this, but seemed like an onerous task at the
time.

As Sean said, and which may apply to these points too, things may have
changed and there may not be any issues left. We'd like to be careful with
just importing such a large body of code again, though.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango



More information about the Digitalmars-d mailing list