物联网核心的C ++ / WinRT控制台应用停留在初始屏幕上

时间:2018-08-23 16:20:35

标签: c++ windows-10-iot-core

这只是模板中的即用型(按from here指示),并通过执行“远程计算机”调试会话将其推送到(虚拟盒)仿真设备。

为什么它会停留在初始屏幕上?有人碰到同样的东西吗?我错过了什么吗?

当我运行它时,它会很好地部署此调试输出(无话可说,我不认为):

'ConsoleCppWinRt3.exe' (Win32): Loaded 'U:\Users\DefaultAccount\AppxLayouts\cc60f819-ef47-4858-b213-8af8c3669919VS.Debug_Win32.nm1\ConsoleCppWinRt3.exe'. Symbols loaded.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\kernel32legacy.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'U:\Programs\WindowsApps\Microsoft.VCLibs.140.00.Debug_14.0.26428.1_x86__8wekyb3d8bbwe\vcruntime140d_app.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'U:\Users\DefaultAccount\AppxLayouts\cc60f819-ef47-4858-b213-8af8c3669919VS.Debug_Win32.nm1\ucrtbased.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\procthreadexthost.dll'. Cannot find or open the PDB file.
The thread 0xd38 has exited with code 0 (0x0).

修改 如果我暂停调试器,它将在控制台代码中。但是启动画面仍在阻碍中。例如在此代码中,调试器在getchar()调用中:

int main()
{
    wprintf(L"Hello IoT");
    getchar();
}

但是在这段代码中:

int main()
{
    wprintf(L"Hello IoT");
    Sleep(10000);
}

...它处于Sleep调用中,但在10秒后关闭,导致Visual Studio声明:

  

无法激活Windows应用商店应用[...]。 myapp.exe进程   已启动,但激活请求失败,并显示错误“应用未   开始”。

我不应该打电话来关闭启动画面或明显的东西,对吗?

0 个答案:

没有答案