Skip to content

Add dxcapi.h to header scrape #5191

Closed

Description

Description

dxcapi.h, and its import lib dxcompiler.lib, are not included in the header scrape. It contains the shader compiler apis needed for SM 6.0+.

Note that while these APIs return COM interface pointers, they are not annotated with _COM_Outptr_, so in my testing, they don't generate Result<T> returning bindings.

extern "C" DXC_API_IMPORT
    HRESULT __stdcall DxcCreateInstance(_In_ REFCLSID rclsid, _In_ REFIID riid,
                                        _Out_ LPVOID *ppv);

extern "C" DXC_API_IMPORT
    HRESULT __stdcall DxcCreateInstance2(_In_ IMalloc *pMalloc,
                                         _In_ REFCLSID rclsid, _In_ REFIID riid,
                                         _Out_ LPVOID *ppv);

win32metadata contain these APIs and include COM out annotations:

ILSpy

[DllImport("dxcompiler.dll", ExactSpelling = true, PreserveSig = false)]
public unsafe static extern HRESULT DxcCreateInstance([In][Const] Guid* rclsid, [In][Const] Guid* riid, [Out][ComOutPtr] void** ppv);

Request

Include dxcapi.h in the header scrape. Will need to address #5190 to include the CLSIDs defined in the header. Updating the COM annotations can be a separate issue, but I don't know for who.

Activity

  1. added
    windows-clang
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    windows-clang

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions