This method is deprecated.
Determines if the account under which a given thread is running is a member of a given Security Group.
HRESULT
IsThreadIdInSid(
[in] int ThreadId,
[in] BSTR GroupSid,
[out, retval] VARIANT_BOOL* IsInGroup
)
ThreadId [in]
The Thread ID of a thread to be checked for group membership.
GroupSid [in]
A Security ID (SID) in string describing a Security Group.
IsInGroup [out, retval]
A pointer into which to return a VARIANT_BOOL that on successful completion indicates if the Security ID under which ThreadId is executing is a member of GroupSid.
If the method succeeds, S_OK is returned.
If the method fails for any reason, an appropriate error code is returned.
Important: This method is deprecated and is pending removal from FESF. Do not use it. Convert existing code that uses it as soon as possible. Use the equivalent function provided by the FesfUtil2 Library.
IsThreadIdInSid determines if the Security Principle under which a given thread (identified by ThreadId) is executing is a member of the Security Group identified by GroupSid.
Client Solutions can use this method to determine if the user that's running an application instance (identified by a Thread ID) is a member of a given Active Directory Security Group. That group could be a Windows built-in group (such as "Backup Operators") or a custom-defined group (such as "MI5 Agents").
This method relies on support from the FESF Kernel Mode Components. Note that methods in the FESF Utility library are only designed for use when FESF is installed and the FESF Kernel Mode Components are running.
if (m_User != user) {
VARIANT_BOOL answer;
m_pFESFUtil->IsThreadIdInSid(ThreadId, m_User, &answer);
if (VARIANT_FALSE == answer) {
return S_OK;
}
}
The RuleEngine project that is part of the provided UM_Sample solution contains an example that illustrates the use of this method.
Software version |
FESF V1 (or later) |
DLL |
FESFUtility.DLL |
Supported FESF State |
FESF Online State |
Type Library |
\UM_FESF\UMLIB\FESFUTILITY.TLB |
IID |
IFesfUtil (please use the defintion from the Type Library) |
CLSID |
FesfUtil (please use the definition from the Type Library) |