Platform SDK: Removable Storage Manager |
The AddNtmsMediaType function adds the specified media type to the specified library if there is not currently a relation in the library object. The function then creates the system media pools (FREE/IMPORT/UNRECOGNIZED) if they do not exist.
DWORD AddNtmsMediaType( HANDLE hSession, LPNTMS_GUID lpMediaTypeId, LPNTMS_GUID lpLibId );
Value | Meaning |
---|---|
ERROR_ACCESS_DENIED | NTMS_MODIFY_ACCESS to media's media pool is denied. |
ERROR_DATABASE_FAILURE | The database is inaccessible or damaged. |
ERROR_DATABASE_FULL | The database is full. |
ERROR_INVALID_HANDLE | The session handle is invalid or missing. |
ERROR_INVALID_LIBRARY | The library ID is invalid. |
ERROR_INVALID_PARAMETER | The media type or library ID is missing. |
ERROR_NOT_ENOUGH_MEMORY | There was an allocation failure during processing. |
ERROR_SUCCESS | The function was successful. |
Windows NT/2000: Requires Windows 2000.
Header: Declared in Ntmsapi.h.
Library: Use Ntmsapi.lib.