RegisterBadMemoryNotification function (memoryapi.h)

Registers a bad memory notification that is called when one or more bad memory pages are detected and the system cannot remove at least one of them (for example if the pages contains modified data that has not yet been written to the pagefile.)

Syntax

PVOID RegisterBadMemoryNotification(
  [in] PBAD_MEMORY_CALLBACK_ROUTINE Callback
);

Parameters

[in] Callback

A pointer to the application-defined BadMemoryCallbackRoutine function to register.

Return value

Registration handle that represents the callback notification. Can be passed to the UnregisterBadMemoryNotification function when no longer needed.

Remarks

To compile an application that calls this function, define _WIN32_WINNT as _WIN32_WINNT_WIN8 or higher. For more information, see Using the Windows Headers.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header memoryapi.h (include Windows.h, Memoryapi.h)
Library onecore.lib
DLL Kernel32.dll