WaitForNtmsNotification Function

[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]

The WaitForNtmsNotification function waits for the next object change notification.

Syntax

DWORD WaitForNtmsNotification(
  __in   HANDLE hNotification,
  __out  LPNTMS_NOTIFICATIONINFORMATION lpNotificationInformation,
  __in   DWORD dwTimeout
);

Parameters

  • hNotification [in]
    Notification handle returned by the OpenNtmsNotification function.

  • lpNotificationInformation [out]
    Pointer to an NTMS_NOTIFICATIONINFORMATION structure that receives the notification information.

  • dwTimeout [in]
    Maximum number of milliseconds to wait. If you specify a value of INFINITE, this function will not time-out.

Return Value

This function returns one of the following values.

Value Meaning
ERROR_DATABASE_FAILURE

The database query or update failed.

ERROR_INVALID_HANDLE

The value specified in the hNotification parameter is NULL or is not valid.

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

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

End of client support

Windows Vista

End of server support

Windows Server 2008

Header

Ntmsapi.h

Library

Ntmsapi.lib

DLL

Ntmsapi.dll

See Also

Database Notification Functions

CloseNtmsNotification

NTMS_NOTIFICATIONINFORMATION

OpenNtmsNotification

 

 

Send comments about this topic to Microsoft

Build date: 6/9/2011