public override unsafe int Read(byte[] buffer, int offset, int count) { bool flag = !this.BeginAccess(); int op = 0; fixed(byte *numPtr = &buffer[0]) ProcessStream.ReadProcessMemory(this.m_Process, this.m_Position, (void *)(numPtr + offset), count, ref op); this.m_Position += count; if (flag) { this.EndAccess(); } return(op); }
public override int Read(byte[] buffer, int offset, int count) { unsafe { bool flag = !this.BeginAccess(); int num = 0; fixed(byte *numPointer = &buffer[0]) { ProcessStream.ReadProcessMemory(this.m_Process, this.m_Position, numPointer + offset, count, ref num); } ProcessStream mPosition = this; mPosition.m_Position = mPosition.m_Position + count; if (flag) { this.EndAccess(); } return(num); } }