Saturday, 7 September 2013

WTSQueryUserToken returns ERROR_INVALID_PARAMETER

WTSQueryUserToken returns ERROR_INVALID_PARAMETER

I'm trying to use WTSQueryUserToken in conjunction with
CreateProcessAsUser; however I keep getting this error returned
ERROR_INVALID_PARAMETER. I get the session using WTSEnumerateSessions.
Here's the code:
HANDLE currentToken;
BOOL bRet = WTSQueryUserToken(dwSessionId, &currentToken);
Anyone have any ideas on what's going on?
(I'm using c++, VS2012, and I'm currently running on Windows 8, but the
applicaiton is going to be targeting only Windows 7 Embedded).

No comments:

Post a Comment