Closed vbfox closed 8 years ago
Looks awesome. :)
Before merging i'll change the helpers to use heap allocation instead of stackalloc as I realized after the fact that allocating unpredictable amount of memory on the stack might not be the brightest idea regarding stack overflows :)
allocating unpredictable amount of memory on the stack might not be the brightest idea
Yes, good point. I think we've allowed ourselves to use stackalloc
with unknown sizes only when the size is capped to a reasonably small value by some other means (documented max, for example).
Latest commit is a fun edge case I realized re-reading the helper code: We must use the unicode version of GetWindowTextLength
even if it doesn't take any string or char parameter as the value returned depend on char-size
Add the missing functions evoked in this comment : https://github.com/AArnott/pinvoke/issues/265#issuecomment-238430381