@Kas Ob.
Also nur eine Pascal declaration order (VTable) kann korrekt funktionieren, aber welche?
Für IDWriteFontSet1 gibt es nun noch eine weitere Variante
hier
Delphi-Quellcode:
function GetFilteredFonts(
const {count: indexCount} indices: PUInt32; indexCount: UInt32;
out {COM out pointer} filteredFontSet: IDWriteFontSet1): HRESULT;
stdcall;
overload;
function GetFilteredFonts(
const {count: fontAxisRangeCount} fontAxisRanges: PDWRITE_FONT_AXIS_RANGE; fontAxisRangeCount: UInt32; selectAnyRange: BOOL;
out {COM out pointer} filteredFontSet: IDWriteFontSet1): HRESULT;
stdcall;
overload;
function GetFilteredFonts(
const {count: propertyCount} properties: PDWRITE_FONT_PROPERTY; propertyCount: UInt32; selectAnyProperty: BOOL;
out {COM out pointer} filteredFontSet: IDWriteFontSet1): HRESULT;
stdcall;
overload;
Strangely enough it seems Rust guys ditched this IDWriteFontSet1 altogether
I am not sure what exactly is your question, so sorry, but if you asking about the correctness of the implementation and VTable layout, then using the header file lets say from
https://github.com/apitrace/dxsdk/bl....h#L3053-L3099 will be correct as long as you are using Visual Studio compiler, but as i listed few example earlier and how even Rust struggling to fix this mess, as suggested a correct layout and re-ordering of these overloaded interface methods that will fic this once and for all.
And the correct order for Pascal/Delphi and Rust and any other compiler or language (as long it will not act like VS compiler and switch order) should be as posted before this one :
Delphi-Quellcode:
function GetFilteredFonts(indices: UINT32;
indexCount: UINT32;
out filteredFontSet: IDWriteFontSet1): HResult; overload; stdcall;
function GetFilteredFonts(properties: PDWRITE_FONT_PROPERTY;
propertyCount: UINT32;
selectAnyProperty: BOOL;
out filteredFontSet: IDWriteFontSet1): HResult; overload; stdcall;
function GetFilteredFonts(fontAxisRanges: DWRITE_FONT_AXIS_RANGE;
fontAxisRangeCount: UINT32;
selectAnyRange: BOOL;
out filteredFontSet: IDWriteFontSet1): HResult; overload; stdcall;
Simply order-reverse overloaded methods at first occurrence, of course if they are scattered between other methods then group them at first occurrence.
The header mentioned at
https://www.winsoft.sk/win32api.htm is wrong and doesn't comply with Windows
SDK, so i will assume someone might tried one function and only fixed it by shuffling them and didn't try the others, or just gave up, the order is wrong and look like this
Delphi-Quellcode:
procedure GetFilteredFonts(
const {count: indexCount} indices: PUInt32; indexCount: UInt32;
out {COM out pointer} filteredFontSet: IDWriteFontSet1);
safecall;
overload;
procedure GetFilteredFonts(
const {count: fontAxisRangeCount} fontAxisRanges: PDWRITE_FONT_AXIS_RANGE; fontAxisRangeCount: UInt32; selectAnyRange: BOOL;
out {COM out pointer} filteredFontSet: IDWriteFontSet1);
safecall;
overload;
procedure GetFilteredFonts(
const {count: propertyCount} properties: PDWRITE_FONT_PROPERTY; propertyCount: UInt32; selectAnyProperty: BOOL;
out {COM out pointer} filteredFontSet: IDWriteFontSet1);
safecall;
overload;