private void ShowLogonSid(AccessTokenHandle hToken) { var logonSid = AccessTokenLogonSid.FromTokenHandle(hToken); console.WriteLine("[LOGON SID]"); console.WriteLine(""); console.WriteLine(logonSid.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 { } }