Yet another effort at translating the Win32 API headers
Stewart Gordon
smjg_1998 at yahoo.com
Fri Mar 31 08:37:03 PST 2006
Don Clugston wrote:
> Stewart Gordon wrote:
<snip>
>> I've just had a look. I hadn't really thought about testing the
>> translation, with there being so much to test and bits of the API to
>> get to grips with in doing so.
>
> What would be great would be a 'force extern' dmd option for linking:
> ensure that every extern function actually exists in the import library.
> Right now you can write:
> extern (Windows) { void SomeOldGarbage(); }
> and it will compile without error. If we had such a feature, we could at
> least check that all functions were defined correctly.
Good idea.
<snip>
>> I see you've begun to implement your "interim solution" on the Windows
>> versions....
>
> I didn't use the Perl script, I used my half-baked C2D converter to do
> the initial conversion. It's a moderately correct preprocessor with an
> regex replacement of the simple D types. #ifdef to static if is
> something it does semi-automatically.
>
> I still don't know what's the right way to do it.
Nor does anybody yet.
> Function definitions are OK, but those structs that have additional
> members...
Do you mean structs that have members that are only defined in later
Windows versions? These will work in the same way - AIUI structs can
contain version blocks just the same.
Stewart.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:-@ C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS-
PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y
------END GEEK CODE BLOCK------
My e-mail is valid but not my primary mailbox. Please keep replies on
the 'group where everyone may benefit.
More information about the Digitalmars-d-announce
mailing list