Additional helpful pseudo-handles: The process token, the thread token, and the effective token

1 · Raymond Chen · Jan. 5, 2021, 4:41 p.m.
Summary
In addition to the pseudo-handles produced by Get­Current­Process() and Get­Current­Thread(), there are also pseudo-handles for tokens. Function Equivalent GetCurrentProcessToken OpenProcessToken(GetCurrentProcess()) GetCurrentThreadToken OpenThreadToken(GetCurrentThread()) GetCurrentThreadEffectiveToken OpenThreadToken(GetCurrentThread()) + OpenProcessToken(GetCurrentProcess()) These pseudo-handles are handy because they can be obtained quickly and don’t need to be closed. The post Additional h...