| psapi.h (6.1.7600.16385-Windows_7.0) | | psapi.h (6.3.9600.17415-Windows_8.1) |
| | |
| skipping to change at line 27 | | skipping to change at line 27 |
| Revision History: | | Revision History: |
| | |
| --*/ | | --*/ |
| | |
| #ifndef _PSAPI_H_ | | #ifndef _PSAPI_H_ |
| #define _PSAPI_H_ | | #define _PSAPI_H_ |
| | |
| #if _MSC_VER > 1000 | | #if _MSC_VER > 1000 |
| #pragma once | | #pragma once |
| #endif | | #endif |
|
| | #include <winapifamily.h> |
| | |
| | #pragma region Desktop Family |
| | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) |
| | |
| #ifdef __cplusplus | | #ifdef __cplusplus |
| extern "C" { | | extern "C" { |
| #endif | | #endif |
| | |
| #define LIST_MODULES_DEFAULT 0x0 // This is the default one app would get witho
ut any flag. | | #define LIST_MODULES_DEFAULT 0x0 // This is the default one app would get witho
ut any flag. |
| #define LIST_MODULES_32BIT 0x01 // list 32bit modules in the target process. | | #define LIST_MODULES_32BIT 0x01 // list 32bit modules in the target process. |
| #define LIST_MODULES_64BIT 0x02 // list all 64bit modules. 32bit exe will be
stripped off. | | #define LIST_MODULES_64BIT 0x02 // list all 64bit modules. 32bit exe will be
stripped off. |
| | |
| // list all the modules | | // list all the modules |
| | |
| skipping to change at line 85 | | skipping to change at line 89 |
| #define GetPerformanceInfo K32GetPerformanceInfo | | #define GetPerformanceInfo K32GetPerformanceInfo |
| #define EnumPageFilesW K32EnumPageFilesW | | #define EnumPageFilesW K32EnumPageFilesW |
| #define EnumPageFilesA K32EnumPageFilesA | | #define EnumPageFilesA K32EnumPageFilesA |
| #define GetProcessImageFileNameA K32GetProcessImageFileNameA | | #define GetProcessImageFileNameA K32GetProcessImageFileNameA |
| #define GetProcessImageFileNameW K32GetProcessImageFileNameW | | #define GetProcessImageFileNameW K32GetProcessImageFileNameW |
| #endif | | #endif |
| | |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| EnumProcesses ( | | EnumProcesses ( |
|
| __out_bcount(cb) DWORD * lpidProcess, | | _Out_writes_bytes_(cb) DWORD * lpidProcess, |
| __in DWORD cb, | | _In_ DWORD cb, |
| __out LPDWORD lpcbNeeded | | _Out_ LPDWORD lpcbNeeded |
| ); | | ); |
| | |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| EnumProcessModules( | | EnumProcessModules( |
|
| __in HANDLE hProcess, | | _In_ HANDLE hProcess, |
| __out_bcount(cb) HMODULE *lphModule, | | _Out_writes_bytes_(cb) HMODULE *lphModule, |
| __in DWORD cb, | | _In_ DWORD cb, |
| __out LPDWORD lpcbNeeded | | _Out_ LPDWORD lpcbNeeded |
| ); | | ); |
| | |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| EnumProcessModulesEx( | | EnumProcessModulesEx( |
|
| __in HANDLE hProcess, | | _In_ HANDLE hProcess, |
| __out_bcount(cb) HMODULE *lphModule, | | _Out_writes_bytes_(cb) HMODULE *lphModule, |
| __in DWORD cb, | | _In_ DWORD cb, |
| __out LPDWORD lpcbNeeded, | | _Out_ LPDWORD lpcbNeeded, |
| __in DWORD dwFilterFlag | | _In_ DWORD dwFilterFlag |
| ); | | ); |
| | |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| GetModuleBaseNameA( | | GetModuleBaseNameA( |
|
| __in HANDLE hProcess, | | _In_ HANDLE hProcess, |
| __in_opt HMODULE hModule, | | _In_opt_ HMODULE hModule, |
| __out_ecount(nSize) LPSTR lpBaseName, | | _Out_writes_(nSize) LPSTR lpBaseName, |
| __in DWORD nSize | | _In_ DWORD nSize |
| ); | | ); |
| | |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| GetModuleBaseNameW( | | GetModuleBaseNameW( |
|
| __in HANDLE hProcess, | | _In_ HANDLE hProcess, |
| __in_opt HMODULE hModule, | | _In_opt_ HMODULE hModule, |
| __out_ecount(nSize) LPWSTR lpBaseName, | | _Out_writes_(nSize) LPWSTR lpBaseName, |
| __in DWORD nSize | | _In_ DWORD nSize |
| ); | | ); |
| | |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define GetModuleBaseName GetModuleBaseNameW | | #define GetModuleBaseName GetModuleBaseNameW |
| #else | | #else |
| #define GetModuleBaseName GetModuleBaseNameA | | #define GetModuleBaseName GetModuleBaseNameA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
|
| | _Success_(return != 0) |
| | _Ret_range_(1, nSize) |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| GetModuleFileNameExA( | | GetModuleFileNameExA( |
|
| __in HANDLE hProcess, | | _In_opt_ HANDLE hProcess, |
| __in_opt HMODULE hModule, | | _In_opt_ HMODULE hModule, |
| __out_ecount(nSize) LPSTR lpFilename, | | _When_(return < nSize, _Out_writes_to_(nSize, return + 1)) |
| __in DWORD nSize | | _When_(return == nSize, _Out_writes_all_(nSize)) |
| | LPSTR lpFilename, |
| | _In_ DWORD nSize |
| ); | | ); |
| | |
|
| | _Success_(return != 0) |
| | _Ret_range_(1, nSize) |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| GetModuleFileNameExW( | | GetModuleFileNameExW( |
|
| __in HANDLE hProcess, | | _In_opt_ HANDLE hProcess, |
| __in_opt HMODULE hModule, | | _In_opt_ HMODULE hModule, |
| __out_ecount(nSize) LPWSTR lpFilename, | | _When_(return < nSize, _Out_writes_to_(nSize, return + 1)) |
| __in DWORD nSize | | _When_(return == nSize, _Out_writes_all_(nSize)) |
| | LPWSTR lpFilename, |
| | _In_ DWORD nSize |
| ); | | ); |
| | |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define GetModuleFileNameEx GetModuleFileNameExW | | #define GetModuleFileNameEx GetModuleFileNameExW |
| #else | | #else |
| #define GetModuleFileNameEx GetModuleFileNameExA | | #define GetModuleFileNameEx GetModuleFileNameExA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| typedef struct _MODULEINFO { | | typedef struct _MODULEINFO { |
| LPVOID lpBaseOfDll; | | LPVOID lpBaseOfDll; |
| DWORD SizeOfImage; | | DWORD SizeOfImage; |
| LPVOID EntryPoint; | | LPVOID EntryPoint; |
| } MODULEINFO, *LPMODULEINFO; | | } MODULEINFO, *LPMODULEINFO; |
| | |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetModuleInformation( | | GetModuleInformation( |
|
| __in HANDLE hProcess, | | _In_ HANDLE hProcess, |
| __in HMODULE hModule, | | _In_ HMODULE hModule, |
| __out LPMODULEINFO lpmodinfo, | | _Out_ LPMODULEINFO lpmodinfo, |
| __in DWORD cb | | _In_ DWORD cb |
| ); | | ); |
| | |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| EmptyWorkingSet( | | EmptyWorkingSet( |
|
| __in HANDLE hProcess | | _In_ HANDLE hProcess |
| ); | | ); |
| | |
| // | | // |
| // Working set information structures. All non-specified bits are reserved. | | // Working set information structures. All non-specified bits are reserved. |
| // | | // |
| | |
| #if _MSC_VER >= 1200 | | #if _MSC_VER >= 1200 |
| #pragma warning(push) | | #pragma warning(push) |
| #endif | | #endif |
| #pragma warning(disable:4201) // unnamed struct | | #pragma warning(disable:4201) // unnamed struct |
| | |
| skipping to change at line 210 | | skipping to change at line 222 |
| }; | | }; |
| } PSAPI_WORKING_SET_BLOCK, *PPSAPI_WORKING_SET_BLOCK; | | } PSAPI_WORKING_SET_BLOCK, *PPSAPI_WORKING_SET_BLOCK; |
| | |
| typedef struct _PSAPI_WORKING_SET_INFORMATION { | | typedef struct _PSAPI_WORKING_SET_INFORMATION { |
| ULONG_PTR NumberOfEntries; | | ULONG_PTR NumberOfEntries; |
| PSAPI_WORKING_SET_BLOCK WorkingSetInfo[1]; | | PSAPI_WORKING_SET_BLOCK WorkingSetInfo[1]; |
| } PSAPI_WORKING_SET_INFORMATION, *PPSAPI_WORKING_SET_INFORMATION; | | } PSAPI_WORKING_SET_INFORMATION, *PPSAPI_WORKING_SET_INFORMATION; |
| | |
| typedef union _PSAPI_WORKING_SET_EX_BLOCK { | | typedef union _PSAPI_WORKING_SET_EX_BLOCK { |
| ULONG_PTR Flags; | | ULONG_PTR Flags; |
|
| struct { | | union { |
| ULONG_PTR Valid : 1; // The following fields are valid only if th | | struct { |
| is bit is set | | ULONG_PTR Valid : 1; |
| ULONG_PTR ShareCount : 3; | | ULONG_PTR ShareCount : 3; |
| ULONG_PTR Win32Protection : 11; | | ULONG_PTR Win32Protection : 11; |
| ULONG_PTR Shared : 1; | | ULONG_PTR Shared : 1; |
| ULONG_PTR Node : 6; | | ULONG_PTR Node : 6; |
| ULONG_PTR Locked : 1; | | ULONG_PTR Locked : 1; |
| ULONG_PTR LargePage : 1; | | ULONG_PTR LargePage : 1; |
| | ULONG_PTR Reserved : 7; |
| | ULONG_PTR Bad : 1; |
| | |
| | #if defined(_WIN64) |
| | ULONG_PTR ReservedUlong : 32; |
| | #endif |
| | }; |
| | struct { |
| | ULONG_PTR Valid : 1; // Valid = 0 in this format. |
| | ULONG_PTR Reserved0 : 14; |
| | ULONG_PTR Shared : 1; |
| | ULONG_PTR Reserved1 : 15; |
| | ULONG_PTR Bad : 1; |
| | |
| | #if defined(_WIN64) |
| | ULONG_PTR ReservedUlong : 32; |
| | #endif |
| | } Invalid; |
| }; | | }; |
| } PSAPI_WORKING_SET_EX_BLOCK, *PPSAPI_WORKING_SET_EX_BLOCK; | | } PSAPI_WORKING_SET_EX_BLOCK, *PPSAPI_WORKING_SET_EX_BLOCK; |
| | |
| typedef struct _PSAPI_WORKING_SET_EX_INFORMATION { | | typedef struct _PSAPI_WORKING_SET_EX_INFORMATION { |
| PVOID VirtualAddress; | | PVOID VirtualAddress; |
| PSAPI_WORKING_SET_EX_BLOCK VirtualAttributes; | | PSAPI_WORKING_SET_EX_BLOCK VirtualAttributes; |
| } PSAPI_WORKING_SET_EX_INFORMATION, *PPSAPI_WORKING_SET_EX_INFORMATION; | | } PSAPI_WORKING_SET_EX_INFORMATION, *PPSAPI_WORKING_SET_EX_INFORMATION; |
| | |
| #if _MSC_VER >= 1200 | | #if _MSC_VER >= 1200 |
| #pragma warning(pop) | | #pragma warning(pop) |
| #else | | #else |
| #pragma warning(default:4214) | | #pragma warning(default:4214) |
| #pragma warning(default:4201) | | #pragma warning(default:4201) |
| #endif | | #endif |
| | |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| QueryWorkingSet( | | QueryWorkingSet( |
|
| __in HANDLE hProcess, | | _In_ HANDLE hProcess, |
| __out_bcount(cb) PVOID pv, | | _Out_writes_bytes_(cb) PVOID pv, |
| __in DWORD cb | | _In_ DWORD cb |
| ); | | ); |
| | |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| QueryWorkingSetEx( | | QueryWorkingSetEx( |
|
| __in HANDLE hProcess, | | _In_ HANDLE hProcess, |
| __out_bcount(cb) PVOID pv, | | _Out_writes_bytes_(cb) PVOID pv, |
| __in DWORD cb | | _In_ DWORD cb |
| ); | | ); |
| | |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| InitializeProcessForWsWatch( | | InitializeProcessForWsWatch( |
|
| __in HANDLE hProcess | | _In_ HANDLE hProcess |
| ); | | ); |
| | |
| typedef struct _PSAPI_WS_WATCH_INFORMATION { | | typedef struct _PSAPI_WS_WATCH_INFORMATION { |
| LPVOID FaultingPc; | | LPVOID FaultingPc; |
| LPVOID FaultingVa; | | LPVOID FaultingVa; |
| } PSAPI_WS_WATCH_INFORMATION, *PPSAPI_WS_WATCH_INFORMATION; | | } PSAPI_WS_WATCH_INFORMATION, *PPSAPI_WS_WATCH_INFORMATION; |
| | |
| typedef struct _PSAPI_WS_WATCH_INFORMATION_EX { | | typedef struct _PSAPI_WS_WATCH_INFORMATION_EX { |
| PSAPI_WS_WATCH_INFORMATION BasicInfo; | | PSAPI_WS_WATCH_INFORMATION BasicInfo; |
| ULONG_PTR FaultingThreadId; | | ULONG_PTR FaultingThreadId; |
| ULONG_PTR Flags; // Reserved | | ULONG_PTR Flags; // Reserved |
| } PSAPI_WS_WATCH_INFORMATION_EX, *PPSAPI_WS_WATCH_INFORMATION_EX; | | } PSAPI_WS_WATCH_INFORMATION_EX, *PPSAPI_WS_WATCH_INFORMATION_EX; |
| | |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetWsChanges( | | GetWsChanges( |
|
| __in HANDLE hProcess, | | _In_ HANDLE hProcess, |
| __out_bcount(cb) PPSAPI_WS_WATCH_INFORMATION lpWatchInfo, | | _Out_writes_bytes_(cb) PPSAPI_WS_WATCH_INFORMATION lpWatchInfo, |
| __in DWORD cb | | _In_ DWORD cb |
| ); | | ); |
| | |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetWsChangesEx( | | GetWsChangesEx( |
|
| __in HANDLE hProcess, | | _In_ HANDLE hProcess, |
| __out_bcount_part(*cb, *cb) PPSAPI_WS_WATCH_INFORMATION_EX lpWatchInfoEx, | | _Out_writes_bytes_to_(*cb, *cb) PPSAPI_WS_WATCH_INFORMATION_EX lpWatchInfoEx |
| __inout PDWORD cb | | , |
| | _Inout_ PDWORD cb |
| ); | | ); |
| | |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| GetMappedFileNameW ( | | GetMappedFileNameW ( |
|
| __in HANDLE hProcess, | | _In_ HANDLE hProcess, |
| __in LPVOID lpv, | | _In_ LPVOID lpv, |
| __out_ecount(nSize) LPWSTR lpFilename, | | _Out_writes_(nSize) LPWSTR lpFilename, |
| __in DWORD nSize | | _In_ DWORD nSize |
| ); | | ); |
| | |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| GetMappedFileNameA ( | | GetMappedFileNameA ( |
|
| __in HANDLE hProcess, | | _In_ HANDLE hProcess, |
| __in LPVOID lpv, | | _In_ LPVOID lpv, |
| __out_ecount(nSize) LPSTR lpFilename, | | _Out_writes_(nSize) LPSTR lpFilename, |
| __in DWORD nSize | | _In_ DWORD nSize |
| ); | | ); |
| | |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define GetMappedFileName GetMappedFileNameW | | #define GetMappedFileName GetMappedFileNameW |
| #else | | #else |
| #define GetMappedFileName GetMappedFileNameA | | #define GetMappedFileName GetMappedFileNameA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| EnumDeviceDrivers ( | | EnumDeviceDrivers ( |
|
| __out_bcount(cb) LPVOID *lpImageBase, | | _Out_writes_bytes_(cb) LPVOID *lpImageBase, |
| __in DWORD cb, | | _In_ DWORD cb, |
| __out LPDWORD lpcbNeeded | | _Out_ LPDWORD lpcbNeeded |
| ); | | ); |
| | |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| GetDeviceDriverBaseNameA ( | | GetDeviceDriverBaseNameA ( |
|
| __in LPVOID ImageBase, | | _In_ LPVOID ImageBase, |
| __out_ecount(nSize) LPSTR lpFilename, | | _Out_writes_(nSize) LPSTR lpFilename, |
| __in DWORD nSize | | _In_ DWORD nSize |
| ); | | ); |
| | |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| GetDeviceDriverBaseNameW ( | | GetDeviceDriverBaseNameW ( |
|
| __in LPVOID ImageBase, | | _In_ LPVOID ImageBase, |
| __out_ecount(nSize) LPWSTR lpBaseName, | | _Out_writes_(nSize) LPWSTR lpBaseName, |
| __in DWORD nSize | | _In_ DWORD nSize |
| ); | | ); |
| | |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define GetDeviceDriverBaseName GetDeviceDriverBaseNameW | | #define GetDeviceDriverBaseName GetDeviceDriverBaseNameW |
| #else | | #else |
| #define GetDeviceDriverBaseName GetDeviceDriverBaseNameA | | #define GetDeviceDriverBaseName GetDeviceDriverBaseNameA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| GetDeviceDriverFileNameA ( | | GetDeviceDriverFileNameA ( |
|
| __in LPVOID ImageBase, | | _In_ LPVOID ImageBase, |
| __out_ecount(nSize) LPSTR lpFilename, | | _Out_writes_(nSize) LPSTR lpFilename, |
| __in DWORD nSize | | _In_ DWORD nSize |
| ); | | ); |
| | |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| GetDeviceDriverFileNameW ( | | GetDeviceDriverFileNameW ( |
|
| __in LPVOID ImageBase, | | _In_ LPVOID ImageBase, |
| __out_ecount(nSize) LPWSTR lpFilename, | | _Out_writes_(nSize) LPWSTR lpFilename, |
| __in DWORD nSize | | _In_ DWORD nSize |
| ); | | ); |
| | |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define GetDeviceDriverFileName GetDeviceDriverFileNameW | | #define GetDeviceDriverFileName GetDeviceDriverFileNameW |
| #else | | #else |
| #define GetDeviceDriverFileName GetDeviceDriverFileNameA | | #define GetDeviceDriverFileName GetDeviceDriverFileNameA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| // Structure for GetProcessMemoryInfo() | | // Structure for GetProcessMemoryInfo() |
| | |
| | |
| skipping to change at line 462 | | skipping to change at line 493 |
| #define PENUM_PAGE_FILE_CALLBACK PENUM_PAGE_FILE_CALLBACKW | | #define PENUM_PAGE_FILE_CALLBACK PENUM_PAGE_FILE_CALLBACKW |
| #define EnumPageFiles EnumPageFilesW | | #define EnumPageFiles EnumPageFilesW |
| #else | | #else |
| #define PENUM_PAGE_FILE_CALLBACK PENUM_PAGE_FILE_CALLBACKA | | #define PENUM_PAGE_FILE_CALLBACK PENUM_PAGE_FILE_CALLBACKA |
| #define EnumPageFiles EnumPageFilesA | | #define EnumPageFiles EnumPageFilesA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| GetProcessImageFileNameA ( | | GetProcessImageFileNameA ( |
|
| __in HANDLE hProcess, | | _In_ HANDLE hProcess, |
| __out_ecount(nSize) LPSTR lpImageFileName, | | _Out_writes_(nSize) LPSTR lpImageFileName, |
| __in DWORD nSize | | _In_ DWORD nSize |
| ); | | ); |
| | |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| GetProcessImageFileNameW ( | | GetProcessImageFileNameW ( |
|
| __in HANDLE hProcess, | | _In_ HANDLE hProcess, |
| __out_ecount(nSize) LPWSTR lpImageFileName, | | _Out_writes_(nSize) LPWSTR lpImageFileName, |
| __in DWORD nSize | | _In_ DWORD nSize |
| ); | | ); |
| | |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define GetProcessImageFileName GetProcessImageFileNameW | | #define GetProcessImageFileName GetProcessImageFileNameW |
| #else | | #else |
| #define GetProcessImageFileName GetProcessImageFileNameA | | #define GetProcessImageFileName GetProcessImageFileNameA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| #ifdef __cplusplus | | #ifdef __cplusplus |
| } | | } |
| #endif | | #endif |
| | |
|
| | #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ |
| | #pragma endregion |
| | |
| #endif | | #endif |
| | |
| End of changes. 28 change blocks. |
| 84 lines changed or deleted | | 118 lines changed or added |
|