ReactOS 0.4.15-dev-8222-g9164419
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 633 of file perfdata.c.

634{
635 PCMD_LINE_CACHE cache, pnext;
636
637 for (cache = global_cache; cache; cache = pnext)
638 {
639 pnext = cache->pnext;
641 }
642
644}
#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 1106 of file perfdata.c.

1107{
1108 BOOL bSuccessful = FALSE;
1109
1111 if (Index < ProcessCount)
1112 {
1113 *lppData = pPerfData + Index;
1114 bSuccessful = TRUE;
1115 }
1117 return bSuccessful;
1118}
#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 820 of file perfdata.c.

821{
822 ULONG BasePriority;
823
825
826 if (Index < ProcessCount)
827 BasePriority = pPerfData[Index].BasePriority;
828 else
829 BasePriority = 0;
830
832
833 return BasePriority;
834}
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 523 of file perfdata.c.

524{
525 static const LPWSTR ellipsis = L"...";
526
528 UNICODE_STRING CommandLineStr = {0};
529
530 PVOID ProcessParams = NULL;
533
535 BOOL result;
536
537 PCMD_LINE_CACHE new_entry;
538 LPWSTR new_string;
539
541
542 /* [A] Search for a string already in cache? If so, use it */
543 while (cache && cache->pnext != NULL)
544 {
545 if (cache->idx == Index && cache->str != NULL)
546 {
547 /* Found it. Use it, and add some ellipsis at the very end to make it cute */
548 wcsncpy(lpCommandLine, cache->str, CMD_LINE_MIN(nMaxCount, cache->len));
549 wcscpy(lpCommandLine + CMD_LINE_MIN(nMaxCount, cache->len) - wcslen(ellipsis), ellipsis);
550 return TRUE;
551 }
552
553 cache = cache->pnext;
554 }
555
556 /* [B] We don't; let's allocate and load a value from the process mem... and cache it */
558
559 /* Default blank command line in case things don't work out */
560 wcsncpy(lpCommandLine, L"", nMaxCount);
561
562 /* Ask for a handle to the target process so that we can read its memory and query stuff */
564 if (!hProcess)
565 goto cleanup;
566
567 /* First off, get the ProcessEnvironmentBlock location in that process' address space */
569 if (!NT_SUCCESS(Status))
570 goto cleanup;
571
572 /* Then get the PEB.ProcessParameters member pointer */
574 (PVOID)((ULONG_PTR)pbi.PebBaseAddress + FIELD_OFFSET(PEB, ProcessParameters)),
575 &ProcessParams,
576 sizeof(ProcessParams),
577 NULL);
578 if (!result)
579 goto cleanup;
580
581 /* Then copy the PEB->ProcessParameters.CommandLine member
582 to get the pointer to the string buffer and its size */
584 (PVOID)((ULONG_PTR)ProcessParams + FIELD_OFFSET(RTL_USER_PROCESS_PARAMETERS, CommandLine)),
585 &CommandLineStr,
586 sizeof(CommandLineStr),
587 NULL);
588 if (!result)
589 goto cleanup;
590
591 /* Allocate the next cache entry and its accompanying string in one go */
592 new_entry = HeapAlloc(GetProcessHeap(),
594 sizeof(CMD_LINE_CACHE) + CommandLineStr.Length + sizeof(UNICODE_NULL));
595 if (!new_entry)
596 goto cleanup;
597
598 new_string = (LPWSTR)((ULONG_PTR)new_entry + sizeof(CMD_LINE_CACHE));
599
600 /* Bingo, the command line should be stored there,
601 copy the string from the other process */
603 CommandLineStr.Buffer,
604 new_string,
605 CommandLineStr.Length,
606 NULL);
607 if (!result)
608 {
609 /* Weird, after successfully reading the mem of that process
610 various times it fails now, forget it and bail out */
611 HeapFree(GetProcessHeap(), 0, new_entry);
612 goto cleanup;
613 }
614
615 /* Add our pointer to the cache... */
616 new_entry->idx = Index;
617 new_entry->str = new_string;
618 new_entry->len = CommandLineStr.Length;
619
620 if (!global_cache)
621 global_cache = new_entry;
622 else
623 cache->pnext = new_entry;
624
625 /* ... and print the buffer for the first time */
626 wcsncpy(lpCommandLine, new_string, CMD_LINE_MIN(nMaxCount, CommandLineStr.Length));
627
628cleanup:
630 return TRUE;
631}
LONG NTSTATUS
Definition: precomp.h:26
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#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:2711
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:161
#define PROCESS_QUERY_INFORMATION
Definition: pstypes.h:166
_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:489
#define CMD_LINE_MIN(a, b)
Definition: perfdata.c:38
struct _CMD_LINE_CACHE CMD_LINE_CACHE
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
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:4877
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetCommitChargeLimitK()

