From f1b5fd94b72f2190cfc0ecae8cfaea86bd71c6d2 Mon Sep 17 00:00:00 2001 From: gantt42 Date: Sat, 21 Oct 2017 15:55:49 -0400 Subject: [PATCH 01/13] Ignores release binaries --- .gitignored | 3 +++ CAOS/bin/Release/CAOS.dll | Bin 6656 -> 0 bytes 2 files changed, 3 insertions(+) create mode 100644 .gitignored delete mode 100644 CAOS/bin/Release/CAOS.dll diff --git a/.gitignored b/.gitignored new file mode 100644 index 0000000..f646c32 --- /dev/null +++ b/.gitignored @@ -0,0 +1,3 @@ +bin +obj +packages \ No newline at end of file diff --git a/CAOS/bin/Release/CAOS.dll b/CAOS/bin/Release/CAOS.dll deleted file mode 100644 index 9675d28e39a5a2f6def21b62dd749a082119984a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6656 zcmeHLdu$v>8UJ=~?`h|n^R>>?$tF(SOHv=_M;;{){EXw0#IEm>xUC`CyW2SH-rZhy z_fj8eB3D34fs{UwTGXmVp@_B=sRcyCOQQS{K(tW)Kp=|xKuA;w1QiIWMNodkkG*lO7_r!B3h=Co4DbkwY_T9uM&l+>ZIv|2RtdUDya$R=;-@nNC^l8@}&PiJb@ zUL$!!lhj1i0#3l?KAJ+U;_1Ufv|O}h*KcNcYD9A&z~|zl;~!;J{-3Wsl36I@82A0$ z=p%Z=>&Ilh94Bf9vGP4cYwOH^qoERo8q`9d_czcgU(JJHify(GB* zIn2n37*Ry_oyCkOasqAyHrnQ{Wt97)6hb08H@a#dY|Xd`nN zM>)q}Uc)2?tSPRlE4H!(`Kd`ZFO>KpdBxZ93T=T8l2{W&)hhXrCh14#SZuDq5a)OZ zx5Z{mh$F6Pn2MZZABA*FJmsfbc`Txs9QCiefQA$av|77h_+ns%?~`l5xENSzjR?jn z#bd1Y7;F3;$1;8x94>bchmylK)osF5d&M+$!CH{ zAJ^F4q7HL?zP9cY3Fw_=9a%ZcBH4ddXkzoFZyb=koyGg~bZ;`1>`C=>-2j639#>d= z?dOOJsF!2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YlmBav-Xxk`zT(DXjWinnNhjfGW2%N0}Lt12QUE4unua;FChpkS{?p z9<7ed;${ekMl>456{aODa2f1TON<%UFeBQwRtZV~d}N-&*#c## zt5TaEijo}itFjdFqZx<*{1JtufFFR7Rdn{pg3WFIkUs?Ag31?^LQs%HqY|x79vaTn zUpCi!`(h97w%a7iM6a%kc!d#c;L}Jum1VL2@FeAeDBn>;T)UF;n?WR6*SxK#EEKYR&|O)n=-RAQ{KWA zjAS{VWmo=}%B*`W5h2~fZS~60)qZy%I)+=sP@!;8GfM6)MAyZ2h5Nn3*YV|79^qZ? ze?J5KJtTfMnp-$F?-k-3=Mp~a?Z-3OM|7{d#h8UQHY**WG#vvD(*#)gGs+)fMuJZcv<&d4uQ1XJLMMf|-M?PSat^3hd@t544~cVvPY45NM5CQS zd^3%~2A33GJ5t@o5%jU(*}P9(_})m>AGQ&OK1anTmW5hF9EX5>ZV|pa+_96C2VeYh zfO%*^p97Fj3++KfT&Ak&Mw)+qHO^`sY4e zFLE=Ez9u}Y;Lvg!yq@EHCVL%l};l{sCaf)Pev2 From 010a9b47341cc10563ea45b907486431cc308e2b Mon Sep 17 00:00:00 2001 From: gantt42 Date: Sat, 21 Oct 2017 15:56:37 -0400 Subject: [PATCH 02/13] Adds demo project --- CAOS.sln | 13 +++++- ConsoleApp1/App.config | 6 +++ ConsoleApp1/Demo.csproj | 58 ++++++++++++++++++++++++++ ConsoleApp1/Program.cs | 29 +++++++++++++ ConsoleApp1/Properties/AssemblyInfo.cs | 36 ++++++++++++++++ 5 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 ConsoleApp1/App.config create mode 100644 ConsoleApp1/Demo.csproj create mode 100644 ConsoleApp1/Program.cs create mode 100644 ConsoleApp1/Properties/AssemblyInfo.cs diff --git a/CAOS.sln b/CAOS.sln index d2ab297..ba60c19 100644 --- a/CAOS.sln +++ b/CAOS.sln @@ -1,8 +1,12 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 15 +VisualStudioVersion = 15.0.26730.8 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CAOS", "CAOS\CAOS.csproj", "{A4EF3E36-9042-44AE-AD4D-B644A4F7C719}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo", "ConsoleApp1\Demo.csproj", "{013D15C0-A7FF-4D80-B36B-25E3D58E1FA4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -13,8 +17,15 @@ Global {A4EF3E36-9042-44AE-AD4D-B644A4F7C719}.Debug|Any CPU.Build.0 = Debug|Any CPU {A4EF3E36-9042-44AE-AD4D-B644A4F7C719}.Release|Any CPU.ActiveCfg = Release|Any CPU {A4EF3E36-9042-44AE-AD4D-B644A4F7C719}.Release|Any CPU.Build.0 = Release|Any CPU + {013D15C0-A7FF-4D80-B36B-25E3D58E1FA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {013D15C0-A7FF-4D80-B36B-25E3D58E1FA4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {013D15C0-A7FF-4D80-B36B-25E3D58E1FA4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {013D15C0-A7FF-4D80-B36B-25E3D58E1FA4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6519CBA1-2991-4AE4-895E-92B6AA97DDE4} + EndGlobalSection EndGlobal diff --git a/ConsoleApp1/App.config b/ConsoleApp1/App.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/ConsoleApp1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ConsoleApp1/Demo.csproj b/ConsoleApp1/Demo.csproj new file mode 100644 index 0000000..38b788f --- /dev/null +++ b/ConsoleApp1/Demo.csproj @@ -0,0 +1,58 @@ + + + + + Debug + AnyCPU + {013D15C0-A7FF-4D80-B36B-25E3D58E1FA4} + Exe + ConsoleApp1 + ConsoleApp1 + v4.6.1 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {a4ef3e36-9042-44ae-ad4d-b644a4f7c719} + CAOS + + + + \ No newline at end of file diff --git a/ConsoleApp1/Program.cs b/ConsoleApp1/Program.cs new file mode 100644 index 0000000..2fc1adf --- /dev/null +++ b/ConsoleApp1/Program.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CAOS; +using System.Diagnostics; + +namespace ConsoleApp1 +{ + class Demo + { + static void Main(string[] args) + { + CaosInjector injector = new CaosInjector("Docking Station"); + CaosResult result = injector.ExecuteCaosGetResult("outs \"hi\""); + if (result.Succeded) + { + Console.WriteLine(result.Content); + } + else + { + Debug.Assert(result.ResultCode != 0); + Console.WriteLine($"Error Code: {result.ResultCode}"); + } + Console.ReadKey(); + } + } +} diff --git a/ConsoleApp1/Properties/AssemblyInfo.cs b/ConsoleApp1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d106d2b --- /dev/null +++ b/ConsoleApp1/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ConsoleApp1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("ConsoleApp1")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("013d15c0-a7ff-4d80-b36b-25e3d58e1fa4")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] From 79a1e5925379c6b2d6a08d4219473a2e17147efd Mon Sep 17 00:00:00 2001 From: gantt42 Date: Sat, 21 Oct 2017 16:35:04 -0400 Subject: [PATCH 03/13] Ignores .vs directory It looks like the file is already in the repo. Hmm, I'm probably just misunderstanding something. --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ef4e34c --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +bin +obj +packages +.vs \ No newline at end of file From ad1649b5a6e2fdaf8709d5fffbfe1c8b4cdc2c1d Mon Sep 17 00:00:00 2001 From: gantt42 Date: Sat, 21 Oct 2017 16:39:20 -0400 Subject: [PATCH 04/13] Changes CaosResult.Failed to CaosResult.Succeded !Failed is a double negative which isn't actually a big deal. But it's slightly harder to think about. --- CAOS/CaosInjector.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/CAOS/CaosInjector.cs b/CAOS/CaosInjector.cs index 857e4b9..2655e00 100644 --- a/CAOS/CaosInjector.cs +++ b/CAOS/CaosInjector.cs @@ -89,17 +89,17 @@ public int ProcessID() } public class CaosResult { - private bool failed; - public bool Failed { get { return failed; } } - private int processid; - public int ProcessID { get { return processid; } } - private string content; - public string Content { get { return content; } } - public CaosResult(int Failed, string Content, int ProcessID) + public int ResultCode { get; private set; } + public bool Succeded { get; private set; } + public int ProcessId { get; private set; } + public string Content { get; private set; } + + public CaosResult(int resultCode, string content, int processID) { - this.failed = Convert.ToBoolean(Failed); - this.content = Content; - this.processid = ProcessID; + this.ResultCode = resultCode; + this.Succeded = (resultCode == 0); + this.Content = content; + this.ProcessId = processID; } } } From 219c5e1113c87bad6edf88f9b88141b00b10c785 Mon Sep 17 00:00:00 2001 From: gantt42 Date: Sat, 21 Oct 2017 18:14:04 -0400 Subject: [PATCH 05/13] Nonfunctional - Adds Exceptions --- CAOS/CAOS.csproj | 1 + CAOS/CaosExpections.cs | 28 ++++++++++++++++ CAOS/CaosInjector.cs | 75 ++++++++++++++++++++++++++++++++++-------- ConsoleApp1/Program.cs | 21 ++++++++---- 4 files changed, 105 insertions(+), 20 deletions(-) create mode 100644 CAOS/CaosExpections.cs diff --git a/CAOS/CAOS.csproj b/CAOS/CAOS.csproj index db907b5..92a5af2 100644 --- a/CAOS/CAOS.csproj +++ b/CAOS/CAOS.csproj @@ -39,6 +39,7 @@ + diff --git a/CAOS/CaosExpections.cs b/CAOS/CaosExpections.cs new file mode 100644 index 0000000..20e026a --- /dev/null +++ b/CAOS/CaosExpections.cs @@ -0,0 +1,28 @@ +using System; + +namespace CAOS +{ + public class CaosExpection : Exception + { + public CaosExpection() + { } + + public CaosExpection(string message) : base(message) + { } + + public CaosExpection(string message, Exception innerException) : base(message, innerException) + { } + } + + public class NoGameCaosException : CaosExpection + { + public NoGameCaosException() + { } + + public NoGameCaosException(string message) : base(message) + { } + + public NoGameCaosException(string message, Exception innerException) : base(message, innerException) + { } + } +} diff --git a/CAOS/CaosInjector.cs b/CAOS/CaosInjector.cs index 2655e00..f68d535 100644 --- a/CAOS/CaosInjector.cs +++ b/CAOS/CaosInjector.cs @@ -5,21 +5,28 @@ namespace CAOS { - public class CaosInjector + public static class CaosInjector { - static Mutex Mutex; - static MemoryMappedFile MemFile; - static MemoryMappedViewAccessor MemViewAccessor; - static EventWaitHandle ResultEventHandle; - static EventWaitHandle RequestRventHandle; - private string GameName; - public CaosInjector(string GameName) + private static Mutex Mutex; + private static MemoryMappedFile MemFile; + private static MemoryMappedViewAccessor MemViewAccessor; + private static EventWaitHandle ResultEventHandle; + private static EventWaitHandle RequestRventHandle; + private static string GameName; + + public static void SetGame(string gameName) { - this.GameName = GameName; - InitInjector(); - CloseInjector(); + GameName = gameName; + //It seems to me that these exceptions shouldn't be + // thrown from the initializer. But it seems to + // be mostly an opionion-based thing w/o any + // standard best practices -JG + + //InitInjector(); + //CloseInjector(); } - private void InitInjector() + + private static void InitInjector() { try { @@ -29,11 +36,19 @@ private void InitInjector() ResultEventHandle = EventWaitHandle.OpenExisting(this.GameName + "_result"); RequestRventHandle = EventWaitHandle.OpenExisting(this.GameName + "_request"); } - catch (Exception) + catch (Exception e) + when (e is WaitHandleCannotBeOpenedException + || e is System.IO.FileNotFoundException) + { + throw new NoGameCaosException("No running game engine found.", e); + } + catch (UnauthorizedAccessException e) { + throw new NoGameCaosException("Cannot find or access any running game engine.", e); } } - private void CloseInjector() + + private static void CloseInjector() { RequestRventHandle.Close(); ResultEventHandle.Close(); @@ -41,10 +56,41 @@ private void CloseInjector() MemFile.Dispose(); Mutex.Close(); } + + public static bool TryAddScriptToScriptorium(int Familiy, int Genus, int Species, int Event, string Script, out CaosResult caosResult) + { + try + { + caosResult = AddScriptToScriptorium(Familiy, Genus, Species, Event, Script); + return true; + } + catch (NoGameCaosException) + { + caosResult = null; + return false; + } + } + public CaosResult AddScriptToScriptorium(int Familiy, int Genus, int Species, int Event, string Script) { return ExecuteCaosGetResult(Script, "scrp " + Familiy + " " + Genus + " " + Species + " " + Event); } + + + public bool TryExecuteCaosGetResult(string CaosAsString, out CaosResult caosResult) + { + try + { + caosResult = ExecuteCaosGetResult(CaosAsString); + return true; + } + catch (NoGameCaosException) + { + caosResult = null; + return false; + } + } + public CaosResult ExecuteCaosGetResult(string CaosAsString, string Action = "execute") { InitInjector(); @@ -79,6 +125,7 @@ public CaosResult ExecuteCaosGetResult(string CaosAsString, string Action = "ex Thread.Sleep(50); return new CaosResult(ResultCode, Encoding.UTF8.GetString(ResultBytes), ProcessID); } + public int ProcessID() { Mutex.WaitOne(); diff --git a/ConsoleApp1/Program.cs b/ConsoleApp1/Program.cs index 2fc1adf..37c25e4 100644 --- a/ConsoleApp1/Program.cs +++ b/ConsoleApp1/Program.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using CAOS; using System.Diagnostics; @@ -12,8 +8,16 @@ class Demo { static void Main(string[] args) { - CaosInjector injector = new CaosInjector("Docking Station"); - CaosResult result = injector.ExecuteCaosGetResult("outs \"hi\""); + CaosResult result = null; + try + { + result = (new CaosInjector("Docking Station")) + .ExecuteCaosGetResult("outs \"hi\""); + }catch (NoGameCaosException e) + { + Console.WriteLine(e.Message); + } + if (result.Succeded) { Console.WriteLine(result.Content); @@ -23,6 +27,11 @@ static void Main(string[] args) Debug.Assert(result.ResultCode != 0); Console.WriteLine($"Error Code: {result.ResultCode}"); } + + //try return bool strategy + if() + + Console.ReadKey(); } } From f8296c43979d0fef33cd36b34d605c3715ddde72 Mon Sep 17 00:00:00 2001 From: gantt42 Date: Sat, 21 Oct 2017 18:21:45 -0400 Subject: [PATCH 06/13] Switches class to static Singletons are a bit of an antipattern, but I think this use case justifies used one. It's not even *much* of a singleton, there's really just one "piece of state" (phrasing?) which is GameName. --- CAOS/CaosInjector.cs | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/CAOS/CaosInjector.cs b/CAOS/CaosInjector.cs index 2655e00..4bf4077 100644 --- a/CAOS/CaosInjector.cs +++ b/CAOS/CaosInjector.cs @@ -5,35 +5,38 @@ namespace CAOS { - public class CaosInjector + public static class CaosInjector { - static Mutex Mutex; - static MemoryMappedFile MemFile; - static MemoryMappedViewAccessor MemViewAccessor; - static EventWaitHandle ResultEventHandle; - static EventWaitHandle RequestRventHandle; - private string GameName; - public CaosInjector(string GameName) + static public Mutex Mutex; + static public MemoryMappedFile MemFile; + static public MemoryMappedViewAccessor MemViewAccessor; + static public EventWaitHandle ResultEventHandle; + static public EventWaitHandle RequestRventHandle; + static private string GameName = null; + + public static void SetGame(string gameName) { - this.GameName = GameName; + GameName = gameName; InitInjector(); CloseInjector(); } - private void InitInjector() + + private static void InitInjector() { try { - Mutex = Mutex.OpenExisting(this.GameName + "_mutex"); - MemFile = MemoryMappedFile.OpenExisting(this.GameName + "_mem"); + Mutex = Mutex.OpenExisting(GameName + "_mutex"); + MemFile = MemoryMappedFile.OpenExisting(GameName + "_mem"); MemViewAccessor = MemFile.CreateViewAccessor(); - ResultEventHandle = EventWaitHandle.OpenExisting(this.GameName + "_result"); - RequestRventHandle = EventWaitHandle.OpenExisting(this.GameName + "_request"); + ResultEventHandle = EventWaitHandle.OpenExisting(GameName + "_result"); + RequestRventHandle = EventWaitHandle.OpenExisting(GameName + "_request"); } catch (Exception) { } } - private void CloseInjector() + + private static void CloseInjector() { RequestRventHandle.Close(); ResultEventHandle.Close(); @@ -41,11 +44,13 @@ private void CloseInjector() MemFile.Dispose(); Mutex.Close(); } - public CaosResult AddScriptToScriptorium(int Familiy, int Genus, int Species, int Event, string Script) + + public static CaosResult AddScriptToScriptorium(int Familiy, int Genus, int Species, int Event, string Script) { return ExecuteCaosGetResult(Script, "scrp " + Familiy + " " + Genus + " " + Species + " " + Event); } - public CaosResult ExecuteCaosGetResult(string CaosAsString, string Action = "execute") + + public static CaosResult ExecuteCaosGetResult(string CaosAsString, string Action = "execute") { InitInjector(); byte[] CaosBytes = Encoding.UTF8.GetBytes(Action + "\n" + CaosAsString + "\n"); @@ -79,7 +84,8 @@ public CaosResult ExecuteCaosGetResult(string CaosAsString, string Action = "ex Thread.Sleep(50); return new CaosResult(ResultCode, Encoding.UTF8.GetString(ResultBytes), ProcessID); } - public int ProcessID() + + public static int ProcessID() { Mutex.WaitOne(); int ProcessID = MemViewAccessor.ReadInt16(4); From 2e9dbd100157969d95051e3a8dc23be6be3cf697 Mon Sep 17 00:00:00 2001 From: gantt42 Date: Sat, 21 Oct 2017 19:37:01 -0400 Subject: [PATCH 07/13] Nonfunctioning - Adds TryReturnBool-strategy methods --- CAOS/CaosInjector.cs | 44 +++++++++++++++++++++++++++++++++++------- ConsoleApp1/Program.cs | 2 ++ 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/CAOS/CaosInjector.cs b/CAOS/CaosInjector.cs index 8d5c5f0..3a4e1cc 100644 --- a/CAOS/CaosInjector.cs +++ b/CAOS/CaosInjector.cs @@ -20,12 +20,30 @@ public static void SetGame(string gameName) //It seems to me that these exceptions shouldn't be // thrown from the initializer. But it seems to // be mostly an opionion-based thing w/o any - // standard best practices -JG + // standard best practices. -JG //InitInjector(); //CloseInjector(); } + /// + /// This might not be necessary. + /// Hmm -JG + /// + public static bool CanConnectToGame() + { + try + { + InitInjector(); + CloseInjector(); + return true; + } + catch (NoGameCaosException) + { + return false; + } + } + private static void InitInjector() { try @@ -57,11 +75,17 @@ private static void CloseInjector() Mutex.Close(); } - public static bool TryAddScriptToScriptorium(int Familiy, int Genus, int Species, int Event, string Script, out CaosResult caosResult) + public static bool TryAddScriptToScriptorium(int family, int genus, int species, int eventNum, string script) + { + CaosResult temp; + return TryAddScriptToScriptorium(family, genus, species, eventNum, script, out temp); + } + + public static bool TryAddScriptToScriptorium(int family, int genus, int species, int eventNum, string script, out CaosResult caosResult) { try { - caosResult = AddScriptToScriptorium(Familiy, Genus, Species, Event, Script); + caosResult = AddScriptToScriptorium(family, genus, species, eventNum, script); return true; } catch (NoGameCaosException) @@ -71,16 +95,22 @@ public static bool TryAddScriptToScriptorium(int Familiy, int Genus, int Species } } - public static CaosResult AddScriptToScriptorium(int Familiy, int Genus, int Species, int Event, string Script) + public static CaosResult AddScriptToScriptorium(int family, int genus, int species, int eventNum, string script) + { + return ExecuteCaosGetResult(script, "scrp " + family + " " + genus + " " + species + " " + eventNum); + } + + public static bool TryExecuteCaosGetResult(string caosAsString) { - return ExecuteCaosGetResult(Script, "scrp " + Familiy + " " + Genus + " " + Species + " " + Event); + CaosResult temp; + return TryExecuteCaosGetResult(caosAsString, out temp); } - public static bool TryExecuteCaosGetResult(string CaosAsString, out CaosResult caosResult) + public static bool TryExecuteCaosGetResult(string caosAsString, out CaosResult caosResult) { try { - caosResult = ExecuteCaosGetResult(CaosAsString); + caosResult = ExecuteCaosGetResult(caosAsString); return true; } catch (NoGameCaosException) diff --git a/ConsoleApp1/Program.cs b/ConsoleApp1/Program.cs index 37c25e4..1794721 100644 --- a/ConsoleApp1/Program.cs +++ b/ConsoleApp1/Program.cs @@ -8,6 +8,8 @@ class Demo { static void Main(string[] args) { + CaosInjector. + CaosResult result = null; try { From 0641f2230927cd393b2495bbd622d4482eef020a Mon Sep 17 00:00:00 2001 From: gantt42 Date: Sat, 21 Oct 2017 20:28:10 -0400 Subject: [PATCH 08/13] Removes static Yeah, that would really limit us to only connecting to one instance of a game engine at a time. (Technically if we do different AppDomains and marshalled stuff between them we'd be shooting ourselves in the foot then insiting on *walking* to the hospital) --- CAOS/CaosInjector.cs | 45 +++++++++++++++--------------- ConsoleApp1/Program.cs | 62 ++++++++++++++++++++++++++++++------------ 2 files changed, 68 insertions(+), 39 deletions(-) diff --git a/CAOS/CaosInjector.cs b/CAOS/CaosInjector.cs index 3a4e1cc..312e81a 100644 --- a/CAOS/CaosInjector.cs +++ b/CAOS/CaosInjector.cs @@ -5,20 +5,20 @@ namespace CAOS { - public static class CaosInjector + public class CaosInjector { - private static Mutex Mutex; - private static MemoryMappedFile MemFile; - private static MemoryMappedViewAccessor MemViewAccessor; - private static EventWaitHandle ResultEventHandle; - private static EventWaitHandle RequestRventHandle; - private static string GameName; + private Mutex Mutex; + private MemoryMappedFile MemFile; + private MemoryMappedViewAccessor MemViewAccessor; + private EventWaitHandle ResultEventHandle; + private EventWaitHandle RequestRventHandle; + private string GameName; - public static void SetGame(string gameName) + public CaosInjector(string gameName) { GameName = gameName; //It seems to me that these exceptions shouldn't be - // thrown from the initializer. But it seems to + // thrown from the constructor. But it seems to // be mostly an opionion-based thing w/o any // standard best practices. -JG @@ -30,7 +30,7 @@ public static void SetGame(string gameName) /// This might not be necessary. /// Hmm -JG /// - public static bool CanConnectToGame() + public bool CanConnectToGame() { try { @@ -44,7 +44,7 @@ public static bool CanConnectToGame() } } - private static void InitInjector() + private void InitInjector() { try { @@ -66,7 +66,7 @@ private static void InitInjector() } } - private static void CloseInjector() + private void CloseInjector() { RequestRventHandle.Close(); ResultEventHandle.Close(); @@ -75,13 +75,13 @@ private static void CloseInjector() Mutex.Close(); } - public static bool TryAddScriptToScriptorium(int family, int genus, int species, int eventNum, string script) + public bool TryAddScriptToScriptorium(int family, int genus, int species, int eventNum, string script) { CaosResult temp; return TryAddScriptToScriptorium(family, genus, species, eventNum, script, out temp); } - public static bool TryAddScriptToScriptorium(int family, int genus, int species, int eventNum, string script, out CaosResult caosResult) + public bool TryAddScriptToScriptorium(int family, int genus, int species, int eventNum, string script, out CaosResult caosResult) { try { @@ -95,22 +95,22 @@ public static bool TryAddScriptToScriptorium(int family, int genus, int species, } } - public static CaosResult AddScriptToScriptorium(int family, int genus, int species, int eventNum, string script) + public CaosResult AddScriptToScriptorium(int family, int genus, int species, int eventNum, string script) { - return ExecuteCaosGetResult(script, "scrp " + family + " " + genus + " " + species + " " + eventNum); + return ExecuteCaos(script, "scrp " + family + " " + genus + " " + species + " " + eventNum); } - public static bool TryExecuteCaosGetResult(string caosAsString) + public bool TryExecuteCaos(string caosAsString) { CaosResult temp; - return TryExecuteCaosGetResult(caosAsString, out temp); + return TryExecuteCaos(caosAsString, out temp); } - public static bool TryExecuteCaosGetResult(string caosAsString, out CaosResult caosResult) + public bool TryExecuteCaos(string caosAsString, out CaosResult caosResult) { try { - caosResult = ExecuteCaosGetResult(caosAsString); + caosResult = ExecuteCaos(caosAsString); return true; } catch (NoGameCaosException) @@ -120,8 +120,9 @@ public static bool TryExecuteCaosGetResult(string caosAsString, out CaosResult c } } - public static CaosResult ExecuteCaosGetResult(string CaosAsString, string Action = "execute") + public CaosResult ExecuteCaos(string CaosAsString, string Action = "execute") { + //Need more exception checking here - JG InitInjector(); byte[] CaosBytes = Encoding.UTF8.GetBytes(Action + "\n" + CaosAsString + "\n"); int BufferPosition = 24; @@ -155,7 +156,7 @@ public static CaosResult ExecuteCaosGetResult(string CaosAsString, string Action return new CaosResult(ResultCode, Encoding.UTF8.GetString(ResultBytes), ProcessID); } - public static int ProcessID() + public int ProcessID() { Mutex.WaitOne(); int ProcessID = MemViewAccessor.ReadInt16(4); diff --git a/ConsoleApp1/Program.cs b/ConsoleApp1/Program.cs index 1794721..5447756 100644 --- a/ConsoleApp1/Program.cs +++ b/ConsoleApp1/Program.cs @@ -8,33 +8,61 @@ class Demo { static void Main(string[] args) { - CaosInjector. + CaosInjector injector = new CaosInjector("Docking Station"); - CaosResult result = null; + if (injector.CanConnectToGame()) + { + TryCatchStrategy(injector); + TryReturnBoolStrategy(injector); + } + else + { + Console.WriteLine("Couldn't connect to game."); + } + Console.ReadKey(); + } + + private static void TryCatchStrategy(CaosInjector injector) + { try { - result = (new CaosInjector("Docking Station")) - .ExecuteCaosGetResult("outs \"hi\""); - }catch (NoGameCaosException e) + CaosResult result = injector.ExecuteCaos("outs \"hi\""); + if (result.Succeded) + { + Console.WriteLine(result.Content); + } + else + { + Console.WriteLine($"Error Code: {result.ResultCode}"); + } + } + catch (NoGameCaosException e) { - Console.WriteLine(e.Message); + Console.WriteLine($"Game exited unexpectedly. Error message: {e.Message}"); } - - if (result.Succeded) + } + + private static void TryReturnBoolStrategy(CaosInjector injector) + { + CaosResult result; + if (injector.TryExecuteCaos("outs \"hi\"", out result)) { - Console.WriteLine(result.Content); + if (result.Succeded) + { + Console.WriteLine(result.Content); + //Just try to do it, we don't care about the results + injector.TryExecuteCaos("targ norn doif targ <> null sezz \"Yo yo! What up?\" endi"); + } + else + { + Debug.Assert(result.ResultCode != 0); + Console.WriteLine($"Error Code: {result.ResultCode}"); + } } else { - Debug.Assert(result.ResultCode != 0); - Console.WriteLine($"Error Code: {result.ResultCode}"); + Console.WriteLine("Execution failed. Game may have exited."); } - - //try return bool strategy - if() - - - Console.ReadKey(); } } } From 32eb1986ac794d34869db5834333f2a5c8d60f43 Mon Sep 17 00:00:00 2001 From: gantt42 Date: Sun, 22 Oct 2017 09:43:13 -0400 Subject: [PATCH 09/13] renames Demo project's folder --- {ConsoleApp1 => Demo}/App.config | 0 {ConsoleApp1 => Demo}/Demo.csproj | 0 {ConsoleApp1 => Demo}/Program.cs | 0 {ConsoleApp1 => Demo}/Properties/AssemblyInfo.cs | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename {ConsoleApp1 => Demo}/App.config (100%) rename {ConsoleApp1 => Demo}/Demo.csproj (100%) rename {ConsoleApp1 => Demo}/Program.cs (100%) rename {ConsoleApp1 => Demo}/Properties/AssemblyInfo.cs (100%) diff --git a/ConsoleApp1/App.config b/Demo/App.config similarity index 100% rename from ConsoleApp1/App.config rename to Demo/App.config diff --git a/ConsoleApp1/Demo.csproj b/Demo/Demo.csproj similarity index 100% rename from ConsoleApp1/Demo.csproj rename to Demo/Demo.csproj diff --git a/ConsoleApp1/Program.cs b/Demo/Program.cs similarity index 100% rename from ConsoleApp1/Program.cs rename to Demo/Program.cs diff --git a/ConsoleApp1/Properties/AssemblyInfo.cs b/Demo/Properties/AssemblyInfo.cs similarity index 100% rename from ConsoleApp1/Properties/AssemblyInfo.cs rename to Demo/Properties/AssemblyInfo.cs From ecf48a9d7250fc365ada30556ffe57776b789d46 Mon Sep 17 00:00:00 2001 From: gantt42 Date: Sun, 22 Oct 2017 10:11:44 -0400 Subject: [PATCH 10/13] Renames Succeded to Success, fixed pathing error Succeded is a misspelling and Success is slightly shorter. .sln couldn't find renamed Demo project. --- CAOS.sln | 2 +- CAOS/CaosInjector.cs | 4 ++-- Demo/Program.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CAOS.sln b/CAOS.sln index ba60c19..64f48fb 100644 --- a/CAOS.sln +++ b/CAOS.sln @@ -5,7 +5,7 @@ VisualStudioVersion = 15.0.26730.8 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CAOS", "CAOS\CAOS.csproj", "{A4EF3E36-9042-44AE-AD4D-B644A4F7C719}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo", "ConsoleApp1\Demo.csproj", "{013D15C0-A7FF-4D80-B36B-25E3D58E1FA4}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo", "Demo\Demo.csproj", "{013D15C0-A7FF-4D80-B36B-25E3D58E1FA4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/CAOS/CaosInjector.cs b/CAOS/CaosInjector.cs index 312e81a..0cb6e60 100644 --- a/CAOS/CaosInjector.cs +++ b/CAOS/CaosInjector.cs @@ -167,14 +167,14 @@ public int ProcessID() public class CaosResult { public int ResultCode { get; private set; } - public bool Succeded { get; private set; } + public bool Success { get; private set; } public int ProcessId { get; private set; } public string Content { get; private set; } public CaosResult(int resultCode, string content, int processID) { this.ResultCode = resultCode; - this.Succeded = (resultCode == 0); + this.Success = (resultCode == 0); this.Content = content; this.ProcessId = processID; } diff --git a/Demo/Program.cs b/Demo/Program.cs index 5447756..7783542 100644 --- a/Demo/Program.cs +++ b/Demo/Program.cs @@ -27,7 +27,7 @@ private static void TryCatchStrategy(CaosInjector injector) try { CaosResult result = injector.ExecuteCaos("outs \"hi\""); - if (result.Succeded) + if (result.Success) { Console.WriteLine(result.Content); } @@ -47,7 +47,7 @@ private static void TryReturnBoolStrategy(CaosInjector injector) CaosResult result; if (injector.TryExecuteCaos("outs \"hi\"", out result)) { - if (result.Succeded) + if (result.Success) { Console.WriteLine(result.Content); //Just try to do it, we don't care about the results From 023cc98ebe5e0cad93fd0f4885e4beeba72ff7cb Mon Sep 17 00:00:00 2001 From: gantt42 Date: Sun, 22 Oct 2017 11:09:22 -0400 Subject: [PATCH 11/13] Removes erroneous file. Adds .suo files to .gitignore --- .gitignore | 3 ++- .gitignored | 3 --- CAOS.v12.suo | Bin 34816 -> 0 bytes 3 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 .gitignored delete mode 100644 CAOS.v12.suo diff --git a/.gitignore b/.gitignore index ef4e34c..1aa9b08 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ bin obj packages -.vs \ No newline at end of file +.vs +.suo diff --git a/.gitignored b/.gitignored deleted file mode 100644 index f646c32..0000000 --- a/.gitignored +++ /dev/null @@ -1,3 +0,0 @@ -bin -obj -packages \ No newline at end of file diff --git a/CAOS.v12.suo b/CAOS.v12.suo deleted file mode 100644 index 9c11a9447d6aeb0913c94917f1cb78c18f25afdd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 34816 zcmeHQTX0*&89qu#F%Syjk^-e5LYi`kglx;Qog2|Laj_c{np7M~PjM z8D=`YJkSo)nO+{+DP`ybokHP-X?cTAhX)?WblR6bFl`^&PKO!VPNzIDkbd8;)><7O zNk@{CSk76`>g+jZ&;FPF_uqg2{m=3FceefcXRqGz7sHkg7@LicFI;1MLc8wM%Epa` zaV^ey?c)m$2k1z_Y*m@s5Aq zf8O^XZ+=SF7zf0Hancw8^f{E0#*)*cb+2tVHm$%X+v`@;ZhRSKh_6VKM%pMDr;Je} zi=$;chF=pnsq3Xmy?Te8#wOnW1(a(sid5*op#}Jlq3+fS{QGhI$c4Oej9-ts_f?+NANee^Rj68z;dE`fsN0A>z{sQt5>y>26=8FvaVHB4B@a66DFpjRC&+%^>70B~*N*_6 zW#ojVLrZ8LoU{Z)(@5ZIQB|ySr2W+@{LN_VKm0+8fvy7VKT=u5u?k(@Z}xj9;QLUC ziBPx2}q6LD_cAvA(Xf9fpGA8z66 z@;3n*bAr=S!s9sSN+b(OETbP9$v#op-3I?T4}Pse{}E#btDiAID;g5ERq2V6aZFgS zgi=540R5axX;ZnSpY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JeDn$)42(&Jew^9C(V*|Je!{_oC%KPEweb6 z&X}d${$pmblr7}<_x1)u{M+r1mvdIRXztIOWviIZ?e>qCXL8xhBj)mC;gp%*KNISo z8<-oM>+PK#2&MbeTWFH)YYsJD$XmriE@u{lN6YyM)3UPp`BEZnr5S5?6Hqgkj?9gw zOI9*xE|_`iriEfTURYR2=VvF)C2KTWvUctpDW$SGv+{H_V`Wd92Tn~-$I_WoXfBmC zbF(}4p?#7Yodcb*ayB<>uX6Xk$#ikvw8nF3YpzgSsNR3h*Zhs8i~m(9XX`*(R*n7z z$M1b!{P)ETpI`6s-xx|rUi`1*gZ#ac;(x0V*?b+0|MG_`Kt2AMDzd)*tA4fYsve&& z+FY$Cmn<`1%FbkSS!+3%+uaKx9eB+PNLmEz!ud%Ig+i{pUJjz z$?A|=nLmY-nt@{qk*$neH=FWtEoNeg{}SL80Q3&zU!gnS#`$}gV!wssAMgg`1j>it zI(!x9L{v}sx|Nth`SHE>`hUsHlr0z(YGx%%$pNNoq;PHd5FlHZEPKmj@YSc&xw1Ju zZS<(F+eR2XxqkC??fm~o`czfdUH$I!kK(jxBDni1wf+_7e@~E!{+Cw&|D$?V^@=)g zbR>Tnfy6ZB@D-KL-a+u<|K+zm?eA(hzmagc*;?_|LYczE*ti8x9flJ M|3BJ$^vXK_KixlJRsaA1 From 09b13842910b4b9a9676fa4bc578904951a87e81 Mon Sep 17 00:00:00 2001 From: gantt42 Date: Sun, 22 Oct 2017 11:11:43 -0400 Subject: [PATCH 12/13] Makes Demo the "default" startup project Rearranges order of .csproj files within the .sln file --- CAOS.sln | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CAOS.sln b/CAOS.sln index 64f48fb..1df8145 100644 --- a/CAOS.sln +++ b/CAOS.sln @@ -3,10 +3,10 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26730.8 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CAOS", "CAOS\CAOS.csproj", "{A4EF3E36-9042-44AE-AD4D-B644A4F7C719}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo", "Demo\Demo.csproj", "{013D15C0-A7FF-4D80-B36B-25E3D58E1FA4}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CAOS", "CAOS\CAOS.csproj", "{A4EF3E36-9042-44AE-AD4D-B644A4F7C719}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU From 7fdca0b6d2f82d1d581f2f19e3412313414d45dc Mon Sep 17 00:00:00 2001 From: gantt42 Date: Sun, 22 Oct 2017 11:19:12 -0400 Subject: [PATCH 13/13] Switches version to 2.0.0 --- CAOS/Properties/AssemblyInfo.cs | 4 ++-- Demo/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CAOS/Properties/AssemblyInfo.cs b/CAOS/Properties/AssemblyInfo.cs index 45b5306..edf1946 100644 --- a/CAOS/Properties/AssemblyInfo.cs +++ b/CAOS/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.0.0")] +[assembly: AssemblyFileVersion("2.0.0")] diff --git a/Demo/Properties/AssemblyInfo.cs b/Demo/Properties/AssemblyInfo.cs index d106d2b..de3d90e 100644 --- a/Demo/Properties/AssemblyInfo.cs +++ b/Demo/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.0.0")] +[assembly: AssemblyFileVersion("2.0.0")]