CMCHTPC / DelphiDX12

DirectX 12 Headers for Delphi and FPC
92 stars 35 forks source link

ID2D1BitmapRenderTarget.CreateSolidColorBrush Params Error? #4

Closed TopPlay closed 6 years ago

TopPlay commented 6 years ago

MSDN: ` HRESULT CreateSolidColorBrush( [ref] const D2D1_COLOR_F &color, [out] ID2D1SolidColorBrush **solidColorBrush );

`

` ID2D1RenderTarget = interface(ID2D1Resource) ['{2cd90694-12e2-11dc-9fed-001143a055f9}'] function CreateSolidColorBrush(const color: TD2D1_COLOR_F; {brushProperties: PD2D1_BRUSH_PROPERTIES;} out solidColorBrush: ID2D1SolidColorBrush): HResult; stdcall;

`

CMCHTPC commented 6 years ago

Be carefull with the MSDN functions. There are many functions that are overloaded. For your example look here https://msdn.microsoft.com/en-us/library/windows/desktop/dd742843(v=vs.85).aspx

The functions in the header translations are the pure native interface functions without the overloaded functions,

CMCHTPC commented 6 years ago

There is a solution now available with the latest FPC trunk version. See this post https://forum.lazarus.freepascal.org/index.php/topic,39549.0.html. So the interface defintions could be updated. Which would take some time, but is possible now.