AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Delphi Anzahl der Terminal Server Sessions auslesen
Thema durchsuchen
Ansicht
Themen-Optionen

Anzahl der Terminal Server Sessions auslesen

Ein Thema von sh030169 · begonnen am 26. Jun 2008 · letzter Beitrag vom 26. Jun 2008
Antwort Antwort
Seite 2 von 2     12   
Benutzerbild von Remko
Remko

Registriert seit: 10. Okt 2006
Ort: 's-Hertogenbosch, Die Niederlande
222 Beiträge
 
RAD-Studio 2010 Arc
 
#11

Re: Anzahl der Terminal Server Sessions auslesen

  Alt 26. Jun 2008, 19:07
You have to choose between using JwaWindows (which is really a single unit containing all other Jwa units) or using JwaWtsApi32. I recommend using JwaWindows in your case.
Note that the Jedi security library (Jwscl) contains a Terminal Server unit that wraps all Terminal Server API's. This makes your question really simple:

Delphi-Quellcode:
uses JwsclTerminalServer;
...

var
   TS: TJwTerminalServer;
   TS := TJwTerminalServer.Create;
   // You should check for errors and/or exceptions (see [url=http://jwscldoc.delphi-jedi.net/JwsclTerminalServer.TJwTerminalServer.html]documentation[/url]) but left out here to shorten code
   TS.EnumerateSessions;
   ShowMessageFmt('%d Terminal Sessions', TS.Sessions.Count);
   TS.Free;
The Connectstate property can be used to filter specific sessions (eg only active ones), from the docs:
ConnectState returns the connection state of the session. Which can be one of the following values:

Session State Description
WTSActive The session is connected, and a user is logged on to the server.
WTSConnected The session is connected, but there is no user logged on to the server.
WTSConnectQuery The session is in the process of connecting. If this state continues, it indicates a problem with the connection.
WTSShadow The session is in the process of remotely controlling another session.
WTSDisconnected The user is disconnected from the session, but the session is still attached to the server and can be reconnected at any time.
WTSIdle The session is initialized and ready to accept a connection. To optimize the performance of a server, two default (idle) sessions are initialized before any client connections are made.
WTSReset The session failed to initialize correctly or could not be terminated, and is not available. If this state continues, it indicates a problem with the connection of the session.
WTSInit The session is in the process of initializing.
  Mit Zitat antworten Zitat
Dezipaitor

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

Re: Anzahl der Terminal Server Sessions auslesen

  Alt 26. Jun 2008, 21:47
JwaWindows erfordert etwas Vorarbeit. Damit JwaWindows.dcu erstellt wird solltest du diesem Tutorial folgen.
Die JWSCL erdordert dann nur noch den Quelltextpfad anzugeben : http://blog.delphi-jedi.net/2008/03/...o-setup-jwscl/

JwaWTSAPI32 einzubinden erfordert aber nicht JwaWindows. Denn JwaWindows bindet automatisch alle JwaXXX Units ein. Man sollte jedoch JwaWindows.dcu erstellen, da das Erstellen von JwaWindows.pas einige Zeit braucht.
Christian
Windows, Tokens, Access Control List, Dateisicherheit, Desktop, Vista Elevation?
Goto: JEDI API LIB & Windows Security Code Library (JWSCL)
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 2     12   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:16 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz