David Kahurani (@kahurani) commented about include/dxcore_interface.h:
- STDMETHOD_(ULONG, AddRef) (THIS) PURE;
- STDMETHOD_(ULONG, Release) (THIS) PURE;
- /* IDXCoreAdapter methods */
- STDMETHOD_(BOOL, IsValid) (THIS) PURE;
- STDMETHOD_(BOOL, IsAttributeSupported) (THIS_ GUID attribute) PURE;
- STDMETHOD_(BOOL, IsPropertySupported) (THIS_ DXCoreAdapterProperty property) PURE;
- STDMETHOD(GetProperty) (THIS_ DXCoreAdapterProperty property, size_t buffer_size, void *buffer) PURE;
- STDMETHOD(GetPropertySize) (THIS_ DXCoreAdapterProperty property, size_t *buffer_size) PURE;
- STDMETHOD_(BOOL, IsQueryStateSupported) (THIS_ DXCoreAdapterState property) PURE;
- STDMETHOD(QueryState) (THIS_ DXCoreAdapterState state, size_t state_details_size, const void *state_details, size_t buffer_size, void *buffer) PURE;
- STDMETHOD_(BOOL, IsSetStateSupported) (THIS_ DXCoreAdapterState property) PURE;
- STDMETHOD(SetState) (THIS_ DXCoreAdapterState state, size_t state_details_size, const void *state_details, size_t buffer_size, const void *buffer) PURE;
- STDMETHOD(GetFactory) (THIS_ REFIID riid, IUnknown **ppv) PURE;
- #ifdef __cplusplus
- template <class T>
I'm looking at this and thinking that that `sizeof(T)` might not always give the correct size for the buffer, especially if the buffer is an array. I don't know what exactly is required but I thought I should note this.