I wanted to post the solution to this problem so that it would be here at PH for others to see. I found it after spending time looking up security functions and testing things on my own.
SID_IDENTIFIER_AUTHORITY siaLevel = SECURITY_NT_AUTHORITY;
//Check for administrator rights
if(AllocateAndInitializeSid(&siaLevel, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &pSecurity) != 0)
CheckTokenMembership(NULL, pSecurity, &bAdmin);
//We have to do this since MS won't use a real boolean
this->bAdministrator = true;
Hope this helps somebody else.
I wanted to point out that this code is inside a class method that returns a boolean (bool) type. That's why there is a "return false" statement if allocation fails.