ReactOS 0.4.16-dev-1142-g8029339
perfdata.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _PERFDATA
 
struct  _CMD_LINE_CACHE
 

Macros

#define Li2Double(x)   ((double)((x).HighPart) * 4.294967296E9 + (double)((x).LowPart))
 

Typedefs

typedef struct _PERFDATA PERFDATA
 
typedef struct _PERFDATAPPERFDATA
 
typedef struct _CMD_LINE_CACHE CMD_LINE_CACHE
 
typedef struct _CMD_LINE_CACHEPCMD_LINE_CACHE
 

Functions

BOOL PerfDataInitialize (void)
 
void PerfDataUninitialize (void)
 
void PerfDataRefresh (void)
 
BOOL PerfDataGet (ULONG Index, PPERFDATA *lppData)
 
ULONG PerfDataGetProcessIndex (ULONG pid)
 
ULONG PerfDataGetProcessCount (void)
 
ULONG PerfDataGetProcessorUsage (void)
 
ULONG PerfDataGetProcessorSystemUsage (void)
 
BOOL PerfDataGetImageName (ULONG Index, LPWSTR lpImageName, ULONG nMaxCount)
 
ULONG PerfDataGetProcessId (ULONG Index)
 
BOOL PerfDataGetUserName (ULONG Index, LPWSTR lpUserName, ULONG nMaxCount)
 
BOOL PerfDataGetCommandLine (ULONG Index, LPWSTR lpCommandLine, ULONG nMaxCount)
 
void PerfDataDeallocCommandLineCache ()
 
ULONG PerfDataGetSessionId (ULONG Index)
 
ULONG PerfDataGetCPUUsage (ULONG Index)
 
LARGE_INTEGER PerfDataGetCPUTime (ULONG Index)
 
ULONG PerfDataGetWorkingSetSizeBytes (ULONG Index)
 
ULONG PerfDataGetPeakWorkingSetSizeBytes (ULONG Index)
 
ULONG PerfDataGetWorkingSetSizeDelta (ULONG Index)
 
ULONG PerfDataGetPageFaultCount (ULONG Index)
 
ULONG PerfDataGetPageFaultCountDelta (ULONG Index)
 
ULONG PerfDataGetVirtualMemorySizeBytes (ULONG Index)
 
ULONG PerfDataGetPagedPoolUsagePages (ULONG Index)
 
ULONG PerfDataGetNonPagedPoolUsagePages (ULONG Index)
 
ULONG PerfDataGetBasePriority (ULONG Index)
 
ULONG PerfDataGetHandleCount (ULONG Index)
 
ULONG PerfDataGetThreadCount (ULONG Index)
 
ULONG PerfDataGetUSERObjectCount (ULONG Index)
 
ULONG PerfDataGetGDIObjectCount (ULONG Index)
 
BOOL PerfDataGetIOCounters (ULONG Index, PIO_COUNTERS pIoCounters)
 
ULONG PerfDataGetCommitChargeTotalK (void)
 
ULONG PerfDataGetCommitChargeLimitK (void)
 
ULONG PerfDataGetCommitChargePeakK (void)
 
ULONG PerfDataGetKernelMemoryTotalK (void)
 
ULONG PerfDataGetKernelMemoryPagedK (void)
 
ULONG PerfDataGetKernelMemoryNonPagedK (void)
 
ULONG PerfDataGetPhysicalMemoryTotalK (void)
 
ULONG PerfDataGetPhysicalMemoryAvailableK (void)
 
ULONG PerfDataGetPhysicalMemorySystemCacheK (void)
 
ULONG PerfDataGetSystemHandleCount (void)
 
ULONG PerfDataGetTotalThreadCount (void)
 

Macro Definition Documentation

◆ Li2Double

#define Li2Double (   x)    ((double)((x).HighPart) * 4.294967296E9 + (double)((x).LowPart))

Definition at line 11 of file perfdata.h.

Typedef Documentation

◆ CMD_LINE_CACHE

◆ PCMD_LINE_CACHE

◆ PERFDATA

◆ PPERFDATA

Function Documentation

◆ PerfDataDeallocCommandLineCache()

void PerfDataDeallocCommandLineCache ( )

Definition at line 639 of file perfdata.c.

640{
641 PCMD_LINE_CACHE cache, pnext;
642
643 for (cache = global_cache; cache; cache = pnext)
644 {
645 pnext = cache->pnext;
647 }
648
650}
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
PCMD_LINE_CACHE global_cache
Definition: perfdata.c:36
Definition: cache.c:49

Referenced by TaskManagerWndProc().

◆ PerfDataGet()

BOOL PerfDataGet ( ULONG  Index,
PPERFDATA lppData 
)

Definition at line 1112 of file perfdata.c.

1113{
1114 BOOL bSuccessful = FALSE;
1115
1117 if (Index < ProcessCount)
1118 {
1119 *lppData = pPerfData + Index;
1120 bSuccessful = TRUE;
1121 }
1123 return bSuccessful;
1124}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
PPERFDATA pPerfData
Definition: perfdata.c:20
CRITICAL_SECTION PerfDataCriticalSection
Definition: perfdata.c:18
ULONG ProcessCount
Definition: perfdata.c:22
_In_ WDFCOLLECTION _In_ ULONG Index
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

