Higher abstraction level for calling C functions

Kagamin spam at here.lot
Mon Jan 30 07:51:39 PST 2012


On Monday, 30 January 2012 at 10:53:17 UTC, Denis Shelomovskij 
wrote:
> 30.01.2012 8:59, Kagamin пишет:
>>> static assert(__traits(compiles, HANDLE.init is null));
>> hmm... What declaration of HANDLE do you use?
>
> Wrapper knows nothing about non-standard types, but in 
> `CreateFileW` the last argument is `__(in?) HANDLE 
> hTemplateFile`, so it is an optional parameter (can be `null`) 
> and wrapper ensures that it isn't a mistake and `HANDLE` is 
> nullable.

Will it compile for
alias int HANDLE;
?


More information about the Digitalmars-d mailing list