解决方案 »

  1.   


    windows的用户登录机制啊。一个用户名可以通过远程桌面 同时多次登录
      

  2.   

    谢谢.
    还有两个问题?
    1,可以遍历 所有会话?
    2,可以知道已启动的程序所在的会话?
    1、有相应的API可调用;
    2、是的,当前输入界面就是所在会话:specified WtsGetActiveConsoleSessionID as the SessionID, this function retrieves the Terminal Services session currently attached to the physical console. The physical console is the monitor, keyboard, and mouse.
      

  3.   

    谢谢.
    还有两个问题?
    1,可以遍历 所有会话?
    2,可以知道已启动的程序所在的会话?
    1、有相应的API可调用;
    2、是的,当前输入界面就是所在会话:specified WtsGetActiveConsoleSessionID as the SessionID, this function retrieves the Terminal Services session currently attached to the physical console. The physical console is the monitor, keyboard, and mouse.
    WTSQueryUserToken 这个方法没用哦 都是发回false
    我是在windows 20003 测试的。有特殊要求?
      

  4.   

    show一下:sysErrorMessage(GetLastError)
    看是什么错误 
      

  5.   

    http://www.myhack58.com/Article/html/3/68/2009/25589.htm
    上面链接是C++的,也可以参考一下
      

  6.   

    弄过,是比较烦.要获取用户的token,然后切换线程token,在该用户会话中用这个token创建一个进程,用这个进程来显示窗口
      

  7.   

    可以参考下VNC的服务是怎样在不同用户下启动托盘程序的
      

  8.   

    这个问题应该这样理解,窗口比属于某个进程,而在Windows中每个进程都是运行在某个会话中。所以要解决你的这个问题,只需要使用CreateProcessAsUser创建指定会话下的进程即可。CreateProcessUser的第一参数就是指定会话的,具体如何使用该参数和如何获取会话等问题可参照MSDN。