◆ PerfDataGetBasePriority()

ULONG PerfDataGetBasePriority ( ULONG  Index)

Definition at line 826 of file perfdata.c.

827{
828 ULONG BasePriority;
829
831
832 if (Index < ProcessCount)
833 BasePriority = pPerfData[Index].BasePriority;
834 else
835 BasePriority = 0;
836
838
839 return BasePriority;
840}
ULONG BasePriority
Definition: perfdata.h:29
uint32_t ULONG
Definition: typedefs.h:59

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetCommandLine()

BOOL PerfDataGetCommandLine ( ULONG  Index,
LPWSTR  lpCommandLine,
ULONG  nMaxCount 
)

Definition at line 529 of file perfdata.c.

530{
531 static const LPWSTR ellipsis = L"...";
532
534 UNICODE_STRING CommandLineStr = {0};
535
536 PVOID ProcessParams = NULL;
539
541 BOOL result;
542
543 PCMD_LINE_CACHE new_entry;
544 LPWSTR new_string;
545
547
548 /* [A] Search for a string already in cache? If so, use it */
549 while (cache && cache->pnext != NULL)
550 {
551 if (cache->idx == Index && cache->str != NULL)
552 {
553 /* Found it. Use it, and add some ellipsis at the very end to make it cute */
554 wcsncpy(lpCommandLine, cache->str, CMD_LINE_MIN(nMaxCount, cache->len));
555 wcscpy(lpCommandLine + CMD_LINE_MIN(nMaxCount, cache->len) - wcslen(ellipsis), ellipsis);
556 return TRUE;
557 }
558
559 cache = cache->pnext;
560 }
561
562 /* [B] We don't; let's allocate and load a value from the process mem... and cache it */
564
565 /* Default blank command line in case things don't work out */
566 wcsncpy(lpCommandLine, L"", nMaxCount);
567
568 /* Ask for a handle to the target process so that we can read its memory and query stuff */
570 if (!hProcess)
571 goto cleanup;
572
573 /* First off, get the ProcessEnvironmentBlock location in that process' address space */
575 if (!NT_SUCCESS(Status))
576 goto cleanup;
577
578 /* Then get the PEB.ProcessParameters member pointer */
580 (PVOID)((ULONG_PTR)pbi.PebBaseAddress + FIELD_OFFSET(PEB, ProcessParameters)),
581 &ProcessParams,
582 sizeof(ProcessParams),
583 NULL);
584 if (!result)
585 goto cleanup;
586
587 /* Then copy the PEB->ProcessParameters.CommandLine member
588 to get the pointer to the string buffer and its size */
590 (PVOID)((ULONG_PTR)ProcessParams + FIELD_OFFSET(RTL_USER_PROCESS_PARAMETERS, CommandLine)),
591 &CommandLineStr,
592 sizeof(CommandLineStr),
593 NULL);
594 if (!result)
595 goto cleanup;
596
597 /* Allocate the next cache entry and its accompanying string in one go */
598 new_entry = HeapAlloc(GetProcessHeap(),
600 sizeof(CMD_LINE_CACHE) + CommandLineStr.Length + sizeof(UNICODE_NULL));
601 if (!new_entry)
602 goto cleanup;
603
604 new_string = (LPWSTR)((ULONG_PTR)new_entry + sizeof(CMD_LINE_CACHE));
605
606 /* Bingo, the command line should be stored there,
607 copy the string from the other process */
609 CommandLineStr.Buffer,
610 new_string,
611 CommandLineStr.Length,
612 NULL);
613 if (!result)
614 {
615 /* Weird, after successfully reading the mem of that process
616 various times it fails now, forget it and bail out */
617 HeapFree(GetProcessHeap(), 0, new_entry);
618 goto cleanup;
619 }
620
621 /* Add our pointer to the cache... */
622 new_entry->idx = Index;
623 new_entry->str = new_string;
624 new_entry->len = CommandLineStr.Length;
625
626 if (!global_cache)
627 global_cache = new_entry;
628 else
629 cache->pnext = new_entry;
630
631 /* ... and print the buffer for the first time */
632 wcsncpy(lpCommandLine, new_string, CMD_LINE_MIN(nMaxCount, CommandLineStr.Length));
633
634cleanup:
636 return TRUE;
637}
LONG NTSTATUS
Definition: precomp.h:26
wcsncpy
wcscpy
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define CloseHandle
Definition: compat.h:739
#define ReadProcessMemory(a, b, c, d, e)
Definition: compat.h:758
#define HeapAlloc
Definition: compat.h:733
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
static void cleanup(void)
Definition: main.c:1335
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
Definition: proc.c:1227
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ProcessId
Definition: fatprocs.h:2712
Status
Definition: gdiplustypes.h:25
GLuint64EXT * result
Definition: glext.h:11304
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define PROCESS_VM_READ
Definition: pstypes.h:162
#define PROCESS_QUERY_INFORMATION
Definition: pstypes.h:167
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:71
#define UNICODE_NULL
NTSTATUS NTAPI NtQueryInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
Definition: query.c:59
#define L(x)
Definition: ntvdm.h:50
ULONG PerfDataGetProcessId(ULONG Index)
Definition: perfdata.c:495
#define CMD_LINE_MIN(a, b)
Definition: perfdata.c:38
struct _CMD_LINE_CACHE CMD_LINE_CACHE
LPWSTR str
Definition: perfdata.h:43
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
uint32_t ULONG_PTR
Definition: typedefs.h:65
_Inout_ PERBANDINFO * pbi
Definition: winddi.h:3917
_In_ int nMaxCount
Definition: winuser.h:4888
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetCommitChargeLimitK()

