Re: [Mingw-w64-public] [PATCH 2/2] psapi.h: Added sipport for PSAPI_VERSION 2.
Patch is ok. Thanks, Kai 2017-01-30 14:29 GMT+01:00 Jacek Caban: > --- > mingw-w64-headers/include/psapi.h | 38 > ++ > 1 file changed, 38 insertions(+) > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > ___ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] [PATCH 2/2] psapi.h: Added sipport for PSAPI_VERSION 2.
--- mingw-w64-headers/include/psapi.h | 38 ++ 1 file changed, 38 insertions(+) diff --git a/mingw-w64-headers/include/psapi.h b/mingw-w64-headers/include/psapi.h index f3f5220..4b17dd6 100644 --- a/mingw-w64-headers/include/psapi.h +++ b/mingw-w64-headers/include/psapi.h @@ -12,6 +12,44 @@ extern "C" { #endif +#ifndef PSAPI_VERSION +#if NTDDI_VERSION >= NTDDI_WIN7 +#define PSAPI_VERSION 2 +#else +#define PSAPI_VERSION 1 +#endif +#endif + +#if PSAPI_VERSION > 1 +#define EnumProcesses K32EnumProcesses +#define EnumProcessModules K32EnumProcessModules +#define EnumProcessModulesExK32EnumProcessModulesEx +#define GetModuleBaseNameA K32GetModuleBaseNameA +#define GetModuleBaseNameW K32GetModuleBaseNameW +#define GetModuleFileNameExAK32GetModuleFileNameExA +#define GetModuleFileNameExWK32GetModuleFileNameExW +#define GetModuleInformationK32GetModuleInformation +#define EmptyWorkingSet K32EmptyWorkingSet +#define QueryWorkingSet K32QueryWorkingSet +#define QueryWorkingSetEx K32QueryWorkingSetEx +#define InitializeProcessForWsWatch K32InitializeProcessForWsWatch +#define GetWsChangesK32GetWsChanges +#define GetWsChangesEx K32GetWsChangesEx +#define GetMappedFileNameW K32GetMappedFileNameW +#define GetMappedFileNameA K32GetMappedFileNameA +#define EnumDeviceDrivers K32EnumDeviceDrivers +#define GetDeviceDriverBaseNameAK32GetDeviceDriverBaseNameA +#define GetDeviceDriverBaseNameWK32GetDeviceDriverBaseNameW +#define GetDeviceDriverFileNameAK32GetDeviceDriverFileNameA +#define GetDeviceDriverFileNameWK32GetDeviceDriverFileNameW +#define GetProcessMemoryInfoK32GetProcessMemoryInfo +#define GetPerformanceInfo K32GetPerformanceInfo +#define EnumPageFilesW K32EnumPageFilesW +#define EnumPageFilesA K32EnumPageFilesA +#define GetProcessImageFileNameAK32GetProcessImageFileNameA +#define GetProcessImageFileNameWK32GetProcessImageFileNameW +#endif + #define GetModuleBaseName __MINGW_NAME_AW(GetModuleBaseName) #define GetModuleFileNameEx __MINGW_NAME_AW(GetModuleFileNameEx) #define GetMappedFileName __MINGW_NAME_AW(GetMappedFileName) -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public