| Platform SDK: Removable Storage Manager |
The EnableNtmsObject function enables the specified object.
DWORD WINAPI EnableNtmsObject( HANDLE hSession, DWORD dwType, LPNTMS_GUID lpObjectId );
| Value | Meaning |
|---|---|
| NTMS_DRIVE | An RSM drive. |
| NTMS_LIBRARY | An RSM library unit. |
| NTMS_PHYSICAL_MEDIA | A physical media object (a tape, optical disk, CD, or magnetic disk cartridge). |
| Value | Meaning |
|---|---|
| ERROR_ACCESS_DENIED | NTMS_CONTROL_ACCESS to the library containing the object is denied. |
| ERROR_DATABASE_FAILURE | The database is inaccessible or damaged. |
| ERROR_INVALID_HANDLE | The session handle is invalid or missing. |
| ERROR_INVALID_PARAMETER | The object ID is missing or the object type is invalid. (The object type is invalid if it is not NTMS_LIBRARY, NTMS_DRIVE, or NTMS_PHYSICAL_MEDIA.) |
| ERROR_INVALID_STATE | The object is already enabled. |
| ERROR_OBJECT_NOT_FOUND | The object is not valid. |
| ERROR_SUCCESS | The enable is queued. |
The EnableNtmsObject function queues a disable command with RSM. If RSM is busy, the command can take some time to complete.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Ntmsapi.h.
Library: Use Ntmsapi.lib.