Age of Conan FPS Boost Launcher - Source Code

Licensed under GPL

[sourcecode lang="csharp"] using System; using System.IO; using System.Diagnostics; using System.ComponentModel; namespace AoCFPSBoostLauncher { class Program { // Mediaplayer DLL Interop Call [System.Runtime.InteropServices.DllImport("winmm.DLL")] private static extern int timeBeginPeriod(int uPeriod); [System.Runtime.InteropServices.DllImport("winmm.DLL")] private static extern int timeEndPeriod(int uPeriod); // End Interop static void Main(string[] args) { // Sets und Header string Executable = "ConanPatcher.exe"; string AoCPath = ""; Console.WriteLine("Age of Conan FPS Boost launcher by Marco 'sOLARiZ' Goetze (www.solariz.de) v1.0\n--"); // Prüfen ob Kommandozeilenparameter angegeben wurden try { // Nutze foreach um vergessene " zu kompensieren foreach (string arg in args) { if (AoCPath != "") AoCPath = AoCPath + " "; AoCPath = AoCPath + arg; } } catch { // Error behandlung später da noch die lönge geprüft wird. } // Prüfen ob Path Lenght realistisch ist if (AoCPath.Length > 4) { // Trailing Slash ergänzen wenn notwendig if (AoCPath.Substring(AoCPath.Length - 1, 1) != "\\") AoCPath = AoCPath + "\\"; // Weitere Prüfungen, siehe console.write Console.Write("Using Path:\t" + AoCPath + "\n"); Console.Write("-\tChecking for " + Executable + ":\t"); if (File.Exists(AoCPath + Executable)) { Console.Write("OK\n"); Console.WriteLine("-\tCalling winmm.dll timeBeginPeriod(1);"); timeBeginPeriod(1); Console.WriteLine("-\tLaunching Age of Conan..."); try { Process newProcess = new Process(); newProcess = new Process(); newProcess.StartInfo.UseShellExecute = false; newProcess.StartInfo.FileName = AoCPath + Executable; newProcess.StartInfo.WorkingDirectory = AoCPath; newProcess.Start(); } catch (Win32Exception ex) { Console.WriteLine(ex.Message); } Console.Write("Press RETURN to exit\n"); Console.ReadLine(); Console.WriteLine("-\tCalling winmm.dll timeEndPeriod(1);"); timeEndPeriod(1); } else { Console.Write("NOT FOUND!\n"); } } else { // Keine Parameter übergeben also hilfetext anzeigen Console.Write("ERROR: You did not specify a AOC Directory !\n"); Console.Write("Usage: AOCFPSBootLauncher.exe \n"); Console.Write("\n\nPress RETURN to exit\n"); Console.ReadLine(); } } } }[/sourcecode]

bitcoin Icon This page does not contain ads! If you find it usefull, feel free to send me some Support via Bitcoin.
1944UDg5P3zWpsejg1wGyHXAicxYK27HF2
✉ Marco Götze//