<div dir="ltr">The signature was a bit off, I was under the impression I was working from the C++ interface and so needed to add 'this' (the usual extra parameter from C perspective), but I think I was already in C. Now that I'm using jextract that's no longer a problem - the code is restructured to invoke functions via the generated Vtbl classes, which is indeed much easier.<br><br>I've made some good progress. In addition to factory creation, I can now enumerate the adapters and get a handle to the GetDesc1 function in IDXGIAdapter1Vtbl. However, invoking that function somehow crashes the JVM, so it seems some of my 2020-to-2025 FFM translations are wrong. <br><br>MemorySegment factory = IDXGIFactory1.reinterpret(<br>    fpointer.get(dxgi_h.C_POINTER, 0L), arena, null);<br><br>MemorySegment vtblFactory = IDXGIFactory1.lpVtbl(factory); <br>             <br>MemorySegment EnumAdapters1 = <br>    IDXGIFactory1Vtbl.EnumAdapters1(vtblFactory); <br><br>System.out.println("Handle to EnumAdapters1 created.");<br>      <br>MemorySegment adapterPtr = arena.allocate(dxgi_h.C_POINTER);<br>            <br>try {<br>    int adapterIndex = 0;<br>    int hresult = IDXGIFactory1Vtbl.EnumAdapters1.invoke(<br>        EnumAdapters1, factory, adapterIndex, adapterPtr);<br>                     <br>    System.out.println(<br>        "Invocation result: " + <br>        HexFormat.of().toHexDigits(hresult));<br>} catch (Throwable t) {<br>    t.printStackTrace();<br>}<br>                           <br>MemorySegment vtblAdapter = IDXGIAdapter1.lpVtbl(adapterPtr);<br>           <br>MemorySegment GetDescriptor1 = IDXGIAdapter1Vtbl.GetDesc1(vtblAdapter);<br>System.out.println("Handle to GetDescriptor1 created.");<br>         <br>MemorySegment adescPtr = DXGI_ADAPTER_DESC1.allocate(arena);<br>                <br>try {<br>    int hresult = IDXGIAdapter1Vtbl.GetDesc1.invoke(<br>        GetDescriptor1, adapterPtr, adescPtr);<br>                   <br>    System.out.println(<br>        "Invocation result: " + <br>        HexFormat.of().toHexDigits(hresult));<br>} catch (Throwable t) {<br>    t.printStackTrace();<br>}<br>                <br>Hugo</div>