UNICODE_STRING (Structures)
Last changed: -219.111.155.239

.
Summary
The UNICODE_STRING structure is used to define Unicode strings.

C# Definition:

[StructLayout(LayoutKind.Sequential)]
public struct UNICODE_STRING
{
   public ushort Length;
   public ushort MaximumLength;
   [MarshalAs(UnmanagedType.LPWStr)]
   public string Buffer;

   public UNICODE_STRING(string s)
   {
     Length = (ushort)(s.Length * 2);
     MaximumLength = (ushort)(Length + 2);
     Buffer = s;
   }

   public override string ToString()
   {
     return Buffer;
   }
}

User-Defined Field Types:

None.

Notes:

None.

Documentation