ULONG PerfDataGetCommitChargeLimitK ( void  )

Definition at line 942 of file perfdata.c.

943{
944 ULONG Limit;
945 ULONG PageSize;
946
948
950 PageSize = SystemBasicInfo.PageSize;
951
953
954 Limit = Limit * (PageSize / 1024);
955
956 return Limit;
957}
SYSTEM_BASIC_INFORMATION SystemBasicInfo
Definition: perfdata.c:30
SYSTEM_PERFORMANCE_INFORMATION SystemPerfInfo
Definition: perfdata.c:29
_In_ LONG _In_ LONG Limit
Definition: kefuncs.h:304

Referenced by Graph_DrawMemUsageGraph(), and PerformancePageRefreshThread().

◆ PerfDataGetCommitChargePeakK()

ULONG PerfDataGetCommitChargePeakK ( void  )

Definition at line 959 of file perfdata.c.

960{
961 ULONG Peak;
962 ULONG PageSize;
963
965
967 PageSize = SystemBasicInfo.PageSize;
968
970
971 Peak = Peak * (PageSize / 1024);
972
973 return Peak;
974}

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetCommitChargeTotalK()

ULONG PerfDataGetCommitChargeTotalK ( void  )

Definition at line 925 of file perfdata.c.

926{
927 ULONG Total;
928 ULONG PageSize;
929
931
933 PageSize = SystemBasicInfo.PageSize;
934
936
937 Total = Total * (PageSize / 1024);
938
939 return Total;
940}

Referenced by Graph_DrawMemUsageGraph(), and PerformancePageRefreshThread().

◆ PerfDataGetCPUTime()

LARGE_INTEGER PerfDataGetCPUTime ( ULONG  Index)

Definition at line 684 of file perfdata.c.

685{
686 LARGE_INTEGER CpuTime = {{0,0}};
687
689
690 if (Index < ProcessCount)
691 CpuTime = pPerfData[Index].CPUTime;
692
694
695 return CpuTime;
696}
LARGE_INTEGER CPUTime
Definition: perfdata.h:20

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetCPUUsage()

ULONG PerfDataGetCPUUsage ( ULONG  Index)

Definition at line 668 of file perfdata.c.

669{
670 ULONG CpuUsage;
671
673
674 if (Index < ProcessCount)
675 CpuUsage = pPerfData[Index].CPUUsage;
676 else
677 CpuUsage = 0;
678
680
681 return CpuUsage;
682}
ULONG CPUUsage
Definition: perfdata.h:19

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetGDIObjectCount()

ULONG PerfDataGetGDIObjectCount ( ULONG  Index)

Definition at line 890 of file perfdata.c.

891{
892 ULONG GDIObjectCount;
893
895
896 if (Index < ProcessCount)
897 GDIObjectCount = pPerfData[Index].GDIObjectCount;
898 else
899 GDIObjectCount = 0;
900
902
903 return GDIObjectCount;
904}
ULONG GDIObjectCount
Definition: perfdata.h:33

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetHandleCount()

ULONG PerfDataGetHandleCount ( ULONG  Index)

Definition at line 842 of file perfdata.c.

843{
844 ULONG HandleCount;
845
847
848 if (Index < ProcessCount)
849 HandleCount = pPerfData[Index].HandleCount;
850 else
851 HandleCount = 0;
852
854
855 return HandleCount;
856}
ULONG HandleCount
Definition: perfdata.h:30

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetImageName()

BOOL PerfDataGetImageName ( ULONG  Index,
LPWSTR  lpImageName,
ULONG  nMaxCount 
)

Definition at line 479 of file perfdata.c.

480{
481 BOOL bSuccessful;
482
484
485 if (Index < ProcessCount) {
486 wcsncpy(lpImageName, pPerfData[Index].ImageName, nMaxCount);
487 bSuccessful = TRUE;
488 } else {
489 bSuccessful = FALSE;
490 }
492 return bSuccessful;
493}
static const char * ImageName
Definition: image.c:34

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetIOCounters()

BOOL PerfDataGetIOCounters ( ULONG  Index,
PIO_COUNTERS  pIoCounters 
)

Definition at line 906 of file perfdata.c.

907{
908 BOOL bSuccessful;
909
911
912 if (Index < ProcessCount)
913 {
914 memcpy(pIoCounters, &pPerfData[Index].IOCounters, sizeof(IO_COUNTERS));
915 bSuccessful = TRUE;
916 }
917 else
918 bSuccessful = FALSE;
919
921
922 return bSuccessful;
923}
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetKernelMemoryNonPagedK()

ULONG PerfDataGetKernelMemoryNonPagedK ( void  )

Definition at line 1016 of file perfdata.c.

