Partager via


PageOutModule (Compact 2013)

3/28/2014

This function swaps out all pages of a process or dynamically linked library (DLL) that are available for paging.

Syntax

BOOL PageOutModule(
  HANDLE hModule,
  DWORD dwFlags
);

Parameters

  • hModule
    [in] Handle to a process or a DLL.
  • dwFlags
    [in] Specifies the operation to be performed. The following table shows possible values.

    Value

    Description

    PAGE_OUT_ALL_DEPENDENT_DLL

    Page out the process and all dependent modules. This flag pages out modules that are used by other processes and adversely affects performance.

    PAGE_OUT_DLL_USED_ONLY_BY_THISPROC

    Page out the process and the dependent DLLs loaded by the process. This flag is ignored if hModule is a DLL.

    PAGE_OUT_PROCESS_ONLY

    Discard only pages belonging to the process or module.

Return Value

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError.

Remarks

This function is typically called by the shell, which can determine whether a particular process is inactive so that it can prerelease some of the memory held by the inactive process to improve performance. Call this function only when the system has been idle for a while. Otherwise, useful pages might be discarded and affect performance negatively.

Requirements

Header

pkfuncs.h

Library

coredll.lib

See Also

Reference

Kernel Functions