Re: CreateProcessWithLogonW error
- From: "Skywing" <skywing_NO_SPAM_@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 23 Jan 2006 14:14:29 -0500
A word of caution here: if you have multiple threads that may end up trying
to change the process token at the same time you are likely to run into
random failures if you use this method. If this situation happens to be
true for the OP's program, a better choice is to use ImpersonateSelf and
operate on the threads token.
"Kellie Fitton" <KELLIEFITTON@xxxxxxxxx> wrote in message
news:1137992063.366817.224290@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> Ok, if you have been granted those privileges, then you can use
> the following APIs to enable them from your application:
>
> GetCurrentProcess()
> OpenProcessToken() using TOKEN_ADJUST_PRIVILEGES |
> TOKEN_QUERY
> LookupPrivilegeValue() using SE_TCB_NAME,
> AdjustTokenPrivileges()
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/getcurrentprocess.asp
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/openprocesstoken.asp
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/lookupprivilegevalue.asp
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/adjusttokenprivileges.asp
>
> Kellie.
>
.
- Follow-Ups:
- References:
- CreateProcessWithLogonW error
- From: a
- Re: CreateProcessWithLogonW error
- From: Pavel Lebedinsky [MSFT]
- Re: CreateProcessWithLogonW error
- From: a
- Re: CreateProcessWithLogonW error
- From: a
- CreateProcessWithLogonW error
- Prev by Date: Re: Getting CSP Load Error 8009001D
- Next by Date: Re: CreateProcessWithLogonW error
- Previous by thread: Re: CreateProcessWithLogonW error
- Next by thread: Re: CreateProcessWithLogonW error
- Index(es):
Relevant Pages
|