Closed austinbhale closed 3 months ago
This is a different case for IMFSourceReader since it's properly annotated (old interfaces like DirectX9 are not).
But the current generated code didn't honor the _Reserved_
annotation which means it must be 0 for an int or null pointer for a pointer.
I've fixed it with this commit, https://github.com/smourier/DirectN/commit/ed373f79675dcca57f91e91bf41df41a3b245af9 It's a breaking change but it wasn't possible to run it as it was anyway.
As for int vs uint, the generator is based on native C/C++ header file so this is dependent on what the native headers define. DWORD ends up as uint. At binary level it's obviously equivalent for small positive numbers (like a stream index here).
Thanks.
Perfect thanks so much and for this super helpful project :)
Similar to your solution in https://github.com/smourier/DirectN/issues/41#issuecomment-1636109286, I had to make a couple modifications
From: https://github.com/smourier/DirectN/blob/2f640df7f4fe8d69678debdba2043b8da11020f5/DirectN/DirectN/Generated/IMFSourceReader.cs#L23
To:
The
IntPtr
is a logical change, but I'm not sure why specifying auint
for the first parameter was not allowed sinceint
resolved it. This is using DirectNStandard v1.16.0 for x64