private void ShowOwner(AccessTokenHandle hToken) { var owner = AccessTokenOwner.FromTokenHandle(hToken); console.WriteLine("[OWNER]"); console.WriteLine(""); console.WriteLine(owner.ToOutputString()); console.WriteLine(""); }
public AccessTokenInformation(AccessTokenHandle handle) { try { this._groups = AccessTokenGroups.FromTokenHandle(handle); } catch { } try { this._logonSid = AccessTokenLogonSid.FromTokenHandle(handle); } catch { } try { this._owner = AccessTokenOwner.FromTokenHandle(handle); } catch { } try { this._primaryGroup = AccessTokenPrimaryGroup.FromTokenHandle(handle); } catch { } try { this._primaryGroup = AccessTokenPrimaryGroup.FromTokenHandle(handle); } catch { } try { this._privileges = AccessTokenPrivileges.FromTokenHandle(handle); } catch { } try { this._sessionId = AccessTokenSessionId.FromTokenHandle(handle); } catch { } try { this._user = AccessTokenUser.FromTokenHandle(handle); } catch { } }