microsoft / CsWin32

A source generator to add a user-defined set of Win32 P/Invoke methods and supporting types to a C# project.
MIT License
2.12k stars 92 forks source link

Incorrect triple pointer for `MFEnumDeviceSources` #1257

Open diontools opened 3 months ago

diontools commented 3 months ago

Actual behavior

[DllImport("MF.dll", ExactSpelling = true)]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
internal static extern unsafe winmdroot.Foundation.HRESULT MFEnumDeviceSources(winmdroot.Media.MediaFoundation.IMFAttributes pAttributes, out winmdroot.Media.MediaFoundation.IMFActivate pppSourceActivate, uint* pcSourceActivate);

Expected behavior

out IntPtr* pppSourceActivate

https://learn.microsoft.com/en-us/windows/win32/api/mfidl/nf-mfidl-mfenumdevicesources

Repro steps

  1. NativeMethods.txt content:

    MFEnumDeviceSources
  2. NativeMethods.json content (if present):

  3. Any of your own code that should be shared?

Context

Related Issue