Platform SDK: Removable Storage Manager |
The SetNtmsDeviceChangeDetection function sets one or more target devices for change detection. The device can be specified directly by passing NTMS_LIBRARY object GUIDs or indirectly by passing NTMS_PHYSICAL_MEDIA or NTMS_MEDIA_TYPE GUIDs. When using the indirect specification, all stand-alone libraries that could contain the media or media type are detected. All devices specified continue to be detected until the DetectHandle is closed using EndNtmsDeviceChangeDetection. This function can also be used as a refresh by providing a NULL DetectHandle. In this case, RSM signals a single poll of all target devices provided by lpObjectId and thereby schedule classification of any changed media in those devices. This is typically used by a UI when opening a leaf node or implementing a Refresh option.
DWORD WINAPI SetNtmsDeviceChangeDetection( HANDLE hSession, HANDLE hDetectHandle, LPNTMS_GUID lpObjectId, DWORD dwType, DWORD dwCount );
Value | Meaning |
---|---|
ERROR_INVALID_HANDLE | Invalid Session or Detection Handle. |
ERROR_INVALID_PARAMETER | Invalid Object type. |
ERROR_INVALID_LIBRARY | Specified Library not Found. |
ERROR_INVALID_MEDIA | Specified Media or Type not found. |
ERROR_SUCCESS | The operator request has been canceled. |
Windows NT/2000: Requires Windows 2000.
Header: Declared in Ntmsapi.h.
Library: Use Ntmsapi.lib.
EndNtmsDeviceChangeDetection, BeginNtmsDeviceChangeDetection