Thursday, February 17, 2011

UNICODE_STRING to Null terminated

I need to convert a UNICODE_STRING structure to a simple NULL TERMINATED STRING.

typedef 
struct _UNICODE_STRING 
{
    USHORT  Length;  
    USHORT  MaximumLength;  
    PWSTR   Buffer;
} 
UNICODE_STRING, *PUNICODE_STRING;

I can't find a clean sollution on MSDN about it. Anyone been there? I am not using .net so I need a native API sollution.

Thanks a lot!

From stackoverflow

0 comments:

Post a Comment