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