On Thu Sep 5 17:54:21 2024 +0000, Alfred Agrell wrote:
Probably better to convert this string to utf16, then call the W function. That'd not only remove that GUID conversion function (I'd rather not review that amount of math - I think even GCC will complain that, unclear precedence warnings on | and +), but also make future maintenance easier. Yes, it'll copy and convert around things a little more. Who cares, this isn't performance sensitive. If you want to remove the allocations, you can put one in NtCurrentTeb()->StaticUnicodeBuffer, A/W conversions is exactly what it's for. (Though there's only one, so you'll need pointer math or allocations for the other one.)
@Alcaro I have already fixed the compiler warnings about arithmetic operations.