Windows dnsapi

Imperatorn johan_forsberg_86 at hotmail.com
Wed Nov 1 15:39:20 UTC 2023


On Wednesday, 1 November 2023 at 14:34:22 UTC, Imperatorn wrote:
> Hello,
>
> I'm wondering if anyone here used the Windows dnsapi.
>
> Currently I'm just using the mingw dnsapi.lib and manually 
> typing my exports, but it would be nice if a module came with D.
>
> I was thinking about adding one, but I don't know if there are 
> already tools available to generate them from header files (if 
> they can be found).
>
> The other modules live in druntime (import) core.sys.windows.
>
> dnsapi is almost entierly undocumented for some reason (pinvoke 
> also only has 4 of them), so I currently I have just dumped the 
> exports via dumpbin.
>
> I tested some (two) of the 289 functions and they work as 
> expected which is nice.
>
> Who has done things like this in the past and know if there are 
> tools available for D to aid in this process?
>
> Thanks

I decompiled the entire dnsapi and it was 114_075 lines. I took 
only the function declarations and translated them to D. It kinda 
works, but I don't know where to put it.
I guess if something is "undocumented it can't be used", or 
what's the view on such things?


More information about the Digitalmars-d mailing list