|
JWSCL Documentation
|
constructor CreateTokenByProcessId(const ProcessID: DWORD; const DesiredAccess: TJwAccessMask); virtual;
|
Parameters |
Description |
|
const ProcessID: DWORD |
defines a process ID |
|
const DesiredAccess: TJwAccessMask |
Receives the desired access for this token. The access types can be get from the list written at CreateTokenByProcess. Access flags must be concatenated with or operator. Can be MAXIMUM_ALLOWED to get maximum access. |
CreateTokenByProcessId retrieves the token by using a ProcessID. The token of the given process will be duplicated into the current process so maximum access is granted.
If the right TOKEN_DUPLICATE is set in parameter DesiredAccess, the token is duplicated. With this option, in special situations, the new current process can have more access rights on the token than the process specified by ProcessID. If you do not specify TOKEN_DUPLICATE, you will get direct access to the target process' token. Therefore you can change the behaviour of the process by changing enabled privileges. This does not affect an impersonation of the token because for this action is has to be duplicated.
CreateTokenByProcessId tries to use debug privilege to open any process.
|
Exceptions |
Description |
|
If the token could not be opened | |
|
will be raised if the process could not be opened to retrieve the token |
|
Copyright (c) 2010. All rights reserved.
This help was created by Doc-O-Matic sponsored by toolsfactory software inc. |
|
What do you think about this topic? Send feedback!
|