Freigeben über


BeginNtmsDeviceChangeDetection Function

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

The BeginNtmsDeviceChangeDetection function allows the application to begin a device change detection session.

Syntax

DWORD BeginNtmsDeviceChangeDetection(
  __in   HANDLE hSession,
  __out  LPHANDLE lpDetectHandle
);

Parameters

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

  • lpDetectHandle [out]
    Pointer to variable that receives the device change detection handle.

Return Value

This function returns one of the following values.

Value Meaning
ERROR_INVALID_HANDLE

The value of the hSession parameter is not a valid session handle.

ERROR_SUCCESS

The operator request has been canceled.

 

Remarks

After calling BeginNtmsDeviceChangeDetection, the application can set the stand-alone libraries for which media change detection is required using the SetNtmsDeviceChangeDetection function. The Removable Storage Manager continues to detect changes for the devices specified until the change detection session is closed using the EndNtmsDeviceChangeDetection function.

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

Change Detection Functions

EndNtmsDeviceChangeDetection

SetNtmsDeviceChangeDetection

 

 

Send comments about this topic to Microsoft

Build date: 6/9/2011