SetTokenInformation
- From: "Kishore" <kishorerc@xxxxxxxxxxx>
- Date: Wed, 30 Aug 2006 12:43:04 -0700
Hi,
I am getting a "Invalid Parameter" exception (Error Code 87) when I try to
use SetTokenInformation or GetTokenInformation inside a windows NT Service.
The service is running with administrator rights.
HANDLE hToken;
SECURITY_IMPERSONATION_LEVEL imp_level;
imp_level = SecurityIdentification;
if ( OpenProcessToken( GetCurrentProcess(), TOKEN_WRITE, &hToken))
{
SetTokenInformation( hToken, TokenImpersonationLevel, (LPVOID) &imp_level,
sizeof(imp_level)); //This line returns an error code of 87
}
Has anybody come across this error? Any help will be greatly appreciated.
Thanks,
K
.
- Follow-Ups:
- Re: SetTokenInformation
- From: Joe Richards [MVP]
- Re: SetTokenInformation
- Prev by Date: USB Spy
- Next by Date: Re: Monitor account
- Previous by thread: USB Spy
- Next by thread: Re: SetTokenInformation
- Index(es):