GetOriginalCreatorName Method

Retrieves the user name associated with the original base process that initiated the activity in which the current object is executing.

Applies To

SecurityProperty Object

Syntax

username = securityproperty.GetOriginalCreatorName( )

Part

username
The user name associated with the base process that initiated the activity in which the current object is executing.

securityproperty
An object variable that evaluates to a SecurityProperty object.

Remarks

You use the GetOriginalCreatorName method to determine the user name associated with the process that initiated the activity in which the current object is executing. The following scenario illustrates the functionality of the GetOriginalCreatorName method.

A base process running on server A, as user A, creates object X on server B, running as user B. Then object X creates object Y, running on server C. If object Y calls GetOriginalCreatorName, the name of user A is returned.

Note The path to the original creator is broken if an object is created by some other means than IObjectContext::CreateInstance or ITransactionContext::CreateInstance. For example, if the base process on server A uses CoCreateInstance to create X, when Y calls GetOriginalCreatorName, the name it gets back will be the name of user B, not user A. This is because the creation sequence is traced back through the objects' context and MTS can only create a context for an object that's created with either IObjectContext::CreateInstance or ITransactionContext::CreateInstance.

Example

See Also

Programmatic Security, Advanced Security Methods, ObjectContext Object