3 ms·
What appears to be missing is the automatic mapping of the A (ansi) and W (wide) suffixed function names to conventional unsuffixed function names. In C, this i
by brokenparser 14y ago
What appears to be missing is the automatic mapping of the A (ansi) and W (wide) suffixed function names to conventional unsuffixed function names. In C, this is done using macros. If UNICODE is not defined, the macro MessageBoxEx would expand to MessageBoxExA. With UNICODE, the macro expands to MessageBoxExW. Similarly, TEXT is used to wrap strings to ensure they're unprefixed or prefixed with an L respectively. You could do this by hand, it's just a bit more tedious to write.
- vinayan3 14y agoOne would wish these distinctions could be forgotten with calling the Win32api from JS. However, that is a pipe dream and could have an impact on performance.
- brokenparser 14y agoYou can forget the distinctions without impacting performance if your JavaScript engine uses UTF-16, because that's the native encoding of Windows NT 5.0+. You'll still get overhead when working with binary data, Typed Array or not.