Click to Rate and Give Feedback
MSDN
MSDN Library
System Services
Memory Management
 QueryMemoryResourceNotification Fun...
QueryMemoryResourceNotification Function

Retrieves the state of the specified memory resource object.

Syntax

C++
BOOL WINAPI QueryMemoryResourceNotification(
  __in   HANDLE ResourceNotificationHandle,
  __out  PBOOL ResourceState
);

Parameters

ResourceNotificationHandle [in]

A handle to a memory resource notification object. The CreateMemoryResourceNotification function returns this handle.

ResourceState [out]

The memory pointed to by this parameter receives the state of the memory resource notification object. The value of this parameter is set to TRUE if the specified memory condition exists, and FALSE if the specified memory condition does not exist.

Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. For more error information, call GetLastError.

Remarks

Unlike the wait functions, QueryMemoryResourceNotification does not block the calling thread. Therefore, it is an efficient way to check the state of physical memory before proceeding with an operation.

To compile an application that uses this function, define the _WIN32_WINNT macro as 0x0501 or later. For more information, see Using the Windows Headers.

Requirements

Minimum supported clientWindows XP
Minimum supported serverWindows Server 2003
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll

See Also

CreateMemoryResourceNotification
Memory Management Functions

Send comments about this topic to Microsoft

Build date: 11/19/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker