Ignore:
Timestamp:
12/9/2008 8:40:30 AM (6 years ago)
Author:
lowjoel
Message:

-Replace the Eraser program entry points with those that retunr ints for statuses to be returned to the shell extension
-Create a default constructor for the Handle class to allow for the initialisation of NULL handles
-Factor out the string formatting code to the FormatString? function. Allows for reuse later on
-Replace all new[]'s and selete[]'s with std::vector as the buffer to prevent memory leaks
-Implemented error checking when the Eraser binary is called from the shell extension. If the process returns an error status, we must be sure to read the output pipe for the error and display it to the user.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Eraser/Program.cs

    r756 r759  
    4141        /// </summary> 
    4242        [STAThread] 
    43         static void Main(string[] commandLine) 
     43        static int Main(string[] commandLine) 
    4444        { 
    4545            //Trivial case: no command parameters 
     
    5757                else 
    5858                { 
    59                     CommandMain(commandLine); 
     59                    return CommandMain(commandLine); 
    6060                } 
    6161            } 
     
    6363            //The other trivial case: definitely a console application. 
    6464            else 
    65                 CommandMain(commandLine); 
     65                return CommandMain(commandLine); 
     66 
     67            //No error. 
     68            return 0; 
    6669        } 
    6770 
     
    7073        /// </summary> 
    7174        /// <param name="commandLine">The command line parameters passed to Eraser.</param> 
    72         private static void CommandMain(string[] commandLine) 
     75        private static int CommandMain(string[] commandLine) 
    7376        { 
    7477            //True if the user specified a quiet command. 
     
    8285                using (ManagerLibrary library = new ManagerLibrary(new Settings())) 
    8386                    program.Run(); 
     87 
     88                return 1; 
    8489            } 
    8590            catch (Exception e) 
Note: See TracChangeset for help on using the changeset viewer.