CreateDirect3D11DeviceFromDXGIDevice

IDXGIDevice から IDirect3DDevice のインスタンスを作成する。

CreateDirect3D11DeviceFromDXGIDevice dxgiDevice, graphicsDevice

dxgiDevice : [var] 型: **[IDXGIDevice](/windows/desktop/api/dxgi/nn-dxgi-idxgidevice)\*** Direct3DDevice を作成する元となる [IDXGIDevice](/windows/desktop/api/dxgi/nn-dxgi-idxgidevice)。
graphicsDevice : [var] 型: **[IInspectable](/windows/desktop/api/inspectable/nn-inspectable-iinspectable)\*\*** DXGIDevice をラップする Direct3DDevice インスタンス。

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

解説

IDXGIDevice から IDirect3DDevice のインスタンスを作成する。

[戻り値]
型: [**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** ではなく
[CreateDirect3DDevice](/windows/desktop/api/d3d11/nf-d3d11-d3d11createdevice)
を呼び出すべきである。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