LookupPrivilegeValue( NULL, SE_DEBUG_NAME, &(tkp.Privileges[0].Luid) ); // Get the LUID for the privilege.
tkp.PrivilegeCount = 1; // one privilege to set
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
If the function succeeds, the return value is nonzero. To determine whether the function adjusted all of the specified privileges, call GetLastError, which returns one of the following values when the function succeeds
ERROR_SUCCESS The function adjusted all specified privileges.