EnumPageFiles function psapi

Win32Result<bool> EnumPageFiles(
  1. Pointer<NativeFunction<PENUM_PAGE_FILE_CALLBACK>> pCallBackRoutine,
  2. Pointer<NativeType> pContext
)

Calls the callback routine for each installed pagefile in the system.

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

Implementation

Win32Result<bool> EnumPageFiles(
  Pointer<NativeFunction<PENUM_PAGE_FILE_CALLBACK>> pCallBackRoutine,
  Pointer pContext,
) {
  final result_ = EnumPageFilesW_Wrapper(pCallBackRoutine, pContext);
  return .new(value: result_.value.i32 != FALSE, error: result_.error);
}