次の方法で共有


interop::CreateDirect3D11SurfaceFromDXGISurface 関数 (windows.graphics.directx.direct3d11.interop.h)

IDXGISurface から IDirect3DSurface のインスタンスを作成します。

構文

HRESULT CreateDirect3D11SurfaceFromDXGISurface(
        IDXGISurface *dgxiSurface,
  [out] IInspectable **graphicsSurface
);

パラメーター

dgxiSurface

[out] graphicsSurface

種類: IInspectable**

IDXGISurface をラップする IDirect3DSurface インスタンス。

戻り値

型: HRESULT

関数が成功した場合は、S_OK を返します。 それ以外の場合は、 HRESULTエラー コードが返されます。

注釈

C++/WinRT をお勧めしますが、C++/CX を使用している場合は、CreateDirect3D11DeviceFromDXGIDevice の代わりに CreateDirect3DSurface を呼び出す必要があります。 WRL を使用している場合は、次のコード例に示すように CreateDirect3D11DeviceFromDXGIDevice を使用できます。

using namespace Microsoft::WRL;
ComPtr<ABI::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface> surface;
ComPtr<IInspectable> inspectableSurface;
If (SUCCEEDED(CreateDirect3D11SurfaceFromDXGISurface(dxgiSurface, &inspectableSurface))
{
    hr = inspectableSurface.As(&surface);
}

要件

要件
対象プラットフォーム Windows
ヘッダー windows.graphics.directx.direct3d11.interop.h
Library D3D11.lib
[DLL] D3D11.dll

こちらもご覧ください

コア関数