ULONG PerfDataGetCommitChargeLimitK ( void  )

Definition at line 936 of file perfdata.c.

937{
938 ULONG Limit;
939 ULONG PageSize;
940
942
944 PageSize = SystemBasicInfo.PageSize;
945
947
948 Limit = Limit * (PageSize / 1024);
949
950 return Limit;
951}
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 953 of file perfdata.c.

954{
955 ULONG Peak;
956 ULONG PageSize;
957
959
961 PageSize = SystemBasicInfo.PageSize;
962
964
965 Peak = Peak * (PageSize / 1024);
966
967 return Peak;
968}

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetCommitChargeTotalK()

ULONG PerfDataGetCommitChargeTotalK ( void  )

Definition at line 919 of file perfdata.c.

920{
921 ULONG Total;
922 ULONG PageSize;
923
925
927 PageSize = SystemBasicInfo.PageSize;
928
930
931 Total = Total * (PageSize / 1024);
932
933 return Total;
934}

Referenced by Graph_DrawMemUsageGraph(), and PerformancePageRefreshThread().

◆ PerfDataGetCPUTime()

LARGE_INTEGER PerfDataGetCPUTime ( ULONG  Index)

Definition at line 678 of file perfdata.c.

679{
680 LARGE_INTEGER CpuTime = {{0,0}};
681
683
684 if (Index < ProcessCount)
685 CpuTime = pPerfData[Index].CPUTime;
686
688
689 return CpuTime;
690}
LARGE_INTEGER CPUTime
Definition: perfdata.h:20

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetCPUUsage()

ULONG PerfDataGetCPUUsage ( ULONG  Index)

Definition at line 662 of file perfdata.c.

663{
664 ULONG CpuUsage;
665
667
668 if (Index < ProcessCount)
669 CpuUsage = pPerfData[Index].CPUUsage;
670 else
671 CpuUsage = 0;
672
674
675 return CpuUsage;
676}
ULONG CPUUsage
Definition: perfdata.h:19

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetGDIObjectCount()

ULONG PerfDataGetGDIObjectCount ( ULONG  Index)

Definition at line 884 of file perfdata.c.

885{
886 ULONG GDIObjectCount;
887
889
890 if (Index < ProcessCount)
891 GDIObjectCount = pPerfData[Index].GDIObjectCount;
892 else
893 GDIObjectCount = 0;
894
896
897 return GDIObjectCount;
898}
ULONG GDIObjectCount
Definition: perfdata.h:33

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetHandleCount()

ULONG PerfDataGetHandleCount ( ULONG  Index)

Definition at line 836 of file perfdata.c.

837{
838 ULONG HandleCount;
839
841
842 if (Index < ProcessCount)
843 HandleCount = pPerfData[Index].HandleCount;
844 else
845 HandleCount = 0;
846
848
849 return HandleCount;
850}
ULONG HandleCount
Definition: perfdata.h:30

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetImageName()

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

Definition at line 473 of file perfdata.c.

474{
475 BOOL bSuccessful;
476
478
479 if (Index < ProcessCount) {
480 wcsncpy(lpImageName, pPerfData[Index].ImageName, nMaxCount);
481 bSuccessful = TRUE;
482 } else {
483 bSuccessful = FALSE;
484 }
486 return bSuccessful;
487}
static const char * ImageName
Definition: image.c:34

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetIOCounters()

BOOL PerfDataGetIOCounters ( ULONG  Index,
PIO_COUNTERS  pIoCounters 
)

Definition at line 900 of file perfdata.c.

901{
902 BOOL bSuccessful;
903
905
906 if (Index < ProcessCount)
907 {
908 memcpy(pIoCounters, &pPerfData[Index].IOCounters, sizeof(IO_COUNTERS));
909 bSuccessful = TRUE;
910 }
911 else
912 bSuccessful = FALSE;
913
915
916 return bSuccessful;
917}
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetKernelMemoryNonPagedK()

ULONG PerfDataGetKernelMemoryNonPagedK ( void  )

Definition at line 1010 of file perfdata.c.

1011{
1012 ULONG NonPaged;
1013 ULONG PageSize;
1014
1016
1018 PageSize = SystemBasicInfo.PageSize;
1019
1021
1022 NonPaged = NonPaged * (PageSize / 1024);
1023
1024 return NonPaged;
1025}

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetKernelMemoryPagedK()

ULONG PerfDataGetKernelMemoryPagedK ( void  )

Definition at line 993 of file perfdata.c.

994{
995 ULONG Paged;
996 ULONG PageSize;
997
999
1001 PageSize = SystemBasicInfo.PageSize;
1002
1004
1005 Paged = Paged * (PageSize / 1024);
1006
1007 return Paged;
1008}

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetKernelMemoryTotalK()

ULONG PerfDataGetKernelMemoryTotalK ( void  )

Definition at line 970 of file perfdata.c.

971{
972 ULONG Total;
973 ULONG Paged;
974 ULONG NonPaged;
975 ULONG PageSize;
976
978
981 PageSize = SystemBasicInfo.PageSize;
982
984
985 Paged = Paged * (PageSize / 1024);
986 NonPaged = NonPaged * (PageSize / 1024);
987
988 Total = Paged + NonPaged;
989
990 return Total;
991}

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetNonPagedPoolUsagePages()

ULONG PerfDataGetNonPagedPoolUsagePages ( ULONG  Index)

Definition at line 804 of file perfdata.c.

805{
806 ULONG NonPagedPoolUsage;
807
809
810 if (Index < ProcessCount)
811 NonPagedPoolUsage = pPerfData[Index].NonPagedPoolUsagePages;
812 else
813 NonPagedPoolUsage = 0;
814
816
817 return NonPagedPoolUsage;
818}
ULONG NonPagedPoolUsagePages
Definition: perfdata.h:28

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetPagedPoolUsagePages()

ULONG PerfDataGetPagedPoolUsagePages ( ULONG  Index)

Definition at line 788 of file perfdata.c.

789{
790 ULONG PagedPoolUsage;
791
793
794 if (Index < ProcessCount)
795 PagedPoolUsage = pPerfData[Index].PagedPoolUsagePages;
796 else
797 PagedPoolUsage = 0;
798
800
801 return PagedPoolUsage;
802}
ULONG PagedPoolUsagePages
Definition: perfdata.h:27

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetPageFaultCount()

ULONG PerfDataGetPageFaultCount ( ULONG  Index)

Definition at line 740 of file perfdata.c.

741{
742 ULONG PageFaultCount;
743
745
746 if (Index < ProcessCount)
747 PageFaultCount = pPerfData[Index].PageFaultCount;
748 else
749 PageFaultCount = 0;
750
752
753 return PageFaultCount;
754}
ULONG PageFaultCount
Definition: perfdata.h:24

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetPageFaultCountDelta()

ULONG PerfDataGetPageFaultCountDelta ( ULONG  Index)

Definition at line 756 of file perfdata.c.

757{
758 ULONG PageFaultCountDelta;
759
761
762 if (Index < ProcessCount)
763 PageFaultCountDelta = pPerfData[Index].PageFaultCountDelta;
764 else
765 PageFaultCountDelta = 0;
766
768
769 return PageFaultCountDelta;
770}
ULONG PageFaultCountDelta
Definition: perfdata.h:25

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetPeakWorkingSetSizeBytes()

ULONG PerfDataGetPeakWorkingSetSizeBytes ( ULONG  Index)

Definition at line 708 of file perfdata.c.

709{
710 ULONG PeakWorkingSetSizeBytes;
711
713
714 if (Index < ProcessCount)
715 PeakWorkingSetSizeBytes = pPerfData[Index].PeakWorkingSetSizeBytes;
716 else
717 PeakWorkingSetSizeBytes = 0;
718
720
721 return PeakWorkingSetSizeBytes;
722}
ULONG PeakWorkingSetSizeBytes
Definition: perfdata.h:22

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetPhysicalMemoryAvailableK()

ULONG PerfDataGetPhysicalMemoryAvailableK ( void  )

Definition at line 1044 of file perfdata.c.

1045{
1046 ULONG Available;
1047 ULONG PageSize;
1048
1050
1051 Available = SystemPerfInfo.AvailablePages;
1052 PageSize = SystemBasicInfo.PageSize;
1053
1055
1056 Available = Available * (PageSize / 1024);
1057
1058 return Available;
1059}

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetPhysicalMemorySystemCacheK()

ULONG PerfDataGetPhysicalMemorySystemCacheK ( void  )

Definition at line 1061 of file perfdata.c.

1062{
1063 ULONG SystemCache;
1064 ULONG PageSize;
1065
1067
1068 PageSize = SystemBasicInfo.PageSize;
1070
1072
1073 return SystemCache / 1024;
1074}
SYSTEM_FILECACHE_INFORMATION SystemCacheInfo
Definition: perfdata.c:31
SIZE_T CurrentSizeIncludingTransitionInPages
Definition: extypes.h:1127

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetPhysicalMemoryTotalK()

ULONG PerfDataGetPhysicalMemoryTotalK ( void  )

Definition at line 1027 of file perfdata.c.

1028{
1029 ULONG Total;
1030 ULONG PageSize;
1031
1033
1035 PageSize = SystemBasicInfo.PageSize;
1036
1038
1039 Total = Total * (PageSize / 1024);
1040
1041 return Total;
1042}

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetProcessCount()

ULONG PerfDataGetProcessCount ( void  )

Definition at line 446 of file perfdata.c.

447{
452 return Result;
453}
_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 489 of file perfdata.c.

490{
492
494
495 if (Index < ProcessCount)
497 else
498 ProcessId = 0;
499
501
502 return ProcessId;
503}
#define PtrToUlong(u)
Definition: config.h:107

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

◆ PerfDataGetProcessIndex()

ULONG PerfDataGetProcessIndex ( ULONG  pid)

Definition at line 423 of file perfdata.c.

424{
425 ULONG idx;
426
428
429 for (idx = 0; idx < ProcessCount; idx++)
430 {
432 {
433 break;
434 }
435 }
436
438
439 if (idx == ProcessCount)
440 {
441 return -1;
442 }
443 return idx;
444}
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 464 of file perfdata.c.

465{
468 Result = (ULONG)min(max(dbKernelTime, 0.), 100.);
470 return Result;
471}
#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 646 of file perfdata.c.

647{
649
651
652 if (Index < ProcessCount)
654 else
655 SessionId = 0;
656
658
659 return SessionId;
660}
ULONG SessionId
Definition: dllmain.c:28
ULONG SessionId
Definition: perfdata.h:18

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetSystemHandleCount()

ULONG PerfDataGetSystemHandleCount ( void  )

Definition at line 1076 of file perfdata.c.

1077{
1078 ULONG HandleCount;
1079
1081
1082 HandleCount = SystemNumberOfHandles;
1083
1085
1086 return HandleCount;
1087}
ULONG SystemNumberOfHandles
Definition: perfdata.c:32

Referenced by PerformancePageRefreshThread().

◆ PerfDataGetThreadCount()

ULONG PerfDataGetThreadCount ( ULONG  Index)

Definition at line 852 of file perfdata.c.