1017{
1018 ULONG NonPaged;
1019 ULONG PageSize;
1020
1022
1024 PageSize = SystemBasicInfo.PageSize;
1025
1027
1028 NonPaged = NonPaged * (PageSize / 1024);
1029
1030 return NonPaged;
1031}

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetKernelMemoryPagedK()

ULONG PerfDataGetKernelMemoryPagedK ( void  )

Definition at line 999 of file perfdata.c.

1000{
1001 ULONG Paged;
1002 ULONG PageSize;
1003
1005
1007 PageSize = SystemBasicInfo.PageSize;
1008
1010
1011 Paged = Paged * (PageSize / 1024);
1012
1013 return Paged;
1014}

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetKernelMemoryTotalK()

ULONG PerfDataGetKernelMemoryTotalK ( void  )

Definition at line 976 of file perfdata.c.

977{
978 ULONG Total;
979 ULONG Paged;
980 ULONG NonPaged;
981 ULONG PageSize;
982
984
987 PageSize = SystemBasicInfo.PageSize;
988
990
991 Paged = Paged * (PageSize / 1024);
992 NonPaged = NonPaged * (PageSize / 1024);
993
994 Total = Paged + NonPaged;
995
996 return Total;
997}

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetNonPagedPoolUsagePages()

ULONG PerfDataGetNonPagedPoolUsagePages ( ULONG  Index)

Definition at line 810 of file perfdata.c.

811{
812 ULONG NonPagedPoolUsage;
813
815
816 if (Index < ProcessCount)
817 NonPagedPoolUsage = pPerfData[Index].NonPagedPoolUsagePages;
818 else
819 NonPagedPoolUsage = 0;
820
822
823 return NonPagedPoolUsage;
824}
ULONG NonPagedPoolUsagePages
Definition: perfdata.h:28

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetPagedPoolUsagePages()

ULONG PerfDataGetPagedPoolUsagePages ( ULONG  Index)

Definition at line 794 of file perfdata.c.

795{
796 ULONG PagedPoolUsage;
797
799
800 if (Index < ProcessCount)
801 PagedPoolUsage = pPerfData[Index].PagedPoolUsagePages;
802 else
803 PagedPoolUsage = 0;
804
806
807 return PagedPoolUsage;
808}
ULONG PagedPoolUsagePages
Definition: perfdata.h:27

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetPageFaultCount()

ULONG PerfDataGetPageFaultCount ( ULONG  Index)

Definition at line 746 of file perfdata.c.

747{
748 ULONG PageFaultCount;
749
751
752 if (Index < ProcessCount)
753 PageFaultCount = pPerfData[Index].PageFaultCount;
754 else
755 PageFaultCount = 0;
756
758
759 return PageFaultCount;
760}
ULONG PageFaultCount
Definition: perfdata.h:24

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetPageFaultCountDelta()

ULONG PerfDataGetPageFaultCountDelta ( ULONG  Index)

Definition at line 762 of file perfdata.c.

763{
764 ULONG PageFaultCountDelta;
765
767
768 if (Index < ProcessCount)
769 PageFaultCountDelta = pPerfData[Index].PageFaultCountDelta;
770 else
771 PageFaultCountDelta = 0;
772
774
775 return PageFaultCountDelta;
776}
ULONG PageFaultCountDelta
Definition: perfdata.h:25

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetPeakWorkingSetSizeBytes()

ULONG PerfDataGetPeakWorkingSetSizeBytes ( ULONG  Index)

Definition at line 714 of file perfdata.c.

715{
716 ULONG PeakWorkingSetSizeBytes;
717
719
720 if (Index < ProcessCount)
721 PeakWorkingSetSizeBytes = pPerfData[Index].PeakWorkingSetSizeBytes;
722 else
723 PeakWorkingSetSizeBytes = 0;
724
726
727 return PeakWorkingSetSizeBytes;
728}
ULONG PeakWorkingSetSizeBytes
Definition: perfdata.h:22

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetPhysicalMemoryAvailableK()

ULONG PerfDataGetPhysicalMemoryAvailableK ( void  )

Definition at line 1050 of file perfdata.c.

1051{
1052 ULONG Available;
1053 ULONG PageSize;
1054
1056
1057 Available = SystemPerfInfo.AvailablePages;
1058 PageSize = SystemBasicInfo.PageSize;
1059
1061
1062 Available = Available * (PageSize / 1024);
1063
1064 return Available;
1065}

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetPhysicalMemorySystemCacheK()

ULONG PerfDataGetPhysicalMemorySystemCacheK ( void  )

Definition at line 1067 of file perfdata.c.

1068{
1069 ULONG SystemCache;
1070 ULONG PageSize;
1071
1073
1074 PageSize = SystemBasicInfo.PageSize;
1076
1078
1079 return SystemCache / 1024;
1080}
SYSTEM_FILECACHE_INFORMATION SystemCacheInfo
Definition: perfdata.c:31
SIZE_T CurrentSizeIncludingTransitionInPages
Definition: extypes.h:1133

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetPhysicalMemoryTotalK()

ULONG PerfDataGetPhysicalMemoryTotalK ( void  )

Definition at line 1033 of file perfdata.c.

1034{
1035 ULONG Total;
1036 ULONG PageSize;
1037
1039
1041 PageSize = SystemBasicInfo.PageSize;
1042
1044
1045 Total = Total * (PageSize / 1024);
1046
1047 return Total;
1048}

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetProcessCount()

