Skip to content

Utills with examples for wrapping arguments for original application

Notifications You must be signed in to change notification settings

TERESH1/argv-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

argv-wrapper

Utills with examples for wrapping arguments for original application

It uses modified CommandLineToArgvW from Wine sources which now splits command line into arguments without changing them

You should replace original app with your wrapper and use new name/path in wrapper

You can use this tamplate:

namespace ArgvWrapper {
   public static class ExampleWrapper {
      const string AppName = "example_orig.exe";
      static bool Verbose = false;

      static int Main(string[] args) {
         if (Environment.GetEnvironmentVariable("ExampleWrapperVerbose") == "1")
            Verbose = true;
         if (Verbose)
            Console.WriteLine(Environment.CommandLine);
         List<string> Argv = WrapperUtills.CommandLineToArgvOriginal(Environment.CommandLine);
         //
         // Do something with Argv list
         //
         return WrapperUtills.StartProc(Verbose, AppName, Argv);
      }
   }
}