Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Operating System: ReactOS
Platform: x86 Hardware
-
October (0.3.15 first half)
-
7322
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.