ULONG PerfDataGetProcessCount ( void  )

Definition at line 452 of file perfdata.c.

453{
458 return Result;
459}
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409

Referenced by PerformancePageRefreshThread(), and UpdateProcesses().

◆ PerfDataGetProcessId()

ULONG PerfDataGetProcessId ( ULONG  Index)

Definition at line 495 of file perfdata.c.

496{
498
500
501 if (Index < ProcessCount)
503 else
504 ProcessId = 0;
505
507
508 return ProcessId;
509}
#define PtrToUlong(u)
Definition: config.h:107

Referenced by AddProcess(), PerfDataGetCommandLine(), and PerfDataGetText().

◆ PerfDataGetProcessIndex()

ULONG PerfDataGetProcessIndex ( ULONG  pid)

Definition at line 429 of file perfdata.c.

430{
431 ULONG idx;
432
434
435 for (idx = 0; idx < ProcessCount; idx++)
436 {
438 {
439 break;
440 }
441 }
442
444
445 if (idx == ProcessCount)
446 {
447 return -1;
448 }
449 return idx;
450}
unsigned int idx
Definition: utils.c:41
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3837

Referenced by ProcessPageCompareFunc(), and ProcessPageOnNotify().

◆ PerfDataGetProcessorSystemUsage()

ULONG PerfDataGetProcessorSystemUsage ( void  )

Definition at line 470 of file perfdata.c.

471{
474 Result = (ULONG)min(max(dbKernelTime, 0.), 100.);
476 return Result;
477}
#define min(a, b)
Definition: monoChain.cc:55
double dbKernelTime
Definition: perfdata.c:24
#define max(a, b)
Definition: svc.c:63

Referenced by Graph_DrawCpuUsageGraph(), and PerformancePageRefreshThread().

◆ PerfDataGetProcessorUsage()

ULONG PerfDataGetProcessorUsage ( void  )

◆ PerfDataGetSessionId()

ULONG PerfDataGetSessionId ( ULONG  Index)

Definition at line 652 of file perfdata.c.

653{
655
657
658 if (Index < ProcessCount)
660 else
661 SessionId = 0;
662
664
665 return SessionId;
666}
ULONG SessionId
Definition: dllmain.c:28
ULONG SessionId
Definition: perfdata.h:18

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetSystemHandleCount()

ULONG PerfDataGetSystemHandleCount ( void  )

Definition at line 1082 of file perfdata.c.

1083{
1084 ULONG HandleCount;
1085
1087
1088 HandleCount = SystemNumberOfHandles;
1089
1091
1092 return HandleCount;
1093}
ULONG SystemNumberOfHandles
Definition: perfdata.c:32

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetThreadCount()

ULONG PerfDataGetThreadCount ( ULONG  Index)

Definition at line 858 of file perfdata.c.

859{
860 ULONG ThreadCount;
861
863
864 if (Index < ProcessCount)
865 ThreadCount = pPerfData[Index].ThreadCount;
866 else
867 ThreadCount = 0;
868
870
871 return ThreadCount;
872}
ULONG ThreadCount
Definition: perfdata.h:31

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetTotalThreadCount()

ULONG PerfDataGetTotalThreadCount ( void  )

Definition at line 1095 of file perfdata.c.

1096{
1097 ULONG ThreadCount = 0;
1098 ULONG i;
1099
1101
1102 for (i=0; i<ProcessCount; i++)
1103 {
1104 ThreadCount += pPerfData[i].ThreadCount;
1105 }
1106
1108
1109 return ThreadCount;
1110}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetUserName()

BOOL PerfDataGetUserName ( ULONG  Index,
LPWSTR  lpUserName,
ULONG  nMaxCount 
)

Definition at line 511 of file perfdata.c.

512{
513 BOOL bSuccessful;
514
516
517 if (Index < ProcessCount) {
518 wcsncpy(lpUserName, pPerfData[Index].UserName, nMaxCount);
519 bSuccessful = TRUE;
520 } else {
521 bSuccessful = FALSE;
522 }
523
525
526 return bSuccessful;
527}

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetUSERObjectCount()

ULONG PerfDataGetUSERObjectCount ( ULONG  Index)

Definition at line 874 of file perfdata.c.

875{
876 ULONG USERObjectCount;
877
879
880 if (Index < ProcessCount)
881 USERObjectCount = pPerfData[Index].USERObjectCount;
882 else
883 USERObjectCount = 0;
884
886
887 return USERObjectCount;
888}
ULONG USERObjectCount
Definition: perfdata.h:32

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetVirtualMemorySizeBytes()

ULONG PerfDataGetVirtualMemorySizeBytes ( ULONG  Index)

Definition at line 778 of file perfdata.c.

779{
780 ULONG VirtualMemorySizeBytes;
781
783
784 if (Index < ProcessCount)
785 VirtualMemorySizeBytes = pPerfData[Index].VirtualMemorySizeBytes;
786 else
787 VirtualMemorySizeBytes = 0;
788
790
791 return VirtualMemorySizeBytes;
792}
ULONG VirtualMemorySizeBytes
Definition: perfdata.h:26

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetWorkingSetSizeBytes()

