unsafe internal void *TranslatePointer64(TargetProcessPointer64 ptr) { if (ptr.Pointer == 0) { return(null); } unchecked { Int64 spaceDiff = (Int64)(new IntPtr(fullView.Pointer)) - (Int64)memHeader64->NativeAddress.Pointer; return(new IntPtr((Int64)ptr.Pointer + spaceDiff).ToPointer()); } }
internal unsafe void *TranslatePointer64(TargetProcessPointer64 ptr) { if (ptr.Pointer == 0) { return(null); } // Use Int32 instead of int because of preprocessor! unchecked { Int64 spaceDiff = (Int64)(new IntPtr(fullView.Pointer)) - (Int64)memHeader64->NativeAddress.Pointer; return(new IntPtr((Int64)ptr.Pointer + spaceDiff).ToPointer()); } }
unsafe internal TargetProcessPointer64 TranslatePointerBack64(void *ptr) { if (ptr == null) { return(new TargetProcessPointer64()); } unchecked { Int64 spaceDiff = (Int64)(new IntPtr(fullView.Pointer)) - (Int64)memHeader64->NativeAddress.Pointer; TargetProcessPointer64 pointer = new TargetProcessPointer64(); pointer.Pointer = (UInt64)((Int64)ptr - spaceDiff); return(pointer); } }
internal unsafe TargetProcessPointer64 TranslatePointerBack64(void *ptr) { // Use Int32 instead of int because of preprocessor! if (ptr == null) { return(new TargetProcessPointer64()); } unchecked { Int64 spaceDiff = (Int64)(new IntPtr(fullView.Pointer)) - (Int64)memHeader64->NativeAddress.Pointer; TargetProcessPointer64 pointer = new TargetProcessPointer64(); pointer.Pointer = (UInt64)((Int64)ptr - spaceDiff); return(pointer); } }
internal TargetProcessPointer(TargetProcessPointer64 p) { this.pointer = p; }
internal TargetProcessPointer(TargetProcessPointer64 p) { this.pointer = p; }
unsafe internal TargetProcessPointer64 TranslatePointerBack64(void* ptr) { if (ptr == null) return new TargetProcessPointer64(); unchecked { Int64 spaceDiff = (Int64)(new IntPtr(fullView.Pointer)) - (Int64)memHeader64->NativeAddress.Pointer; TargetProcessPointer64 pointer = new TargetProcessPointer64(); pointer.Pointer = (UInt64)((Int64)ptr - spaceDiff); return pointer; } }
unsafe internal void* TranslatePointer64(TargetProcessPointer64 ptr) { if (ptr.Pointer == 0) return null; unchecked { Int64 spaceDiff = (Int64)(new IntPtr(fullView.Pointer)) - (Int64)memHeader64->NativeAddress.Pointer; return new IntPtr((Int64)ptr.Pointer + spaceDiff).ToPointer(); } }