1

My program uses the DXGI API to interact with DXGI Outputs and Adapters.

I am developing it using mostly command line tools, since I don't need any GUI yet.

I am also accessing my PowerShell instance through Bitvise SSH Server - whenever I run my compiled program.exe through this PowerShell instance, as far as I can tell it means that my program is running in Session 0, and that means I only have access to a subset of the DXGI functionality (see Use Direct3D in Session 0 Processes).

Is there any way that I can somehow hack around this requirement? Is there a flag I can pass to program.exe that pops it out of session 0 somehow?

4

1 回答 1

3

如果不是通过 WinAPI 并且您可以使用并启动其他 exe 来启动您的 program.exe,我认为您可以尝试使用 psexec 实用程序:http ://technet.microsoft.com/en-us/sysinternals/bb897553 。

我想周围也有类似的实用程序。

编辑: 您也可以使用 psexec 在本地机器上启动进程,请参阅“计算机”参数的参考:

computer指示 PsExec 在指定的计算机上运行应用程序。如果您省略计算机名称 PsExec 在本地系统上运行应用程序,并且如果您输入计算机名称“\*”,则 PsExec 将在当前域中的所有计算机上运行应用程序。

另一个编辑 我能够在我的会话中启动 notepad.exe 来模拟您可能拥有的内容:

psexec -i 0 psexec -s -i 1 C:\windows\system32\Notepad.exe

此命令行启动使用 psexec 在会话 0(在系统帐户下)中启动自身,然后新的 psexec 调用 notepad.exe 以显示在我的会话(会话 1)中。它确实有效。当然,您需要管理员权限才能运行这些命令。

于 2013-07-26T06:18:57.430 回答