public byte[] GetBytes() { byte[] buffer = new byte[Size]; uint actualLength; _comCode.GetCode(0, (uint)buffer.Length, (uint)buffer.Length, buffer, out actualLength); return(buffer); }
// 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); }
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); }