FesfUtil2GetSidForThreadId Function

Retrieves the Security Identifier SID under which a given thread is running.

Syntax (C++)

std::wstring

FesfUtil2GetSidForThreadId(uint32_t ThreadId);

Syntax (C)

FesfUtil2GetSidForThreadId_C(
           [in] DWORD ThreadId,

           [out] LPWSTR SidString,

           [inout] DWORD* SidBufferSize);

Parameters

ThreadId

The ID of a currently active thread for which to query the SID.

Return value

A string SID representing the SID under which ThreadId is running.

Throws

Throws an FEU2Exception if an error is encountered.

Remarks

May fail for security reasons when called for certain Windows "protected processes".  This is part of the Windows architecture and cannot be bypassed.

Replaces

IFesfUtil:: GetSidForThreadId