Retrieves the performance values contained in the
PERFORMANCE_INFORMATION structure.
Syntax
BOOL WINAPI GetPerformanceInfo(
__out PPERFORMANCE_INFORMATION pPerformanceInformation,
__in DWORD cb
);
Parameters
- pPerformanceInformation [out]
-
A pointer to a
PERFORMANCE_INFORMATION structure that receives the performance information.
- cb [in]
-
The size of the
PERFORMANCE_INFORMATION structure, in bytes.
Return Value
If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE. To get extended error information, call
GetLastError.
Remarks
Starting with PSAPI version 2 for Windows 7 and Windows Server 2008 R2, this function is defined as K32GetPerformanceInfo in Psapi.h and exported in Kernel32.lib and Kernel32.dll. However, you should always call this function as GetPerformanceInfo. To ensure correct resolution of symbols for programs that will run on earlier versions of Windows, add Psapi.lib to the TARGETLIBS macro and compile the program with –DPSAPI_VERSION=1.
Requirements
| Minimum supported client | Windows XP |
| Minimum supported server | Windows Server 2003 |
| Header | Psapi.h |
| Library | Kernel32.lib on Windows 7 and Windows Server 2008 R2, Psapi.lib on Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP/2000 |
| DLL | Kernel32.dll on Windows 7 and Windows Server 2008 R2, Psapi.dll on Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP/2000 |
See Also
- Memory Performance Information
- PERFORMANCE_INFORMATION
- PSAPI Functions
Send comments about this topic to Microsoft
Build date: 7/2/2009