public void loadfile() { Natives = new Dictionary <ulong, Tuple <Stack.DataType, Stack.DataType[]> >(); Stream natfile; string file = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "x64nativeinfo.dat"); if (File.Exists(file)) { natfile = File.OpenRead(file); } else { natfile = new MemoryStream(Properties.Resources.x64nativeinfo); } IO.Reader reader = new IO.Reader(natfile, false); while (natfile.Position < natfile.Length) { ulong native = reader.ReadUInt64(); Stack.DataType returntype = Types.getatindex(reader.ReadByte()); byte count = reader.ReadByte(); Stack.DataType[] param = new Stack.DataType[count]; for (byte i = 0; i < count; i++) { param[i] = Types.getatindex(reader.ReadByte()); } Natives.Add(native, new Tuple <Stack.DataType, Stack.DataType[]>(returntype, param)); } }
public void loadfile() { Natives = new Dictionary <uint, Tuple <Stack.DataType, Stack.DataType[]> >(); string file = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "nativeinfo.dat"); if (!File.Exists(file)) { return; } Stream natfile = File.OpenRead(file); IO.Reader reader = new IO.Reader(natfile, true); while (natfile.Position < natfile.Length) { uint native = reader.ReadUInt32(); Stack.DataType returntype = Types.getatindex(reader.ReadByte()); byte count = reader.ReadByte(); Stack.DataType[] param = new Stack.DataType[count]; for (byte i = 0; i < count; i++) { param[i] = Types.getatindex(reader.ReadByte()); } Natives.Add(native, new Tuple <Stack.DataType, Stack.DataType[]>(returntype, param)); } }