Example 4: Setting Multiple Flags

The following command sets these three flags for the current session:

This command uses the /k parameter to specify kernel mode (session only). It sets the value for kernel mode to E0 (0xE0), the sum of the hexadecimal values of the selected flags (0x20 + 0x40 + 0x80).

gflags /k e0 

In response, GFlags displays the revised value of flags set for the session. The display indicates that the command is successful and that the three flags specified in the command are set.

Current Running Kernel Settings are: 000000e0
    hfc - Enable heap free checking
    hpc - Enable heap parameter checking
    hvc - Enable heap validation on call

You can use several different GFlags commands to set flags. Each of the following commands has the same effect as the command used in this example and the methods can be used interchangeably:

gflags /k +20 +40 +80 
gflags /k +E0 
gflags /k +hfc +hpc +hvc 

Kernel (run time) flags are effective immediately and remain effective until Windows shuts down.

Send comments about this topic to Microsoft