James Hawkins wrote:
I'm not exactly sure whether the LPVOID param of NtQueryInformationToken should be a BOOLEAN value or a DWORD like NumRestrictedSids (it isn't documented), but because we just want to know whether there exists at least one, the BOOLEAN does the trick until we know how to handle TokenRestrictedSids.
TokenRestrictedSids basically returns a TOKEN_GROUPS structure, the first member GroupCount indicates the number of restricted SIDs.
Here's how i'd implement it: http://svn.reactos.com/viewcvs/trunk/reactos/lib/advapi32/token/token.c?rev=...
Best Regards, Thomas