ULONG PerfDataGetWorkingSetSizeBytes ( ULONG  Index)

Definition at line 698 of file perfdata.c.

699{
700 ULONG WorkingSetSizeBytes;
701
703
704 if (Index < ProcessCount)
705 WorkingSetSizeBytes = pPerfData[Index].WorkingSetSizeBytes;
706 else
707 WorkingSetSizeBytes = 0;
708
710
711 return WorkingSetSizeBytes;
712}
ULONG WorkingSetSizeBytes
Definition: perfdata.h:21

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetWorkingSetSizeDelta()

ULONG PerfDataGetWorkingSetSizeDelta ( ULONG  Index)

Definition at line 730 of file perfdata.c.

731{
732 ULONG WorkingSetSizeDelta;
733
735
736 if (Index < ProcessCount)
737 WorkingSetSizeDelta = pPerfData[Index].WorkingSetSizeDelta;
738 else
739 WorkingSetSizeDelta = 0;
740
742
743 return WorkingSetSizeDelta;
744}
ULONG WorkingSetSizeDelta
Definition: perfdata.h:23

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataInitialize()

BOOL PerfDataInitialize ( void  )

Definition at line 49 of file perfdata.c.

50{
53
55
56 /*
57 * Get number of processors in the system
58 */
60 if (!NT_SUCCESS(status))
61 return FALSE;
62
63 /*
64 * Create the SYSTEM Sid
65 */
67 return TRUE;
68}
BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid)
Definition: security.c:674
@ SystemBasicInformation
Definition: ntddk_ex.h:11
PSID SystemUserSid
Definition: perfdata.c:34
static SID_IDENTIFIER_AUTHORITY NtSidAuthority
Definition: samrpc.c:14
NTSYSAPI NTSTATUS NTAPI NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)
Definition: ps.c:97
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
#define SECURITY_LOCAL_SYSTEM_RID
Definition: setypes.h:574
#define SECURITY_NT_AUTHORITY
Definition: setypes.h:554

Referenced by wWinMain().

◆ PerfDataRefresh()

void PerfDataRefresh ( void  )

Definition at line 158 of file perfdata.c.

