Added CF Guard (Control Flow Guard) column

git-svn-id: svn://svn.code.sf.net/p/processhacker/code@5848 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
wj32
2015-04-30 04:31:12 +00:00
parent 9926cb8e99
commit a6cecfdaee
3 changed files with 30 additions and 2 deletions
+1
View File
@@ -2,6 +2,7 @@ Process Hacker
2.35
* NEW/IMPROVED:
* Added CF Guard (Control Flow Guard) column
* Support for up to 64 processors when setting process/thread affinity
* Updated ExtendedTools plugin:
* Added Disk and Network graphs for all processes
+2 -1
View File
@@ -189,8 +189,9 @@ FORCEINLINE VOID PhChangeShStateTn(
#define PHPRTLC_PACKAGENAME 72
#define PHPRTLC_APPID 73
#define PHPRTLC_DPIAWARENESS 74
#define PHPRTLC_CFGUARD 75
#define PHPRTLC_MAXIMUM 75
#define PHPRTLC_MAXIMUM 76
#define PHPRTLC_IOGROUP_COUNT 9
#define PHPN_WSCOUNTERS 0x1
+27 -1
View File
@@ -196,6 +196,7 @@ VOID PhInitializeProcessTreeList(
PhAddTreeNewColumn(hwnd, PHPRTLC_PACKAGENAME, FALSE, L"Package Name", 160, PH_ALIGN_LEFT, -1, 0);
PhAddTreeNewColumn(hwnd, PHPRTLC_APPID, FALSE, L"App ID", 160, PH_ALIGN_LEFT, -1, 0);
PhAddTreeNewColumn(hwnd, PHPRTLC_DPIAWARENESS, FALSE, L"DPI Awareness", 110, PH_ALIGN_LEFT, -1, 0);
PhAddTreeNewColumn(hwnd, PHPRTLC_CFGUARD, FALSE, L"CF Guard", 70, PH_ALIGN_LEFT, -1, 0);
TreeNew_SetRedraw(hwnd, TRUE);
@@ -1792,6 +1793,17 @@ BEGIN_SORT_FUNCTION(DpiAwareness)
}
END_SORT_FUNCTION
BEGIN_SORT_FUNCTION(CfGuard)
{
PhpUpdateProcessNodeImage(node1);
PhpUpdateProcessNodeImage(node2);
sortResult = intcmp(
node1->ImageDllCharacteristics & IMAGE_DLLCHARACTERISTICS_GUARD_CF,
node2->ImageDllCharacteristics & IMAGE_DLLCHARACTERISTICS_GUARD_CF
);
}
END_SORT_FUNCTION
BOOLEAN NTAPI PhpProcessTreeNewCallback(
_In_ HWND hwnd,
_In_ PH_TREENEW_MESSAGE Message,
@@ -1906,7 +1918,8 @@ BOOLEAN NTAPI PhpProcessTreeNewCallback(
SORT_FUNCTION(Subsystem),
SORT_FUNCTION(PackageName),
SORT_FUNCTION(AppId),
SORT_FUNCTION(DpiAwareness)
SORT_FUNCTION(DpiAwareness),
SORT_FUNCTION(CfGuard)
};
static PH_INITONCE initOnce = PH_INITONCE_INIT;
int (__cdecl *sortFunction)(const void *, const void *);
@@ -2593,6 +2606,19 @@ BOOLEAN NTAPI PhpProcessTreeNewCallback(
break;
}
break;
case PHPRTLC_CFGUARD:
PhpUpdateProcessNodeImage(node);
if (WindowsVersion >= WINDOWS_81)
{
if (node->ImageDllCharacteristics & IMAGE_DLLCHARACTERISTICS_GUARD_CF)
PhInitializeStringRef(&getCellText->Text, L"CF Guard");
}
else
{
PhInitializeStringRef(&getCellText->Text, L"N/A");
}
break;
default:
return FALSE;
}