Neues Projekt, Verweise: mcCrypt.exe hinzufügen Program.cs: using System; using System.IO; using System.Windows.Forms; using Microcare.Security; namespace Test { class Program { static void Main() { string[] args = new[] { "mandant", "/config", "config.xml", "/log", "log.txt" }; try { CallMcCrypt(args); } catch(Exception exception) { MessageBox.Show(exception.Message); } } public static void CallMcCrypt(string[] args) { CryptHandler cryptHandler = CryptHandler.GetHandler(args); bool result = cryptHandler.Execute(); using(StringWriter stringWriter = new StringWriter()) { int returnCode = cryptHandler.PrintReturnCode(stringWriter); string returnMessage = stringWriter.ToString(); if(returnCode != 0) { throw new Exception(returnMessage); } } } } }