EmptyWorkingSet function psapi

Win32Result<bool> EmptyWorkingSet(
  1. HANDLE hProcess
)

Removes as many pages as possible from the working set of the specified process.

To learn more, see learn.microsoft.com/windows/win32/api/psapi/nf-psapi-emptyworkingset.

Implementation

Win32Result<bool> EmptyWorkingSet(HANDLE hProcess) {
  resolveGetLastError();
  final result_ = _EmptyWorkingSet(hProcess);
  return .new(value: result_ != FALSE, error: GetLastError());
}