コード例 #1
0
        public byte[] GetBytes()
        {
            byte[] buffer = new byte[Size];
            uint   actualLength;

            _comCode.GetCode(0, (uint)buffer.Length, (uint)buffer.Length, buffer, out actualLength);
            return(buffer);
        }
コード例 #2
0
        // ICorDebugCode

        public static unsafe byte[] GetCode(this ICorDebugCode corCode)
        {
            byte[] code = new byte[corCode.GetSize()];

            fixed(byte *pCode = code)
            corCode.GetCode(0, (uint)code.Length, (uint)code.Length, new IntPtr(pCode));

            return(code);
        }
コード例 #3
0
        public byte[] GetCode()
        {
            var codeSize = (uint)Size;

            var  code = new byte[codeSize];
            uint returnedCode;

            m_code.GetCode(0, codeSize, codeSize, code, out returnedCode);
            Debug.Assert(returnedCode == codeSize);
            return(code);
        }