如何拦截高级 GDI 绘图命令?

发布于 2024-07-18 04:10:35 字数 232 浏览 5 评论 0原文

我正在尝试制作一个允许远程访问其他应用程序(在不同计算机上运行)的应用程序。 这个想法是让用户透明地访问某些应用程序,我基本上有两个选择:

  • 应用程序流
  • 拦截绘制命令并在客户端中重现它们

(当然,输入从客户端重定向到服务器)

我有一个具有应用程序流的工作版本,但我不知道如何通过 Win API 中的挂钩来完成它......

有什么想法吗?

I'm trying to make a application that allows remote access to other applications (running on different machines). The idea is to make give users transparent accesso to certain applications, I've basically two options:

  • Application Streaming
  • Intercepting draw command and reproduce them in the client

(of course, the input is redirected from the client to the server)

I've a working version with application streaming, but I don't have a clue of how to do it through hooking in the Win API...

Any ideas ?

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

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

发布评论

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

评论(1

娇俏 2024-07-25 04:10:35

您所描述的内容听起来很像 Windows 图元文件。 图元文件将所有 GDI 绘图命令捕获到一个文件中; 然后,该文件可以传递到远程 PC 并在那里渲染。

对于初学者,请参阅 CreateEnhMetaFile。 这将返回设备上下文的句柄,您可以绘制到该设备上下文,而不是绘制到普通屏幕设备上下文。

What you're describing sounds a lot like a Windows metafile. The metafile captures all GDI drawing commands to a file; that file can then be passed to a remote PC and rendered there.

See CreateEnhMetaFile for starters. This returns a handle to a device context, which you draw to instead of drawing to the normal screen device context.

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