MDAC 2.5 SDK - Technical Articles


 

ISecurityInfo::GetObjectTypes

Returns an array of object types that can be secured with access control entries.

HRESULT GetObjectTypes ( 
   ULONG *     cObjectTypes,
   GUID **     rgObjectTypes
);

Parameters

cObjectTypes

[out]
Address of a ULONG variable that receives the number of types of objects.

rgObjectTypes

[out]
Address of an array of GUIDs that represent types of objects.

Return Code

S_OK

The array of object types was successfully returned.

SEC_E_PERMISSIONDENIED

Requester does not have permissions for the operation.

E_INVALIDARG

cObjectTypes or rgObjectTypes was a null pointer.

E_FAIL

A provider-specific error occurred.

Comments

The provider calls CoTaskMemAlloc to allocate an array of GUIDs that represent all the types of objects that can have permissions settings applied to them. OLE DB defines several standard object type GUIDs. Additionally, the provider may define provider-specific GUIDs to identify object types unique to the data store; these types should be clearly documented by the provider's developer.

The consumer releases the allocated array at rgObjectTypes by calling CoTaskMemFree when it is finished.

See Also

SEC_OBJECT