GetNtmsObjectInformation function (ntmsapi.h)
[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The GetNtmsObjectInformation function returns an object's information structure for the specified object.
Syntax
DWORD GetNtmsObjectInformation(
[in] HANDLE hSession,
[in] LPNTMS_GUID lpObjectId,
[out] LPNTMS_OBJECTINFORMATION lpInfo
);
Parameters
[in] hSession
Handle to the session returned by the OpenNtmsSession function.
[in] lpObjectId
Unique identifier of the RSM object.
[out] lpInfo
Pointer to an NTMS_OBJECTINFORMATION structure that receives the object information.
Return value
This function returns one of the following values.
Value | Meaning |
---|---|
|
NTMS_USE_ACCESS to the object or its container is denied. Other security errors are also possible, but they would indicate a security subsystem error.
Windows XP: No access rights are required. |
|
The session handle is missing or is not valid. |
|
The object ID or information structure is missing, or the object information size or object type is not valid. |
|
An allocation failure occurred during processing. |
|
The object ID is not valid. |
|
The function was successful. |
Remarks
The information size and type of the information structure must be set correctly in the lpInfo parameter before you use the GetNtmsObjectInformation function.
To avoid unpredictable results, applications must call the GetNtmsObjectInformation function before calling the SetNtmsObjectInformation function. The SetNtmsObjectInformation function updates all writable members of the NTMS_OBJECTINFORMATION structure, therefore the application is responsible for providing a value for all writable members.
The following is the list of objects that require special access rights.
Object | Access |
---|---|
NTMS_CHANGER | Requires NTMS_USE_ACCESS to the library. |
NTMS_CHANGER_TYPE | Requires NTMS_USE_ACCESS to the computer. |
NTMS_COMPUTER | Requires NTMS_USE_ACCESS to the computer. |
NTMS_DRIVE | Requires NTMS_USE_ACCESS to the library. |
NTMS_DRIVE_TYPE | Requires NTMS_USE_ACCESS to the computer. |
NTMS_IEDOOR | Requires NTMS_USE_ACCESS to the library. |
NTMS_IEPORT | Requires NTMS_USE_ACCESS to the library. |
NTMS_LIBRARY | Requires NTMS_USE_ACCESS to the library. |
NTMS_LIBREQUEST | Requires NTMS_USE_ACCESS to the library. |
NTMS_LOGICAL_MEDIA | Requires NTMS_USE_ACCESS to the media pool of the logical media. |
NTMS_MEDIA_TYPE | Requires NTMS_USE_ACCESS to the computer. |
NTMS_OPREQUEST | Requires NTMS_USE_ACCESS to the computer. |
NTMS_PARTITION | Requires NTMS_USE_ACCESS to the media pool of the side. |
NTMS_PHYSICAL_MEDIA | Requires NTMS_USE_ACCESS to the media pool. |
NTMS_STORAGESLOT | Requires NTMS_USE_ACCESS to the library. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | ntmsapi.h |
Library | Ntmsapi.lib |
DLL | Ntmsapi.dll |