Platform SDK: Removable Storage Manager

WaitForNtmsNotification

The WaitForNtmsNotification function waits for the next object change notification.

DWORD WINAPI WaitForNtmsNotification(
  HANDLE hNotification,
  LPNTMS_NOTIFICATIONINFORMATION lpNotificationInformation,
  DWORD dwTimeout
);

Parameters

hNotification
Notification handle generated by the OpenNtmsNotification function.
lpNotificationInformation
Specifies notification information. For more information, see the NTMS_NOTIFICATIONINFORMATION data structure.
dwTimeout
Specifies the maximum number of milliseconds to wait. If you specify a value of INFINITE, this function will not time-out.

Return Values

Value Meaning
ERROR_DATABASE_FAILURE The database query or update failed.
ERROR_INVALID_HANDLE The value specified in the hNotification parameter is invalid or NULL.
ERROR_NO_DATA Notification pipe failed. Attempt to set up notification again.
ERROR_NOT_CONNECTED Unable to connect to the RSM service.
ERROR_TIMEOUT The time-out event expired.
ERROR_SUCCESS The function was successfully executed.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Ntmsapi.h.
  Library: Use Ntmsapi.lib.

See Also

Database Notification Functions, CloseNtmsNotification, OpenNtmsNotification