October 10, 2019
Missing _getmaxstdio / _setmaxstdio?
I'd like to try and increase the limit of open files without resorting to Windows API, is it possible or will I have to resort to the WinAPI to achieve this?

Thanks

Damian
October 11, 2019
On Thursday, October 10, 2019 5:03:29 PM MDT Damian via Digitalmars-d-learn wrote:
> Missing _getmaxstdio / _setmaxstdio?
> I'd like to try and increase the limit of open files without
> resorting to Windows API, is it possible or will I have to resort
> to the WinAPI to achieve this?

Phobos doesn't have anything like that (and if it did, it would just be a cross-platform wrapper which used the Windows API on Windows whatever the equivalent would be on other platforms - assuming that there even is an equivalent on other platforms). So, unless there's a library on code.dlang.org which has such a wrapper, you'll need to use the Windows API directly. But it's not like that would be hard. All you'd need to do would be to declare the appropriate function declaration (which would probably be extern(Windows) in this case) and make sure that you're linked against the appropriate library. Given that the header is stdio.h, that would presumably be Microsoft's C runtime library, which probably means that you'd need to tell dmd to use Microsoft's C runtime and not dmc's C runtime.

- Jonathan M Davis