GetNtmsObjectSecurity function (ntmsapi.h)
[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The GetNtmsObjectSecurity function reads the security descriptor for the specified RSM object.
Syntax
DWORD GetNtmsObjectSecurity(
[in] HANDLE hSession,
[in] LPNTMS_GUID lpObjectId,
[in] DWORD dwType,
[in] SECURITY_INFORMATION RequestedInformation,
[out] PSECURITY_DESCRIPTOR lpSecurityDescriptor,
[in] DWORD nLength,
[out] LPDWORD lpnLengthNeeded
);
Parameters
[in] hSession
Handle to the session returned by the OpenNtmsSession function.
[in] lpObjectId
Unique identifier of the RSM object.
[in] dwType
Object type. For a list of object types, see NtmsObjectsTypes.
[in] RequestedInformation
A SECURITY_INFORMATION value that specifies the requested security data.
[out] lpSecurityDescriptor
Pointer to a SECURITY_DESCRIPTOR structure that receives the security descriptor.
[in] nLength
Length of the descriptor.
[out] lpnLengthNeeded
Required length of the buffer if it is not large enough for the security descriptor, in bytes.
Return value
This function returns one of the following values.
Value | Meaning |
---|---|
|
READ_CONTROL access to the object is denied.
Windows XP: No access rights are required. |
|
The database is inaccessible or damaged. |
|
The session handle is missing or is not valid. |
|
The object ID is missing. |
|
There is no security information for this object. |
|
The object ID is not valid. |
|
The function was successful. |
Remarks
RSM security uses the standard security descriptors and information members. This allows the standard security dialog boxes to be used to select RSM security. For more information, see the SetPrivateObjectSecurity function. For more information on RSM security, see RSM Security.
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 |