MDAC 2.5 SDK - Technical Articles
Sets the owner of an object.
The caller initializes pObject to specify the database object whose owner is being set. See SEC_OBJECT for an explanation on initializing this structure.
HRESULT SetObjectOwner (
SEC_OBJECT * pObject,
TRUSTEE * pOwner
);
Parameters
pObject
[in]
Address of an initialized SEC_OBJECT structure that indicates the database object whose owner is to be set.
pOwner
[in]
Address of an initialized TRUSTEE structure that has the trustee information of the new owner of the object.
Return Code
S_OK
The owner was successfully set.
SEC_E_PERMISSIONDENIED
Requester does not have permissions for the operation.
SEC_E_INVALIDOWNER
The trustee supplied as owner is invalid or unknown to the provider.
SEC_E_INVALIDOBJECT
The object that was supplied is invalid or unknown to the provider.
SEC_E_NOOWNER
An attempt was made to set ownership for an object that cannot be owned by any trustee.
E_INVALIDARG
pObject or pOwner was a null pointer.
E_FAIL
A provider-specific error occurred.
See Also
IObjectAccessControl, IObjectAccessControl::GetObjectOwner, SEC_OBJECT, TRUSTEE