ISecurityProperty::GetOriginalCallerSID method (comsvcs.h)
Retrieves the security identifier of the base process that initiated the call sequence from which the current method was called.
The preferred way to obtain information about the original caller is to use the ISecurityCallContext interface.
Syntax
HRESULT GetOriginalCallerSID(
[out] PSID *pSID
);
Parameters
[out] pSID
A reference to the security ID of the base process that initiated the call sequence from which the current method was called.
Return value
This method can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following values.
Return code | Description |
---|---|
|
The security ID of the base process that originated the call into the current object is returned in the parameter pSid. |
|
The current object does not have a context associated with it because either the component was not imported into an application or the object was not created with one of the COM+ CreateInstance methods. |
Remarks
You use the GetOriginalCallerSID method to determine the security ID of the original process that initiated the call sequence from which the current method was called, not the originator (or creator) of the process. Although a pointer to an object can be passed through a series of servers and users, GetOriginalCallerSID always returns the first server and user of the process, even if that user was not the original creator of the object. The following scenario illustrates the functionality of the GetOriginalCallerSID method.
- Base Process 1, running on Server A as user A, creates Object X, on Server B, running as user B.
- 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 calls into Object Y, running on Server C. If Object Y then calls GetOriginalCallerSID, the security ID of user D is returned, not user A, who originally created the object.
You must call ReleaseSID on a security ID when you finish using it.
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 |