SetOwnerID
Purpose
The CMetaPersist class SetOwner sets the owner user ID of the CMetaObject.
Description
If this attribute is not set (or set to 0 (zero)), the owner ID of a new object is set to the user specified in CMetaRepository::Initialize.
Syntax
void SetOwnerID(const OBJECTID_t OwnerID);
Argument |
In/Out |
Description |
OwnerID |
In |
User internal ID which is to be the owner of the object. |
Example:
To get the user ID from the user name, perform the following function call using the CMetaRepository class:
CMetaRepository repos;
result = repos.GetObjectID(CLSLOID_UserClass,
UserName, &userID);