コード例 #1
0
 public unsafe NativeUnicodeString(ushort length) : base(4 + IntPtr.Size + length * 2)
 {
     *((IntPtr *)ToPtr(4, IntPtr.Size)) = new IntPtr(ToPtr(4 + IntPtr.Size, IntPtr.Size));
     MaximumLength = Length = length;
     Buffer        = new NativePointer(this, (IntPtr)4 + IntPtr.Size, length * 2);
 }
コード例 #2
0
 public NativeUnicodeString(IntPtr src) : base(src, 1)
 {
     UpdateBoundsFromFieldUshort(2);
     Buffer = new NativePointer(GetFieldPtr(4, IntPtr.Size), MaximumLength * 2);
 }