winapi-rs
winapi-rs copied to clipboard
Added missing constants
Resolves #915.
This is a backwards compatible change. All identifiers and associated values have been copy-pasted from the respective Windows SDK header file.
LGTM :+1:
Relevant header code
winbase.h:
//
// Max length of commandline in characters (including the NULL character that can be registered for restart)
//
#define RESTART_MAX_CMD_LINE 1024
//
// Do not restart the process for termination due to application crashes
//
#define RESTART_NO_CRASH 1
//
// Do not restart the process for termination due to application hangs
//
#define RESTART_NO_HANG 2
//
// Do not restart the process for termination due to patch installations
//
#define RESTART_NO_PATCH 4
//
// Do not restart the process when the system is rebooted due to patch installations
//
#define RESTART_NO_REBOOT 8
#define RECOVERY_DEFAULT_PING_INTERVAL 5000
#define RECOVERY_MAX_PING_INTERVAL (5 * 60 * 1000)
-
Organization of code
- All definitions go into the source file that directly maps to the header the definition is from: :heavy_check_mark:
- Definitions are defined in the same order as they are in the original header: :heavy_check_mark:
-
Constants
- Names are correct: :heavy_check_mark:
- Values are correct: :heavy_check_mark:
- Types are correct:
-
RESTART_NO_*
are passed toRegisterApplicationRestart
' dwFlags, aDWORD
: :heavy_check_mark: -
RESTART_MAX_CMD_LINE
defines the max size of a char array, ausize
: :heavy_check_mark: -
RECOVERY_*_PING_INTERVAL
are passed toRegisterApplicationRecoveryCallback
'sdwPingInterval
, a DWORD: :heavy_check_mark:
-