3 ms·
I actually like that some Windows APIs you pass a buffer to will tell you if the buffer was too small and the necessary size to accommodate the result, requirin
by ygra 10y ago
I actually like that some Windows APIs you pass a buffer to will tell you if the buffer was too small and the necessary size to accommodate the result, requiring a bit less guessing.
- dom0 10y agoIt's still a race though - you have to loop (possibly indefinitely).
- wfunction 10y agoIt's funny because I know this but I'm pretty sure I forget it when coding...
- ygra 10y agoOk, didn't think of another thread changing the directory. Still, there's an upper bound around 32 kilo code units, so not indefinitely. Unless UNC paths are not bounded, don't know about that right now.
- dom0 10y agoTrue, thought the wrong way about it.