SecurityProperty::GetDirectCallerName method (comsvcs.h)
Retrieves the user name associated with the external process that called the currently executing method.
Syntax
HRESULT GetDirectCallerName(
[out] BSTR *bstrUserName
);
Parameters
[out] bstrUserName
A reference to the user name associated with the external process that called the currently executing method.
Return value
This method can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, E_FAIL, and S_OK.
Remarks
The following scenarios illustrate the functionality of this method:
- A base process, running on server A as user A, calls into object X on server B, running as user B. Then object X calls into object Y, running on server C. If object Y calls GetDirectCallerName, the name of user B is retrieved.
- A base process, running on server A as user A, calls into object X on server B, running as user B. Then object X calls into object Y, running in the same process as object X, also on server B. When object Y calls GetDirectCallerName, the name of user A is returned, not the name of user B.
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 |