コード例 #1
0
        public SecureLocalAllocHandle Duplicate()
        {
            SecureLocalAllocHandle duplicateHandle = Allocate(_cb);

            UnsafeBufferUtil.BlockCopy(from: this, to: duplicateHandle, length: _cb);
            return(duplicateHandle);
        }
コード例 #2
0
        /// <summary>
        /// Allocates some amount of memory using LocalAlloc.
        /// </summary>
        public static SecureLocalAllocHandle Allocate(IntPtr cb)
        {
            SecureLocalAllocHandle newHandle = new SecureLocalAllocHandle(cb);

            newHandle.AllocateImpl(cb);
            return(newHandle);
        }