vxug-WinAPI-Tricks/Kernel32/GetCurrentProcessIdAlt.c
2021-06-04 16:26:01 -05:00

9 lines
173 B
C

#define HandleToUlong (h)((ULONG)(ULONG_PTR)(h))
DWORD GetCurrentProcessIdAlt(VOID)
{
PTEB Teb = GetTeb();
return HandleToUlong(Teb->ClientId.UniqueProcess);
}