Removes as many pages as possible from the working set of the specified process.
Syntax
BOOL WINAPI EmptyWorkingSet(
__in HANDLE hProcess
);
Parameters
- hProcess [in]
-
A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION and PROCESS_SET_INFORMATION access rights. For more information, see Process Security and Access Rights.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call
GetLastError.
Remarks
You can also empty the working set by calling the SetProcessWorkingSetSize or SetProcessWorkingSetSizeEx function with the dwMinimumWorkingSetSize and dwMaximumWorkingSetSize parameters set to the value (SIZE_T)–1.
Requirements
| Minimum supported client | Windows 2000 Professional |
| Minimum supported server | Windows 2000 Server |
| Header | Psapi.h |
| Library | Psapi.lib |
| DLL | Psapi.dll |
See Also
EnumProcesses
PSAPI Functions
SetProcessWorkingSetSize
Working Set
Working Set Information
Send comments about this topic to Microsoft
Build date: 11/6/2008