How to convert C macro to D? Thanks.

Adam D. Ruppe destructionator at gmail.com
Sat Feb 24 13:57:27 UTC 2018


On Saturday, 24 February 2018 at 13:50:16 UTC, FrankLike wrote:
> #define IOCTL_NDIS_QUERY_GLOBAL_STATS   _NDIS_CONTROL_CODE(0, 
> METHOD_OUT_DIRECT)
>
> use alias or enum,how to do?

neither. those are little functions.

auto IOCTL_NDIS_QUERY_GLOBAL_STATS () {
   return _NDIS_CONTROL_CODE(0, METHOD_OUT_DIRECT);
}


More information about the Digitalmars-d-learn mailing list