[DllImport("ntdll.dll")]
public static extern void RtlInitUnicodeString(
ref UNICODE_STRING DestinationString,
[MarshalAs(UnmanagedType.LPWStr)] string SourceString);
[DllImport("ntdll.dll")]
public static extern void RtlInitUnicodeString(
out UNICODE_STRING DestinationString,
[MarshalAs(UnmanagedType.LPWStr)] string SourceString);
[DllImport("ntdll.dll", SetLastError : true)]
def RtlInitUnicodeString(ref DestinationString as UNICODE_STRING, [MarshalAs(UnmanagedType.LPWStr)] SourceString as string):
pass
public struct UNICODE_STRING
{
public ushort Length;
public ushort MaximumLength;
[MarshalAs(UnmanagedType.LPWStr)]
public string Buffer;
}
[StructLayout(LayoutKind.Sequential, Pack : 0)]
struct UNICODE_STRING:
Length as UInt16
MaximumLength as UInt16
Buffer as IntPtr