853{
854 ULONG ThreadCount;
855
857
858 if (Index < ProcessCount)
859 ThreadCount = pPerfData[Index].ThreadCount;
860 else
861 ThreadCount = 0;
862
864
865 return ThreadCount;
866}
ULONG ThreadCount
Definition: perfdata.h:31

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetTotalThreadCount()

ULONG PerfDataGetTotalThreadCount ( void  )

Definition at line 1089 of file perfdata.c.

1090{
1091 ULONG ThreadCount = 0;
1092 ULONG i;
1093
1095
1096 for (i=0; i<ProcessCount; i++)
1097 {
1098 ThreadCount += pPerfData[i].ThreadCount;
1099 }
1100
1102
1103 return ThreadCount;
1104}
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 505 of file perfdata.c.

506{
507 BOOL bSuccessful;
508
510
511 if (Index < ProcessCount) {
512 wcsncpy(lpUserName, pPerfData[Index].UserName, nMaxCount);
513 bSuccessful = TRUE;
514 } else {
515 bSuccessful = FALSE;
516 }
517
519
520 return bSuccessful;
521}

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetUSERObjectCount()

ULONG PerfDataGetUSERObjectCount ( ULONG  Index)

Definition at line 868 of file perfdata.c.

869{
870 ULONG USERObjectCount;
871
873
874 if (Index < ProcessCount)
875 USERObjectCount = pPerfData[Index].USERObjectCount;
876 else
877 USERObjectCount = 0;
878
880
881 return USERObjectCount;
882}
ULONG USERObjectCount
Definition: perfdata.h:32

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetVirtualMemorySizeBytes()

ULONG PerfDataGetVirtualMemorySizeBytes ( ULONG  Index)

Definition at line 772 of file perfdata.c.

773{
774 ULONG VirtualMemorySizeBytes;
775
777
778 if (Index < ProcessCount)
779 VirtualMemorySizeBytes = pPerfData[Index].VirtualMemorySizeBytes;
780 else
781 VirtualMemorySizeBytes = 0;
782
784
785 return VirtualMemorySizeBytes;
786}
ULONG VirtualMemorySizeBytes
Definition: perfdata.h:26

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetWorkingSetSizeBytes()

ULONG PerfDataGetWorkingSetSizeBytes ( ULONG  Index)

Definition at line 692 of file perfdata.c.

693{
694 ULONG WorkingSetSizeBytes;
695
697
698 if (Index < ProcessCount)
699 WorkingSetSizeBytes = pPerfData[Index].WorkingSetSizeBytes;
700 else
701 WorkingSetSizeBytes = 0;
702
704
705 return WorkingSetSizeBytes;
706}
ULONG WorkingSetSizeBytes
Definition: perfdata.h:21

Referenced by PerfDataGetText(), and ProcessPageCompareFunc().

◆ PerfDataGetWorkingSetSizeDelta()

ULONG PerfDataGetWorkingSetSizeDelta ( ULONG  Index)

Definition at line 724 of file perfdata.c.

