SecurityProperty::GetOriginalCallerName method (comsvcs.h)
Retrieves the user name associated with the base process that initiated the sequence of calls from which the call into the current object originated.
Syntax
HRESULT GetOriginalCallerName(
[out] BSTR *bstrUserName
);
Parameters
[out] bstrUserName
A reference to the user name associated with the base process that initiated the sequence of calls from which the call into the current object originated.
Return value
This method can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, E_FAIL, and S_OK.
Remarks
Generally, an object's original caller is the same process as its original creator. The only situation in which the original caller and the original creator would be different is one in which the original creator passes a reference to another process and the other process initiates the call sequence.
The following scenario illustrates the functionality of this method:
- Base process 1, running on server A as user A, creates object X, on server B, running as user B.
- Then base process 1 passes its reference on object X to base process 2, running on server D as user D.
- Base process 2 uses that reference to call into object X.
- Object X then calls into object Y, running on server C. If object Y then calls GetOriginalCallerName, the name of user D is returned, not user A, who originally created the object.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | comsvcs.h |