3.2.5.2.3.1 INtmsObjectInfo1::GetNtmsServerObjectInformationA (Opnum 3)

The GetNtmsServerObjectInformationA method retrieves information about an object, as a sequence of ASCII characters.

 HRESULT GetNtmsServerObjectInformationA(
   [in, unique] LPNTMS_GUID lpObjectId,
   [out] LPNTMS_OBJECTINFORMATIONA lpInfo,
   [in] DWORD dwType,
   [in] DWORD dwSize
 );

lpObjectId: A pointer to the identifier of the object for which to retrieve information.

lpInfo: A pointer to an NTMS_OBJECTINFORMATIONA structure describing the properties of the object.

dwType: A value from the NtmsObjectsTypes enumeration defining the type of the object.

dwSize: The size, in bytes, of the appropriate structure for lpInfo.

Return value/code

Description

0x00000000

S_OK

The call was successful.

0x80070005

ERROR_ACCESS_DENIED

Access denied.

0x80070008

ERROR_NOT_ENOUGH_MEMORY

An allocation failure occurred during processing.

0x80070057

ERROR_INVALID_PARAMETER

A parameter is missing, or the dwType or dwSize parameter is invalid.

0x800710D8

ERROR_OBJECT_NOT_FOUND

The lpObjectId parameter is invalid.

Upon receiving this message, the server MUST verify that both lpObjectId and lpInfo are not NULL. If parameter validation fails, the server MUST immediately fail the operation and return ERROR_INVALID_PARAMETER (0x80070057).

If parameter validation succeeds, the server MUST verify that the user has the required access rights. If the client does not have the required access rights, the server MUST return ERROR_ACCESS_DENIED (0x80070005).

The caller MUST supply an object ID and an information structure of at least the size of the defined structure.

If the dwType field of a given object has a value of NTMS_UNKNOWN, the server MUST determine the object type. The information size and type of the information structure MUST be set correctly in the lpInfo parameter before calling the GetNtmsObjectInformationA method.

The following objects 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_POOL

Requires NTMS_USE_ACCESS to the media pool.

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.

Strings sent to this method as parameters MUST be ASCII-encoded.