如何在机器锁定时获取屏幕截图... C ++代码 [英] How do I get Screenshot when machine is locked... C++ code

查看:92
本文介绍了如何在机器锁定时获取屏幕截图... C ++代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在开发屏幕共享应用程序。我正在使用下面的代码。

Hi,

I am developing Screen sharing application. I am using below code.

HDC hdcDesktop = GetDC(NULL);
StretchBlt(m_hScreenDC, 0,0, m_captureWidth, m_captureHeight, hdcDesktop,
            0,0, GetSystemMetrics (SM_CXSCREEN), GetSystemMetrics (SM_CYSCREEN), SRCCOPY);
ReleaseDC(NULL,hdcDesktop);



当屏幕被锁定时,它工作正常但不起作用。我的机器上运行了一些自动化应用程序,我希望通过监视它来查看它的工作情况,但我的屏幕截图不能在锁定的机器上工作。



到目前为止我知道是窗口创建安全桌面和上面的代码将无法正常工作。



我相信WebEx也无法锁定机器。



任何人都有任何建议或想法请分享。


Its working perfectly but not working when screen is locked. There is some Automation application running on my machine and I want to see working of it by monitoring it but not my screen capturer not working on locked machine.

So far I know is window create secure desktop and above code will not work.

I believe WebEx also not working on locked machine.

Any one have any suggestion OR Idea please share.

推荐答案

登录界面是一个在NT_AUTHORITY \SYSTEM下运行的独立桌面,你不在可以访问。

为了能够在这样的私有环境中使用GUI,有一些快捷方式,如 this [ ^ ],但最终工具是 PsExec [ ^ ]由SysInternal的Mark Russinovich撰写。它使用服务助手在远程计算机上运行程序,或在本地计算机上运行NT_AUTHORITY \ SYSTEM。帮助程序服务打开命名管道以与本地应用程序通信以获取命令和返回状态。

PsExec不可再分发且源不可用,但存在一个名为PaExec [ ^ ]。您可以下载它并查看...

您应该使用PaExec在NT_AUTHORITY \SYSTEM下启动您的应用程序,以访问登录屏幕的DC并捕获图像。但正如我所说这是一个孤立的DC,所以要从用户屏幕和系统屏幕捕捉快照,你必须运行你的应用程序的2个实例。
The logon screen is an isolated desktop running under NT_AUTHORITY\SYSTEM where you don't have access.
To be able to use GUI on such private environment there are some shortcuts like this[^], but the definitive tool is PsExec[^] by SysInternal's Mark Russinovich. It uses a service helper to run programs on a remote machine, or on a local machine as NT_AUTHORITY\SYSTEM. The helper service opens a named pipe to communicate with local application to get commands and return status.
PsExec is not redistribuitable and sources are not available, but exists an open version called PaExec[^]. You can download it and have a look...
You should use PaExec to launch your app under NT_AUTHORITY\SYSTEM to have access to the DC of logon screen and capture immages. But as I said this is an isolated DC so to catch snapshots from user screen and system screen you have to run 2 instances of your app.


这篇关于如何在机器锁定时获取屏幕截图... C ++代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