Exemple #1
0
        internal TargetProcessPointer32 To32()
        {
            TargetProcessPointer32 p = new TargetProcessPointer32();

            p.Pointer = (uint)pointer.Pointer;
            return(p);
        }
 internal unsafe void *TranslatePointer32(TargetProcessPointer32 ptr)
 {
     if (ptr.Pointer == 0)
     {
         return(null);
     }
     // Use Int32 instead of int because of preprocessor!
     unchecked {
         Int32 spaceDiff = (Int32)(new IntPtr(fullView.Pointer)) - (Int32)memHeader32->NativeAddress.Pointer;
         return(new IntPtr((Int32)ptr.Pointer + spaceDiff).ToPointer());
     }
 }
 internal unsafe TargetProcessPointer32 TranslatePointerBack32(void *ptr)
 {
     // Use Int32 instead of int because of preprocessor!
     if (ptr == null)
     {
         return(new TargetProcessPointer32());
     }
     unchecked {
         Int32 spaceDiff = (Int32)(new IntPtr(fullView.Pointer)) - (Int32)memHeader32->NativeAddress.Pointer;
         TargetProcessPointer32 pointer = new TargetProcessPointer32();
         pointer.Pointer = (UInt32)((Int32)ptr - spaceDiff);
         return(pointer);
     }
 }
Exemple #4
0
 internal TargetProcessPointer(TargetProcessPointer32 p)
 {
     this.pointer.Pointer = p.Pointer;
 }
Exemple #5
0
		internal unsafe TargetProcessPointer32 TranslatePointerBack32(void* ptr)
		{
			// Use Int32 instead of int because of preprocessor!
			if (ptr == null)
				return new TargetProcessPointer32();
			unchecked {
				Int32 spaceDiff = (Int32)(new IntPtr(fullView.Pointer)) - (Int32)memHeader32->NativeAddress.Pointer;
				TargetProcessPointer32 pointer = new TargetProcessPointer32();
				pointer.Pointer = (UInt32)((Int32)ptr - spaceDiff);
				return pointer;
			}
		}
Exemple #6
0
		internal unsafe void* TranslatePointer32(TargetProcessPointer32 ptr)
		{
			if (ptr.Pointer == 0)
				return null;
			// Use Int32 instead of int because of preprocessor!
			unchecked {
				Int32 spaceDiff = (Int32)(new IntPtr(fullView.Pointer)) - (Int32)memHeader32->NativeAddress.Pointer;
				return new IntPtr((Int32)ptr.Pointer + spaceDiff).ToPointer();
			}
		}
		internal TargetProcessPointer32 To32()
		{
			TargetProcessPointer32 p = new TargetProcessPointer32();
			p.Pointer = (uint)pointer.Pointer;
			return p;
		}
		internal TargetProcessPointer(TargetProcessPointer32 p)
		{
			this.pointer.Pointer = p.Pointer;
		}