Platform SDK: Removable Storage Manager

GetNtmsObjectSecurity

The GetNtmsObjectSecurity function reads the security descriptor for the specified RSM object.

DWORD WINAPI GetNtmsObjectSecurity(
  HANDLE hSession,
  LPNTMS_GUID lpObjectId,
  DWORD dwType,
  SECURITY_INFORMATION RequestedInformation,
  PSECURITY_DESCRIPTOR pSecurityDescriptor,
  DWORD nLength,
  LPDWORD lpnLengthNeeded
);

Parameters

hSession
Handle to the session returned by the OpenNtmsSession function.
lpObjectId
Specifies the unique identifier of the RSM object.
dwType
Specifies the object type. (See the EnumerateNtmsObject function for object types.)
RequestedInformation
Specifies the Windows 2000 security data.
pSecurityDescriptor
Specifies the Windows 2000 security descriptor.
nLength
Specifies the length of the descriptor.
lpnLengthNeeded
Specifies the required length if the supplied buffer is not large enough for the security descriptor.

Return Values

Value Meaning
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.
ERROR_NO_SECURITY_ON_OBJECT There is no security information for this object.
ERROR_OBJECT_NOT_FOUND The object ID is invalid.
ERROR_SUCCESS The function was successful.

Remarks

RSM security uses the same security descriptors and information members that Windows 2000 security uses. This allows the standard security dialog boxes to be used to select RSM security.

For more information on Windows 2000 security, see the SetPrivateObjectSecurity function and the security section in the Platform SDK. For more information on RSM security, see RSM Security.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Ntmsapi.h.
  Library: Use Ntmsapi.lib.

See Also

Object Management Functions, EnumerateNtmsObject, SetNtmsObjectSecurity