Ich hab den Link in die SecLib implementiert:
JwsclToken.TJWSecurityToken:
Delphi-Quellcode:
{@Name is a compatibility constructor for CreateWTSQueryUserToken which does
not work in Windows 2000.
It creates a token of the current logged on user.
This constructor seeks a process of the user and gets its token.
It only works in the same (terminal) session of the process.
@param(DesiredAccess defines the desired access to the token)
@param(ProcessName defines which process is used to get the token of the user)
@raises(EJwsclProcessNotFound will be raised if process handle given in parameter
ProcessName could not be retrieved.)
@raises(EJwsclWinCallFailedException will be raised if the process handle of the found
process could not be opened)
@raises(EJwsclSecurityException Several exceptions can be raised by used methods:
@unorderedlist(
@item(CreateTokenByProcess)
@item(CreateDuplicateExistingToken)
))
}
constructor CreateCompatibilityQueryUserToken(
const DesiredAccess: TJwAccessMask;
const ProcessName : TJwString = ExplorerProcessName);