We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 337ec0d commit 4b88696Copy full SHA for 4b88696
1 file changed
NtApiDotNet/UnicodeString.cs
@@ -182,6 +182,13 @@ public UnicodeStringAllocated() : this(MaxStringLength)
182
{
183
}
184
185
+ public UnicodeStringAllocated(string str)
186
+ {
187
+ String.Length = (ushort)(str.Length * 2);
188
+ String.MaximumLength = (ushort)(String.Length + 2);
189
+ String.Buffer = Marshal.StringToHGlobalUni(str);
190
+ }
191
+
192
public const int MaxStringLength = ushort.MaxValue - 1;
193
194
public override string ToString()
0 commit comments