Skip to content

Commit

Permalink
Merge pull request #865 from microsoft/fix861
Browse files Browse the repository at this point in the history
Emit an explanatory warning when users request generation of `IDispatch` or `IUnknown`
  • Loading branch information
AArnott authored Feb 22, 2023
2 parents 0de3517 + 35d2d1f commit 93b50df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Microsoft.Windows.CsWin32/Generator.Invariants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,9 @@ public partial class Generator
.Add("ULARGE_INTEGER", "Use the C# ulong keyword instead.")
.Add("OVERLAPPED", "Use System.Threading.NativeOverlapped instead.")
.Add("POINT", "Use System.Drawing.Point instead.")
.Add("POINTF", "Use System.Drawing.PointF instead.");
.Add("POINTF", "Use System.Drawing.PointF instead.")
.Add("IUnknown", "This COM interface is implicit in the runtime. Interfaces that derive from it should apply the [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] attribute instead.")
.Add("IDispatch", "This COM interface is implicit in the runtime. Interfaces that derive from it should apply the [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] attribute instead.");

/// <summary>
/// Gets a map of interop APIs that should not be generated when marshaling is allowed, and messages to emit in diagnostics if these APIs are ever directly requested.
Expand Down

0 comments on commit 93b50df

Please sign in to comment.