Hello,
I have a UNICODE_STRING
that I would like to compare to a null-terminated ANSI string to check if they are the same. I'm using C. I would like to avoid including winternl.h
for RtlInitUnicodeString
.
What is the preferred method doing this?
Or, alternatively, is there any problem with me using MultiByteToWideChar()
to convert the ANSI string to a wide-character representation and then comparing that to the UNICODE_STRING.buffer
(with the understanding that the buffer might not be null-terminated)?