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 |
| URL | https://github.com/inovia/IronHSP |
| 備考 | Win32 API の d3d11.dll 関数群。CsWin32 + win32metadata から自動生成。
hsp3net 専用 (intptr / NSTRUCT / wstr を使用)。 |
| タイプ | 拡張命令 |
| グループ | Win32API |
| 対応環境 |
|
| hs ファイル | hsphelp\win32_d3d11_gen2.hs |