Esempio n. 1
0
 public void savefile()
 {
     try
     {
         string    loc     = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
         Stream    natfile = File.Create(Path.Combine(loc, "x64nativeinfonew.dat"));
         IO.Writer writer  = new IO.Writer(natfile);
         foreach (KeyValuePair <ulong, Tuple <Stack.DataType, Stack.DataType[]> > native in Natives)
         {
             writer.Write(native.Key);
             writer.Write(Types.indexof(native.Value.Item1));
             writer.Write((byte)native.Value.Item2.Length);
             for (int i = 0; i < native.Value.Item2.Length; i++)
             {
                 writer.Write(Types.indexof(native.Value.Item2[i]));
             }
         }
         writer.Close();
         if (File.Exists(Path.Combine(loc, "x64nativeinfo.dat")))
         {
             File.Delete("x64nativeinfo.dat");
         }
         File.Move(Path.Combine(loc, "x64nativeinfonew.dat"), Path.Combine(loc, "x64nativeinfo.dat"));
     }
     catch (Exception Exception)
     {
         MessageBox.Show(Exception.Message);
     }
 }
Esempio n. 2
0
        public void savefile()
        {
            Stream natfile =
                File.Create(Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location),
                                         "nativeinfo.dat"));

            IO.Writer writer = new IO.Writer(natfile);
            foreach (KeyValuePair <uint, Tuple <Stack.DataType, Stack.DataType[]> > native in Natives)
            {
                writer.Write(native.Key);
                writer.Write(Types.indexof(native.Value.Item1));
                writer.Write((byte)native.Value.Item2.Length);
                for (int i = 0; i < native.Value.Item2.Length; i++)
                {
                    writer.Write(Types.indexof(native.Value.Item2[i]));
                }
            }
            writer.Close();
        }