You should request for TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY
and correctly call the function:
if (!OpenProcessToken(GetCurrentProcess(),
TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
return FALSE;
And please: Always check for valid return values!
For a complete example see also: How to Shut Down the System
And just for reference: Your function SetPrivilege
was copied from Enabling and Disabling Privileges in C++