microsoft / win32metadata

Tooling to generate metadata for Win32 APIs in the Windows SDK.
Other
1.34k stars 116 forks source link

IXpsOMGeometryFigure::SetSegments definition is wrong #1889

Closed smourier closed 5 months ago

smourier commented 6 months ago

IXpsOMGeometryFigure::SetSegments method definition is wrong.

It's currently defined as

unsafe void SetSegments(uint segmentCount, uint segmentDataCount, XPS_SEGMENT_TYPE* segmentTypes, in float segmentData, BOOL* segmentStrokes);

while it should be

unsafe void SetSegments(uint segmentCount, uint segmentDataCount, XPS_SEGMENT_TYPE* segmentTypes, float* segmentData, BOOL* segmentStrokes);

Reference: https://learn.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-setsegments

HRESULT SetSegments(
  [in] UINT32                 segmentCount,
  [in] UINT32                 segmentDataCount,
  [in] const XPS_SEGMENT_TYPE *segmentTypes,
  [in] const FLOAT            *segmentData,
  [in] const BOOL             *segmentStrokes
);
mikebattista commented 5 months ago

The metadata looks correct to me. I don't see what's wrong.

[Documentation("https://learn.microsoft.com/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-setsegments")]
unsafe HRESULT SetSegments([In] uint segmentCount, [In] uint segmentDataCount, [In][Const] XPS_SEGMENT_TYPE* segmentTypes, [In][Const] float* segmentData, [In][Const] BOOL* segmentStrokes);
smourier commented 5 months ago

The metadata looks correct to me. I don't see what's wrong.

Absolutely, sorry for that, I must have been observing something else!