コード例 #1
0
 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());
     }
 }
コード例 #2
0
 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());
     }
 }
コード例 #3
0
 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);
     }
 }
コード例 #4
0
 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);
     }
 }
コード例 #5
0
 internal TargetProcessPointer(TargetProcessPointer64 p)
 {
     this.pointer = p;
 }
コード例 #6
0
ファイル: structs.cs プロジェクト: kingjiang/SharpDevelopLite
		internal TargetProcessPointer(TargetProcessPointer64 p)
		{
			this.pointer = p;
		}
コード例 #7
0
		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;
			}
		}
コード例 #8
0
		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();
			}
		}