Пример #1
0
        public static Structures.VectorStructure ReadVector(int adress)
        {
            int size = Marshal.SizeOf(typeof(Structures.VectorStructure));

            byte[] bytes = new byte[size];
            ReadProcessMemory(_processHandle, adress, bytes, size, out _);
            GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned);

            Structures.VectorStructure theStructure =
                (Structures.VectorStructure)Marshal.PtrToStructure(handle.AddrOfPinnedObject()
                                                                   , typeof(Structures.VectorStructure));
            handle.Free();
            return(theStructure);
        }
Пример #2
0
 public Vector(Structures.VectorStructure vector)
 {
     X = vector.X;
     Y = vector.Y;
     Z = vector.Z;
 }