如何将DXGI共享资源的句柄传递给另一个进程? [英] How do I pass a handle of DXGI shared resource to another process?

查看:305
本文介绍了如何将DXGI共享资源的句柄传递给另一个进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

https://msdn.microsoft.com/zh-CN/library/windows/desktop/bb174562(v=vs.85).aspx

根据IDXGIResource :: GetSharedHandle的文档,我应该能够将该句柄编组到另一个进程,以便与另一个进程中的设备共享资源".

According to the documentation of IDXGIResource::GetSharedHandle, I should be able to "marshal this handle to another process to share a resource with a device in another process".

但不清楚如何传递此句柄.我可以将此句柄的值传递给另一个进程吗?还是我需要一些特定的方法?

But it's not clear how to pass this handle. Can I just pass the value of this handle to another process? Or do I need some specific method?

谢谢!

推荐答案

是的,您可以将此句柄直接传递给另一个进程并通过OpenSharedResource函数访问它.

Yes, you can pass this handle directly to another process and access it via OpenSharedResource function.

这篇关于如何将DXGI共享资源的句柄传递给另一个进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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