OpenNtmsNotification function (ntmsapi.h)
[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
[in] hSession
Handle to the session returned by the OpenNtmsSession function.
[in] dwType
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 |
---|---|
|
NTMS_USE_ACCESS to the computer is denied. Other security errors are also possible, but they would indicate a security subsystem error.
Windows XP: No access rights are required. |
|
The database query or update failed. |
|
The value specified in the hSession parameter is NULL or is not valid. |
|
Unable to connect to the RSM service. |
|
The function was successful. |
|
The function failed. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | ntmsapi.h |
Library | Ntmsapi.lib |
DLL | Ntmsapi.dll |