CreateDirect3D11SurfaceFromDXGISurface

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

CreateDirect3D11SurfaceFromDXGISurface dgxiSurface, graphicsSurface

dgxiSurface : [var] 
graphicsSurface : [var] 型: **[IInspectable](/windows/desktop/api/inspectable/nn-inspectable-iinspectable)\*\*** [IDXGISurface](/windows/desktop/api/dxgi/nn-dxgi-idxgisurface) をラップする [IDirect3DSurface](/uwp/api/windows.graphics.directx.direct3d11.idirect3dsurface) インスタンス。

(プラグイン / モジュール : d3d11.dll)

解説

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

[戻り値]
型: [**HRESULT**](/windows/desktop/com/structure-of-com-error-codes)
関数が成功すると **S_OK** を返す。失敗時は
[**HRESULT**](/windows/desktop/com/structure-of-com-error-codes)
[エラーコード](/windows/desktop/com/com-error-codes-10) を返す。

[備考]
[C++/WinRT](/windows/uwp/cpp-and-winrt-apis/index) の使用を推奨するが、C++/CX
を使っている場合は **CreateDirect3D11DeviceFromDXGIDevice** ではなく
[CreateDirect3DSurface](./nf-windows-graphics-directx-direct3d11-interop-createdirect3dsurface.md)
を呼び出すべきである。WRL を使っている場合は、このコード例のように
**CreateDirect3D11DeviceFromDXGIDevice** を利用できる。
このドキュメントは省略されている。

情報

プラグイン / モジュールd3d11.dll
バージョン1.0
作成日2026/04/16
著作者IronHSP / CsWin32 bridge
URLhttps://github.com/inovia/IronHSP
備考Win32 API の d3d11.dll 関数群。CsWin32 + win32metadata から自動生成。
hsp3net 専用 (intptr / NSTRUCT / wstr を使用)。
タイプ拡張命令
グループWin32API
対応環境
  • Windows 版 HSP
hs ファイルhsphelp\win32_d3d11_gen2.hs