14 : base(ownsHandle: true)
23 unmanagedBuffer._byteLength = byteLength;
24 return unmanagedBuffer;
29 if (bytesLength == 0
L)
34 byte* pointer2 =
null;
300 bool success =
false;
405 return (num + 15) / 16 * 16;
static bool CryptUnprotectMemory(SafeBuffer pData, uint cbData, uint dwFlags)
static bool CryptProtectMemory(SafeBuffer pData, uint cbData, uint dwFlags)
static unsafe void MemoryCopy(void *source, void *destination, long destinationSizeInBytes, long sourceBytesToCopy)
static byte Max(byte val1, byte val2)
static IntPtr AllocBSTR(int length)
static int GetLastPInvokeError()
static void FreeHGlobal(IntPtr hglobal)
static void FreeCoTaskMem(IntPtr ptr)
static unsafe int GetAnsiStringByteCount(ReadOnlySpan< char > chars)
static IntPtr AllocCoTaskMem(int cb)
static unsafe void GetAnsiStringBytes(ReadOnlySpan< char > chars, Span< byte > bytes)
static IntPtr AllocHGlobal(int cb)
static void FreeBSTR(IntPtr ptr)
void Initialize(ulong numBytes)
void DangerousAddRef(ref bool success)
void SetHandle(IntPtr handle)
static string ArgumentOutOfRange_Capacity
static string ArgumentOutOfRange_IndexString
static string ArgumentOutOfRange_Length
static string InvalidOperation_ReadOnly
static string ArgumentOutOfRange_NeedNonNegNum
unsafe override bool ReleaseHandle()
static unsafe void Copy(UnmanagedBuffer source, UnmanagedBuffer destination, ulong bytesLength)
static UnmanagedBuffer Allocate(int byteLength)
readonly object _methodLock
void InsertAt(int index, char c)
void SetAt(int index, char c)
unsafe IntPtr MarshalToBSTR()
static int GetAlignedByteSize(int length)
unsafe SecureString(char *value, int length)
unsafe IntPtr MarshalToString(bool globalAlloc, bool unicode)
unsafe Span< char > AcquireSpan(ref SafeBuffer bufferToRelease)
void Initialize(ReadOnlySpan< char > value)
void EnsureCapacity(int capacity)
SecureString(SecureString str)
static bool Read(ref bool location)
static void Write(ref bool location, bool value)
static readonly IntPtr Zero
void CopyTo(Span< T > destination)
Span< T > Slice(int start)