Forum: Win32/Win64 API (native code)
Delphi
by Dezipaitor,
9. Okt 2007
Yeah.
I think this conversation is a lot more informative than many other threads. I also already provided the answer (i think).
Forum: Win32/Win64 API (native code)
Delphi
by Dezipaitor,
9. Okt 2007
1. WtsQueryUserToken with WtsGetActiveConsoleSessionID uses always the lonely console session. The console session is the session which the keyboard and mouse inputs send their data. Its not a terminal session. You can provide other terminal session.
Wts_Functions are only supported in XP and newer.
2. There is no need. A token is a passport of the user. A service has the power to obtain a...
Forum: Win32/Win64 API (native code)
Delphi
by Dezipaitor,
9. Okt 2007
You do not need LsaLogonUser at all.
You already use WTSQueryUserToken which gives you a token, that can be used for CreateProcessAsUser.
That token leads to a process that is started in the logonsession of the user.
Parameter lpStartupInfo (member lpDesktop) you can provide a windowsstation and desktop where the new application is put ("winsta0\default").
That should work.