Error Running jextract on d3d12.h
Ty Young
youngty1997 at gmail.com
Tue Sep 15 18:57:51 UTC 2020
On 9/15/20 12:35 PM, Maurizio Cimadamore wrote:
> After throwing the kitchen sink at your example (I set up Windows on a
> virtual instance to play with it), I was able to reproduce the issue.
>
> I discussed this with Jorn offline and Jorn pointed out at an issue
> that I should have spotted much earlier (thanks!) - the issue is that
> when looking at API docs like:
>
> https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-createcommandqueue
>
>
> This is actually the description of the C++ API.
>
> The C API almost always takes some extra parameter - in the case of
> this function, the first parameter must be a device pointer.
Which is where the first pointer argument came from when I suggested the
FunctionDescriptor/MethodType to use. The C style interface copied in a
previous email had:
HRESULT ( STDMETHODCALLTYPE *EnumAdapters )(
IDXGIFactory * This,
/* [in] */ UINT Adapter,
/* [annotation][out] */
_COM_Outptr_ IDXGIAdapter **ppAdapter);
I missed the return enum by accident, my bad.
FYI, the C style interface are not officially supported and have supposedly been removed from Windows 10's SDK somewhat recently:
https://github.com/microsoft/DirectX-Graphics-Samples/issues/589
Of course it doesn't mean it won't work or isn't worth doing, just pointing out that C isn't the intended language.
More information about the panama-dev
mailing list