Vista 上当配色方案不是 Aero 时出现幽灵窗口

发布于 2024-07-15 18:37:34 字数 409 浏览 4 评论 0原文

我们有一项服务可以启动一个与登录用户交互的应用程序。 我们启动的应用程序始终作为我们拥有凭据的特定用户运行。 我们执行必要的操作(获取活动会话 ID、登录用户、调整令牌)并在 winsta0\Default 桌面中使用 CreateProcessAsUser 启动应用程序。

如果 Vista PC 的配色方案是 Aero,则一切工作正常 - 但在基本和经典配色方案下,应用程序仍会启动,但没有任何窗口被绘制。 任务栏上有一个新任务。 如果您最小化位于后台且全屏的窗口,那么您可以看到我们的 Ghost 应用程序的轮廓 - 您可以移动它,它会很好地响应键盘/鼠标输入。 它只是看不见的,不是画出来的。

有人知道会发生什么吗? 为什么 Aero 配色方案很好,但其他配色方案就不行?

感谢您的帮助,

弗兰克

We have a service that launches an application that will interact with the logged on user. The application we launch is always run as a specific user for which we have the credentials. We do what is necessary (get active session ID, logonUser, adjust token) and launch the application with CreateProcessAsUser in the winsta0\Default desktop.

Everything is working fine if the color scheme of the Vista PC is Aero - but under the basic and classic color schemes, the application is still launched but none of the windows are painted. There is a new task on the taskbar. If you minimize a window which was in the background and in full screen, then you can see the contour of our ghost app - you can move it around, it will respond to keyboard/mouse input just fine. It's just invisible, not painted.

Does anyone has any idea of what could be happening? Why with the Aero color scheme it's fine but not in the others?

Thanks for any help,

Frank

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

爱*していゐ 2024-07-22 18:37:34

这听起来很奇怪——你可能已经发现了 Vista 中的一个实际错误,因为似乎其他人不太可能尝试过你正在做的事情。

首先,我要确保问题在由登录用户直接运行时不会表现出这种行为,只是为了确定它是 Aero/Classic 问题还是 winstation 问题。

其次,我将使用调试器附加到进程,并确保消息循环获取各种重要消息,特别是 WM_PAINT :)

但这很模糊,您唯一的选择可能是向 Microsoft 提出付费支持问题。

It sounds pretty weird - you may have hit on an actual bug in Vista since it seems unlikely many other people have tried what you are doing.

First of all I'd make sure the problem doesn't exhibit this behaviour when run by the logged in user directly, just to pin it down to whether it's a Aero/Classic issue or a winstation issue.

Secondly I'd attach to the process with a debugger and make sure the message loop is getting various significant messages, particularly WM_PAINT :)

But this is obscure enough that your only option may be to open a paid support issue with Microsoft.

嗳卜坏 2024-07-22 18:37:34

如果表单上有用户绘制的控件(或者表单本身是用户绘制的),也可能会出现问题。 如果您仅在 Application.RenderWithVisualStyles 为 true 时绘制表单,您可能会看到此行为。 因此,请确保您也渲染没有这些样式的内容。 如果您能了解更多有关您的表单的外观/行为/等的信息,我们将不胜感激。

There may also be a problem if you have user-drawn controls on your form (or your form itself is user-drawn). If you only paint the form if Application.RenderWithVisualStyles is true, you may see this behaviour. So make sure you also render stuff without these styles. More information how your form looks/behaves/etc would be appreciated.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文