Platform SDK: Transaction Server

getOriginalCreatorName Method

[This product will work only on Windows NT 4.0 versions and earlier. For Windows 2000 and later, see COM+ (Component Services).]

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

Provided By

Context class

String getOriginalCreatorName ( );

Return Values

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

Remarks

You use the getOriginalCreatorName method to determine the 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.

See Also

Programmatic Security, Advanced Security Methods, Context class