Location: Symbol Reference > Functions > JwGetTokenFromProcess Function
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
JwGetTokenFromProcess Function
Pascal
function JwGetTokenFromProcess(const OnProcessFound: TJwOnProcessFound; LogServer: IJwLogServer; Data: Pointer): TJwSecurityToken;
Parameters 
Description 
const OnProcessFound: TJwOnProcessFound 
is a callback method that is called each time a process was found. The callback function determines whether the process should be used to return the token. If the process cannot be used to retrieve the token, JwGetTokenFromProcess will continue enumerating  
LogServer: IJwLogServer 
receives a logging instance where log events are logged to. Can be nil if no logging is used  
Data: Pointer 
may contain user defined data to be assigned to a call to OnProcessFound  

JwGetTokenFromProcess returns the primary token of a process. If no process could be used to get a token the return value is nil.

JwGetTokenFromProcess tries to retrieve a token from a process. For this purpose it enumerates all processes on the local machine (even from other users) and calls the callback method OnProcessFound to determine whether the given process should be used to return the token.

Exceptions 
Description 
will be raised if parameter OnProcessFound is nil 
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!