microsoft / CsWin32

A source generator to add a user-defined set of Win32 P/Invoke methods and supporting types to a C# project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use System.Runtime.InteropServices.ComTypes.IStream instead of generating the interface

AArnott opened this issue · comments

We should consider using System.Runtime.InteropServices.ComTypes.IStream (and inspect that namespace for any other reusable types) instead of generating the type from the win32metadata.

This opens a can of worms around interfaces that use object or IntPtr instead of the native types that are described by win32metadata, including VARIANT.
Let's not fix this unless there are specific issues brought up by users.