Thema: Delphi Benutzer wechseln

Einzelnen Beitrag anzeigen

Benutzerbild von Remko
Remko

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

Re: Benutzer wechseln

  Alt 18. Aug 2008, 16:01
Actually... it does.
It's called WinStationConnect, an undocumented function from winsta.dll. It's present in JwaWinsta.pas (Jedi Apilib):

Delphi-Quellcode:
function WinStationConnectW(hServer: Handle; SessionId: DWORD;
  TargetSessionId: DWORD; pPassword: LPWSTR;
  bWait: BOOL): Boolean; stdcall;
and also in Jwscl Terminal Server unit (TJwWTSSession.Connect).

If you switch to a session with the same user you don't need to specify a password in which case you pass empty string (and not nil!).
  Mit Zitat antworten Zitat