Re: Vista: Error SetTokenInformation(..., session_id, ...).



Hi,

The error code would help...
GetLastError = 0x55F

The token used can not be associated to any process at that point (freshly
duplicated).
Why? In Win2k\XP int works well.

Also note that session 1 is not necessarily always the one that's bound to
the physical console (although no error will be generated if you're
specifying a session id that doesn't even exist).
I get it via WTSGetActiveConsoleSessionId


Alex.

.



Relevant Pages

  • Re: WTSQuerySessionInformation
    ... the Terminal Services console session. ... If the session ID is zero then I'm running on the physical console. ... This page doesn't single out Windows Vista. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: WTSQuerySessionInformation
    ... The ActiveConsole may be in the middle of changing session ownership ... because the physical console might be in the middle of changing ownership ... If the session ID is zero then I'm running on the physical ... This page doesn't single out Windows Vista. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: WTSQuerySessionInformation
    ... OK, I've called WTSGetActiveConsoleSessionId in several situations including this one, and I'll try to find what API gets the current session ID. ... Actually this makes me figure out that there might not be a solution, because the physical console might be in the middle of changing ownership at the time. ... If the session ID is zero then I'm running on the physical console. ... This page doesn't single out Windows Vista. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Order of function parameters evaluation
    ... >> void somefunc(int a, int b, int c) ... The standard doesn't talk about a "calling convention" called ... and any method for specifying such a thing is non-standard. ... that invokes undefined behavior to behave in a specified way. ...
    (comp.lang.c)
  • Re: Session and Database Connection, Which Is More Costy?
    ... public class HelperSessionInfo ... public static int GetUserId() ... check the database for unpaid balance and save it as a session ... and check the database for unpaid balance. ...
    (microsoft.public.dotnet.framework.aspnet)

Quantcast