159{
160 ULONG ulSize;
165 PPERFDATA pPDOld;
166 ULONG Idx, Idx2;
168 HANDLE hProcessToken;
171 SYSTEM_FILECACHE_INFORMATION SysCacheInfo;
172 SYSTEM_HANDLE_INFORMATION SysHandleInfoData;
174 double CurrentKernelTime;
175 PSECURITY_DESCRIPTOR ProcessSD;
176 PSID ProcessUser;
177 ULONG Buffer[64]; /* must be 4 bytes aligned! */
178 ULONG cwcUserName;
179 BOOL bIsWow64;
180
181 /* Get new system time */
182 status = NtQuerySystemInformation(SystemTimeOfDayInformation, &SysTimeInfo, sizeof(SysTimeInfo), NULL);
183 if (!NT_SUCCESS(status))
184 return;
185
186 /* Get new CPU's idle time */
187 status = NtQuerySystemInformation(SystemPerformanceInformation, &SysPerfInfo, sizeof(SysPerfInfo), NULL);
188 if (!NT_SUCCESS(status))
189 return;
190
191 /* Get system cache information */
192 status = NtQuerySystemInformation(SystemFileCacheInformation, &SysCacheInfo, sizeof(SysCacheInfo), NULL);
193 if (!NT_SUCCESS(status))
194 return;
195
196 /* Get processor time information */
199
200 if (!NT_SUCCESS(status))
201 {
202 if (SysProcessorTimeInfo != NULL)
203 HeapFree(GetProcessHeap(), 0, SysProcessorTimeInfo);
204 return;
205 }
206
207 /* Get handle information
208 * Number of handles is enough, no need for data array.
209 */
210 status = NtQuerySystemInformation(SystemHandleInformation, &SysHandleInfoData, sizeof(SysHandleInfoData), NULL);
211 /* On unexpected error, reuse previous value.
212 * STATUS_SUCCESS (0-1 handle) should never happen.
213 */
215 SysHandleInfoData.NumberOfHandles = SystemNumberOfHandles;
216
217 /* Get process information
218 * We don't know how much data there is so just keep
219 * increasing the buffer size until the call succeeds
220 */
221 BufferSize = 0;
222 do
223 {
224 BufferSize += 0x10000;
226
228
231 }
232
234
236
237 /*
238 * Save system performance info
239 */
241
242 /*
243 * Save system cache info
244 */
245 memcpy(&SystemCacheInfo, &SysCacheInfo, sizeof(SYSTEM_FILECACHE_INFORMATION));
246
247 /*
248 * Save system processor time info
249 */
252 }
253 SystemProcessorTimeInfo = SysProcessorTimeInfo;
254
255 /*
256 * Save system handle info
257 */
258 SystemNumberOfHandles = SysHandleInfoData.NumberOfHandles;
259
260 for (CurrentKernelTime=0, Idx=0; Idx<(ULONG)SystemBasicInfo.NumberOfProcessors; Idx++) {
261 CurrentKernelTime += Li2Double(SystemProcessorTimeInfo[Idx].KernelTime);
262 CurrentKernelTime += Li2Double(SystemProcessorTimeInfo[Idx].DpcTime);
263 CurrentKernelTime += Li2Double(SystemProcessorTimeInfo[Idx].InterruptTime);
264 }
265
266 /* If it's a first call - skip idle time calcs */
267 if (liOldIdleTime.QuadPart != 0) {
268 /* CurrentValue = NewValue - OldValue */
270 dbKernelTime = CurrentKernelTime - OldKernelTime;
272
273 /* CurrentCpuIdle = IdleTime / SystemTime */
276
277 /* CurrentCpuUsage% = 100 - (CurrentCpuIdle * 100) / NumberOfProcessors */
278 dbIdleTime = 100.0 - dbIdleTime * 100.0 / (double)SystemBasicInfo.NumberOfProcessors; /* + 0.5; */
279 dbKernelTime = 100.0 - dbKernelTime * 100.0 / (double)SystemBasicInfo.NumberOfProcessors; /* + 0.5; */
280 }
281
282 /* Store new CPU's idle and system time */
283 liOldIdleTime = SysPerfInfo.IdleProcessTime;
284 liOldSystemTime = SysTimeInfo.CurrentTime;
285 OldKernelTime = CurrentKernelTime;
286
287 /* Determine the process count
288 * We loop through the data we got from NtQuerySystemInformation
289 * and count how many structures there are (until RelativeOffset is 0)
290 */
292 ProcessCount = 0;
294 while (pSPI) {
295 ProcessCount++;
296 if (pSPI->NextEntryOffset == 0)
297 break;
298 pSPI = (PSYSTEM_PROCESS_INFORMATION)((LPBYTE)pSPI + pSPI->NextEntryOffset);
299 }
300
301 /* Now alloc a new PERFDATA array and fill in the data */
303
305 for (Idx=0; Idx<ProcessCount; Idx++) {
306 /* Get the old perf data for this process (if any) */
307 /* so that we can establish delta values */
308 pPDOld = NULL;
309 if (pPerfDataOld) {
310 for (Idx2=0; Idx2<ProcessCountOld; Idx2++) {
311 if (pPerfDataOld[Idx2].ProcessId == pSPI->UniqueProcessId) {
312 pPDOld = &pPerfDataOld[Idx2];
313 break;
314 }
315 }
316 }
317
318 if (pSPI->ImageName.Buffer) {
319 /* Don't assume a UNICODE_STRING Buffer is zero terminated: */
320 int len = pSPI->ImageName.Length / 2;
321 /* Check against max size and allow for terminating zero (already zeroed): */
322 if(len >= MAX_PATH)len=MAX_PATH - 1;
324 } else {
327 }
328
330
331 if (pPDOld) {
332 double CurTime = Li2Double(pSPI->KernelTime) + Li2Double(pSPI->UserTime);
333 double OldTime = Li2Double(pPDOld->KernelTime) + Li2Double(pPDOld->UserTime);
334 double CpuTime = (CurTime - OldTime) / dbSystemTime;
335 CpuTime = CpuTime * 100.0 / (double)SystemBasicInfo.NumberOfProcessors; /* + 0.5; */
336 pPerfData[Idx].CPUUsage = (ULONG)CpuTime;
337 }
341 if (pPDOld)
343 else
346 if (pPDOld)
348 else
354 pPerfData[Idx].HandleCount = pSPI->HandleCount;
356 pPerfData[Idx].SessionId = pSPI->SessionId;
358 pPerfData[Idx].USERObjectCount = 0;
359 pPerfData[Idx].GDIObjectCount = 0;
360 ProcessUser = SystemUserSid;
361 ProcessSD = NULL;
362
363 if (pSPI->UniqueProcessId != NULL) {
365 if (hProcess) {
366 /* don't query the information of the system process. It's possible but
367 returns Administrators as the owner of the process instead of SYSTEM */
368 if (pSPI->UniqueProcessId != (HANDLE)0x4)
369 {
370 if (OpenProcessToken(hProcess, TOKEN_QUERY, &hProcessToken))
371 {
372 DWORD RetLen = 0;
373 BOOL Ret;
374
375 Ret = GetTokenInformation(hProcessToken, TokenUser, (LPVOID)Buffer, sizeof(Buffer), &RetLen);
376 CloseHandle(hProcessToken);
377
378 if (Ret)
379 ProcessUser = ((PTOKEN_USER)Buffer)->User.Sid;
380 else
381 goto ReadProcOwner;
382 }
383 else
384 {
385ReadProcOwner:
387 }
388
389 pPerfData[Idx].USERObjectCount = GetGuiResources(hProcess, GR_USEROBJECTS);
390 pPerfData[Idx].GDIObjectCount = GetGuiResources(hProcess, GR_GDIOBJECTS);
391 }
392
393 if (IsWow64Process(hProcess, &bIsWow64) && bIsWow64)
394 {
395 wcscat(pPerfData[Idx].ImageName, L" *32");
396 }
397
398 GetProcessIoCounters(hProcess, &pPerfData[Idx].IOCounters);
400 } else {
401 goto ClearInfo;
402 }
403 } else {
404ClearInfo:
405 /* clear information we were unable to fetch */
406 ZeroMemory(&pPerfData[Idx].IOCounters, sizeof(IO_COUNTERS));
407 }
408
409 cwcUserName = _countof(pPerfData[0].UserName);
410 CachedGetUserFromSid(ProcessUser, pPerfData[Idx].UserName, &cwcUserName);
411
412 if (ProcessSD != NULL)
413 {
414 LocalFree((HLOCAL)ProcessSD);
415 }
416
419 pSPI = (PSYSTEM_PROCESS_INFORMATION)((LPBYTE)pSPI + pSPI->NextEntryOffset);
420 }
422 if (pPerfDataOld) {
424 }
427}
@ SE_KERNEL_OBJECT
Definition: accctrl.h:165
#define IDS_IDLE_PROCESS
Definition: resource.h:10
Definition: bufpool.h:45
wcscat
#define BufferSize
Definition: mmc.h:75
DWORD WINAPI GetSecurityInfo(HANDLE handle, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID *ppsidOwner, PSID *ppsidGroup, PACL *ppDacl, PACL *ppSacl, PSECURITY_DESCRIPTOR *ppSecurityDescriptor)
Definition: misc.c:1244
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
Definition: security.c:411
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
Definition: security.c:294
#define IsWow64Process
Definition: compat.h:760
#define MAX_PATH
Definition: compat.h:34
BOOL WINAPI GetProcessIoCounters(IN HANDLE hProcess, OUT PIO_COUNTERS lpIoCounters)
Definition: proc.c:1867
HINSTANCE hInst
Definition: dxdiag.c:13
unsigned long DWORD
Definition: ntddk_ex.h:95
@ SystemTimeOfDayInformation
Definition: ntddk_ex.h:14
@ SystemFileCacheInformation
Definition: ntddk_ex.h:32
@ SystemHandleInformation
Definition: ntddk_ex.h:27
@ SystemProcessInformation
Definition: ntddk_ex.h:16
@ SystemProcessorPerformanceInformation
Definition: ntddk_ex.h:19
GLenum GLsizei len
Definition: glext.h:6722
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
_Check_return_ long __cdecl labs(_In_ long x)
#define SystemPerformanceInformation
Definition: memtest.h:87
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
Definition: string.c:89
struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION * PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
struct _SYSTEM_PROCESS_INFORMATION * PSYSTEM_PROCESS_INFORMATION
#define READ_CONTROL
Definition: nt_native.h:58
EXTINLINE DWORD WINAPI GetGuiResources(HANDLE hProcess, DWORD uiFlags)
Definition: ntwrapper.h:64
long LONG
Definition: pedump.c:60
PPERFDATA pPerfDataOld
Definition: perfdata.c:19
PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION SystemProcessorTimeInfo
Definition: perfdata.c:33
ULONG ProcessCountOld
Definition: perfdata.c:21
double dbSystemTime
Definition: perfdata.c:25
LARGE_INTEGER liOldIdleTime
Definition: perfdata.c:26
double OldKernelTime
Definition: perfdata.c:27
LARGE_INTEGER liOldSystemTime
Definition: perfdata.c:28
VOID WINAPI CachedGetUserFromSid(PSID pSid, LPWSTR pUserName, PULONG pcwcUserName)
Definition: perfdata.c:112
#define Li2Double(x)
Definition: perfdata.h:11
struct _PERFDATA PERFDATA
struct _PERFDATA * PPERFDATA
PVOID pBuffer
#define _countof(array)
Definition: sndvol32.h:70
WCHAR UserName[MAX_PATH]
Definition: perfdata.h:17
LARGE_INTEGER UserTime
Definition: perfdata.h:36
LARGE_INTEGER KernelTime
Definition: perfdata.h:37
HANDLE ProcessId
Definition: perfdata.h:16
LARGE_INTEGER IdleProcessTime
Definition: memtest.h:11
LARGE_INTEGER UserTime
Definition: extypes.h:906
UNICODE_STRING ImageName
Definition: extypes.h:908
LARGE_INTEGER KernelTime
Definition: extypes.h:907
LARGE_INTEGER CurrentTime
Definition: extypes.h:864
unsigned char * LPBYTE
Definition: typedefs.h:53
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
LONGLONG QuadPart
Definition: typedefs.h:114
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
#define ZeroMemory
Definition: winbase.h:1743
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
struct _TOKEN_USER * PTOKEN_USER
#define TOKEN_QUERY
Definition: setypes.h:928
#define OWNER_SECURITY_INFORMATION
Definition: setypes.h:123
@ TokenUser
Definition: setypes.h:966

Referenced by _tmain(), OnCreate(), and TaskManagerWndProc().

◆ PerfDataUninitialize()

void PerfDataUninitialize ( void  )

Definition at line 70 of file perfdata.c.

71{
74
75 if (pPerfData != NULL)
77
79
80 if (SystemUserSid != NULL)
81 {
84 }
85
86 /* Free user names cache list */
88 while (pCur != &SidToUserNameHead)
89 {
91 pCur = pCur->Flink;
93 }
94
97 }
98}
PVOID WINAPI FreeSid(PSID pSid)
Definition: security.c:698
SINGLE_LIST_ENTRY * pCur
PLIST_ENTRY pEntry
Definition: fxioqueue.cpp:4484
static LIST_ENTRY SidToUserNameHead
Definition: perfdata.c:47
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)

Referenced by wWinMain().