3.2.5.2.1.17 INtmsLibraryControl1::BeginNtmsDeviceChangeDetection (Opnum 20)

The BeginNtmsDeviceChangeDetection method begins a device change detection session. The libraries for which media change detection is required MUST be set using the SetNtmsDeviceChangeDetection method. Implementation of this method is optional.<23> The server MAY return a non-implemented error (ERROR_CALL_NOT_IMPLEMENTED, 0x80070078).<24>

 HRESULT BeginNtmsDeviceChangeDetection(
   [out] NTMS_HANDLE* lpDetectHandle
 );

lpDetectHandle: A pointer to the new device change detection handle.

Return value/code

Description

0x00000000

S_OK

The call was successful.

0x80070006

ERROR_INVALID_HANDLE

The session handle is not valid.

0x80070057

ERROR_INVALID_PARAMETER

A parameter is not valid.

0x80070078

ERROR_CALL_NOT_IMPLEMENTED

This function is not supported on this system.

If the method is implemented, the server MUST verify that lpDetectHandle is not NULL. If it is NULL, the server MUST immediately fail the operation and return an invalid handler error ERROR_INVALID_HANDLE (0x80070006).

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

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

The server MUST return a pointer to the new device change detection handle in lpDetectHandle.