Einzelnen Beitrag anzeigen

Dezipaitor

Registriert seit: 14. Apr 2003
Ort: Stuttgart
1.701 Beiträge
 
Delphi 7 Professional
 
#14

Re: Angemeldeter Benutzer aus Dienst ermitteln

  Alt 1. Dez 2007, 17:27
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);
Christian
Windows, Tokens, Access Control List, Dateisicherheit, Desktop, Vista Elevation?
Goto: JEDI API LIB & Windows Security Code Library (JWSCL)
  Mit Zitat antworten Zitat