Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-6613

shutdown: improved functionality

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Applications
    • Operating System: ReactOS
      Platform: x86 Hardware

    Description

      Created an attachment (id=8108)
      shutdown modifications

      This enhances the functionality of the shutdown utility. Although the addition of the flags indicate that this conforms to the Windows 7 version, it doesn't use any functions built for Windows Vista/2008 or later. If anyone has a problem with this, then please let me know so I can take care of it in the future.

      The patch should mostly work, but I have been having trouble with the resource files (one of the reasons I'm posting the patch now) and refuses to compile the resource file, "resource.rc". It claims that the problem is coming from line 10, but the compiler is not telling me anything beyond that.

      Overall this is the list of changes that I've made:
      ---------------------------------------------------

      • Since the argument parsing flags are case insensitive, there is no need to check for both capital letters and lower case.
      • Added extra arguments based upon Windows 7.
      • Added options to CommandLineOptions.
      • Removed ExitOptions entirely.
      • Removed an include to reason.h since it's now included in 'winreg.h' now.
      • Rewrote most of _tmain.
      • Added a modified version of the PrintResourceString() function from DiskPart.
      • Removed PrintUsage() since PrintResourceString() does a more flexible job at printing strings out.
      • Added clear error messages when there is a problem. This makes it a bit easier to determine if there is a problem.
      • Convert all the C++ comments to C.
      • Since each version of Windows has a different upper limit for the length of the comment, I had to use a work around solution that first checks the length of the comment based upon the version of Windows that the user is currently using.
      • Added support for hibernation mode, but the function SetSuspendState() is only a stub right now.

      Attachments

        1. shutdown.c.patch
          2 kB
          milawynsrealm
        2. shutdown.patch
          101 kB
          milawynsrealm
        3. shutdown.patch
          101 kB
          milawynsrealm
        4. shutdown.patch
          100 kB
          milawynsrealm
        5. shutdown.patch
          100 kB
          milawynsrealm
        6. shutdown.patch
          99 kB
          milawynsrealm
        7. shutdown.patch
          50 kB
          milawynsrealm
        8. shutdown.patch
          43 kB
          milawynsrealm

        Activity

          People

            hbelusca hbelusca
            milawynsrealm milawynsrealm
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: