Esempio n. 1
0
        private static int LoadARMaxFile(string filename)
        {
            int result = ARMaxNativeMethods.InitMaxSave();

            Console.WriteLine("#DLL version: ", ARMaxNativeMethods.DLLVersion());

            if (result != 0)
            {
                throw new Exception("Could not load initialize ARMax DLL!");
            }
            result = ARMaxNativeMethods.LoadSave(filename);
            if (result != 0)
            {
                throw new Exception("Could not load file:" + filename);
            }
            return(result);
        }
Esempio n. 2
0
        public PS2FileHelper(string filename)
        {
            this.Filename = filename;

            int result = ARMaxNativeMethods.InitMaxSave();

            if (result == 0)
            {
                result = ARMaxNativeMethods.LoadSave(filename);

                Console.WriteLine("#ARMax version: {0}, Number of files:{1}; RootDir: {2}",
                                  ARMaxNativeMethods.DLLVersion(),
                                  ARMaxNativeMethods.NumberOfFiles()
                                  , this.RootDir
                                  );
            }
            else
            {
                Console.Error.WriteLine("#Error calling 'ARMaxNativeMethods.InitMaxSave()' result:{0}", result);
            }
        }