Ejemplo n.º 1
0
        /// <summary>
        /// Read existing descriptor
        /// </summary>
        /// <param name="s"></param>
        /// <param name="addr"></param>
        internal VSAllocation(VSVirtualMemoryManager vmem, long addr)
        {
            DescriptorAddress = addr;
            vm = vmem;
            // Check if 2 last addr bytes == signature
            string sg = vm.ReadString(DescriptorAddress + SG_POS, SG_LEN);

            if (sg != GetAddressSignature(addr))
            {
                throw new VSException(DEFS.E0006_INVALID_SIGNATURE_CODE, "- Object, address: " + addr.ToString("X"));
            }
        }