Freigeben über


OpenNtmsNotification Function

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

The OpenNtmsNotification function opens a channel to receive RSM object change notifications for objects of the specified type.

Syntax

HANDLE OpenNtmsNotification(
  __in  HANDLE hSession,
  __in  DWORD dwType
);

Parameters

  • hSession [in]
    Handle to the session returned by the OpenNtmsSession function.

  • dwType [in]
    RSM object type for notification. For a list of values, see NtmsObjectsTypes.

Return Value

The OpenNtmsNotification function returns a notification handle that you pass to the WaitForNtmsNotification or CloseNtmsNotification functions.

For extended error information, call the GetLastError function. This function can return one of the following values.

Value Meaning
ERROR_ACCESS_DENIED

NTMS_USE_ACCESS to the computer is denied. Other security errors are also possible, but they would indicate a security subsystem error.

Windows XP/2000:  No access rights are required.
ERROR_DATABASE_FAILURE

The database query or update failed.

ERROR_INVALID_HANDLE

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

ERROR_NOT_CONNECTED

Unable to connect to the RSM service.

ERROR_SUCCESS

The function was successful.

INVALID_HANDLE_VALUE

The function failed.

 

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

WaitForNtmsNotification

 

 

Send comments about this topic to Microsoft

Build date: 6/9/2011