725{
726 ULONG WorkingSetSizeDelta;
727
729
730 if (Index < ProcessCount)
731 WorkingSetSizeDelta = pPerfData[Index].WorkingSetSizeDelta;
732 else
733 WorkingSetSizeDelta = 0;
734
736
737 return WorkingSetSizeDelta;
738}
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
180 /* Get new system time */
181 status = NtQuerySystemInformation(SystemTimeOfDayInformation, &SysTimeInfo, sizeof(SysTimeInfo), NULL);
182 if (!NT_SUCCESS(status))
183 return;
184
185 /* Get new CPU's idle time */
186 status = NtQuerySystemInformation(SystemPerformanceInformation, &SysPerfInfo, sizeof(SysPerfInfo), NULL);
187 if (!NT_SUCCESS(status))
188 return;
189
190 /* Get system cache information */
191 status = NtQuerySystemInformation(SystemFileCacheInformation, &SysCacheInfo, sizeof(SysCacheInfo), NULL);
192 if (!NT_SUCCESS(status))
193 return;
194
195 /* Get processor time information */
198
199 if (!NT_SUCCESS(status))
200 {
201 if (SysProcessorTimeInfo != NULL)
202 HeapFree(GetProcessHeap(), 0, SysProcessorTimeInfo);
203 return;
204 }
205
206 /* Get handle information
207 * Number of handles is enough, no need for data array.
208 */
209 status = NtQuerySystemInformation(SystemHandleInformation, &SysHandleInfoData, sizeof(SysHandleInfoData), NULL);
210 /* On unexpected error, reuse previous value.
211 * STATUS_SUCCESS (0-1 handle) should never happen.
212 */
214 SysHandleInfoData.NumberOfHandles = SystemNumberOfHandles;
215
216 /* Get process information
217 * We don't know how much data there is so just keep
218 * increasing the buffer size until the call succeeds
219 */
220 BufferSize = 0;
221 do
222 {
223 BufferSize += 0x10000;
225
227
230 }
231
233
235
236 /*
237 * Save system performance info
238 */
240
241 /*
242 * Save system cache info
243 */
244 memcpy(&SystemCacheInfo, &SysCacheInfo, sizeof(SYSTEM_FILECACHE_INFORMATION));
245
246 /*
247 * Save system processor time info
248 */
251 }
252 SystemProcessorTimeInfo = SysProcessorTimeInfo;
253
254 /*
255 * Save system handle info
256 */
257 SystemNumberOfHandles = SysHandleInfoData.NumberOfHandles;
258
259 for (CurrentKernelTime=0, Idx=0; Idx<(ULONG)SystemBasicInfo.NumberOfProcessors; Idx++) {
260 CurrentKernelTime += Li2Double(SystemProcessorTimeInfo[Idx].KernelTime);
261 CurrentKernelTime += Li2Double(SystemProcessorTimeInfo[Idx].DpcTime);
262 CurrentKernelTime += Li2Double(SystemProcessorTimeInfo[Idx].InterruptTime);
263 }
264
265 /* If it's a first call - skip idle time calcs */
266 if (liOldIdleTime.QuadPart != 0) {
267 /* CurrentValue = NewValue - OldValue */
269 dbKernelTime = CurrentKernelTime - OldKernelTime;
271
272 /* CurrentCpuIdle = IdleTime / SystemTime */
275
276 /* CurrentCpuUsage% = 100 - (CurrentCpuIdle * 100) / NumberOfProcessors */
277 dbIdleTime = 100.0 - dbIdleTime * 100.0 / (double)SystemBasicInfo.NumberOfProcessors; /* + 0.5; */
278 dbKernelTime = 100.0 - dbKernelTime * 100.0 / (double)SystemBasicInfo.NumberOfProcessors; /* + 0.5; */
279 }
280
281 /* Store new CPU's idle and system time */
282 liOldIdleTime = SysPerfInfo.IdleProcessTime;
283 liOldSystemTime = SysTimeInfo.CurrentTime;
284 OldKernelTime = CurrentKernelTime;
285
286 /* Determine the process count
287 * We loop through the data we got from NtQuerySystemInformation
288 * and count how many structures there are (until RelativeOffset is 0)
289 */
291 ProcessCount = 0;
293 while (pSPI) {
294 ProcessCount++;
295 if (pSPI->NextEntryOffset == 0)
296 break;
297 pSPI = (PSYSTEM_PROCESS_INFORMATION)((LPBYTE)pSPI + pSPI->NextEntryOffset);
298 }
299
300 /* Now alloc a new PERFDATA array and fill in the data */
302
304 for (Idx=0; Idx<ProcessCount; Idx++) {
305 /* Get the old perf data for this process (if any) */
306 /* so that we can establish delta values */
307 pPDOld = NULL;
308 if (pPerfDataOld) {
309 for (Idx2=0; Idx2<ProcessCountOld; Idx2++) {
310 if (pPerfDataOld[Idx2].ProcessId == pSPI->UniqueProcessId) {
311 pPDOld = &pPerfDataOld[Idx2];
312 break;
313 }
314 }
315 }
316
317 if (pSPI->ImageName.Buffer) {
318 /* Don't assume a UNICODE_STRING Buffer is zero terminated: */
319 int len = pSPI->ImageName.Length / 2;
320 /* Check against max size and allow for terminating zero (already zeroed): */
321 if(len >= MAX_PATH)len=MAX_PATH - 1;
323 } else {
326 }
327
329
330 if (pPDOld) {
331 double CurTime = Li2Double(pSPI->KernelTime) + Li2Double(pSPI->UserTime);
332 double OldTime = Li2Double(pPDOld->KernelTime) + Li2Double(pPDOld->UserTime);
333 double CpuTime = (CurTime - OldTime) / dbSystemTime;
334 CpuTime = CpuTime * 100.0 / (double)SystemBasicInfo.NumberOfProcessors; /* + 0.5; */
335 pPerfData[Idx].CPUUsage = (ULONG)CpuTime;
336 }
340 if (pPDOld)
342 else
345 if (pPDOld)
347 else
353 pPerfData[Idx].HandleCount = pSPI->HandleCount;
355 pPerfData[Idx].SessionId = pSPI->SessionId;
357 pPerfData[Idx].USERObjectCount = 0;
358 pPerfData[Idx].GDIObjectCount = 0;
359 ProcessUser = SystemUserSid;
360 ProcessSD = NULL;
361
362 if (pSPI->UniqueProcessId != NULL) {
364 if (hProcess) {
365 /* don't query the information of the system process. It's possible but
366 returns Administrators as the owner of the process instead of SYSTEM */
367 if (pSPI->UniqueProcessId != (HANDLE)0x4)
368 {
369 if (OpenProcessToken(hProcess, TOKEN_QUERY, &hProcessToken))
370 {
371 DWORD RetLen = 0;
372 BOOL Ret;
373
374 Ret = GetTokenInformation(hProcessToken, TokenUser, (LPVOID)Buffer, sizeof(Buffer), &RetLen);
375 CloseHandle(hProcessToken);
376
377 if (Ret)
378 ProcessUser = ((PTOKEN_USER)Buffer)->User.Sid;
379 else
380 goto ReadProcOwner;
381 }
382 else
383 {
384ReadProcOwner:
386 }
387
388 pPerfData[Idx].USERObjectCount = GetGuiResources(hProcess, GR_USEROBJECTS);
389 pPerfData[Idx].GDIObjectCount = GetGuiResources(hProcess, GR_GDIOBJECTS);
390 }
391
392 GetProcessIoCounters(hProcess, &pPerfData[Idx].IOCounters);
394 } else {
395 goto ClearInfo;
396 }
397 } else {
398ClearInfo:
399 /* clear information we were unable to fetch */
400 ZeroMemory(&pPerfData[Idx].IOCounters, sizeof(IO_COUNTERS));
401 }
402
403 cwcUserName = _countof(pPerfData[0].UserName);
404 CachedGetUserFromSid(ProcessUser, pPerfData[Idx].UserName, &cwcUserName);
405
406 if (ProcessSD != NULL)
407 {
408 LocalFree((HLOCAL)ProcessSD);
409 }
410
413 pSPI = (PSYSTEM_PROCESS_INFORMATION)((LPBYTE)pSPI + pSPI->NextEntryOffset);
414 }
416 if (pPerfDataOld) {
418 }
421}
@ SE_KERNEL_OBJECT
Definition: accctrl.h:165
#define IDS_IDLE_PROCESS
Definition: resource.h:10
Definition: bufpool.h:45
#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 MAX_PATH
Definition: compat.h:34
BOOL WINAPI GetProcessIoCounters(IN HANDLE hProcess, OUT PIO_COUNTERS lpIoCounters)
Definition: proc.c:1861
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:80
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:900
UNICODE_STRING ImageName
Definition: extypes.h:902
LARGE_INTEGER KernelTime
Definition: extypes.h:901
LARGE_INTEGER CurrentTime
Definition: extypes.h:858
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:1712
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().