Skip to content

Commit

Permalink
Unify the IDataObject interface with the one in the BCL
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed May 28, 2022
1 parent 58d0684 commit fc681a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Microsoft.Windows.CsWin32/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class Generator : IDisposable

internal static readonly Dictionary<string, TypeSyntax> AdditionalBclInteropStructsMarshaled = new Dictionary<string, TypeSyntax>(StringComparer.Ordinal)
{
{ nameof(System.Runtime.InteropServices.ComTypes.IDataObject), ParseTypeName("global::System.Runtime.InteropServices.ComTypes.IDataObject") },
////{ "BOOL", PredefinedType(TokenWithSpace(SyntaxKind.BoolKeyword)) },
};

Expand Down Expand Up @@ -385,7 +386,7 @@ public Generator(string metadataLibraryPath, Docs? docs, GeneratorOptions option
this.delegateSignatureTypeSettings = this.generalTypeSettings with { QualifyNames = true };
this.enumTypeSettings = this.generalTypeSettings;
this.fieldOfHandleTypeDefTypeSettings = this.generalTypeSettings with { PreferNativeInt = false };
this.externSignatureTypeSettings = this.generalTypeSettings with { QualifyNames = true, PreferMarshaledTypes = true };
this.externSignatureTypeSettings = this.generalTypeSettings with { QualifyNames = true, PreferMarshaledTypes = options.AllowMarshaling };
this.externReleaseSignatureTypeSettings = this.externSignatureTypeSettings with { PreferNativeInt = false, PreferMarshaledTypes = false };
this.comSignatureTypeSettings = this.generalTypeSettings with { QualifyNames = true };
this.extensionMethodSignatureTypeSettings = this.generalTypeSettings with { QualifyNames = true };
Expand Down
1 change: 1 addition & 0 deletions test/Microsoft.Windows.CsWin32.Tests/GeneratorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ public void COMInterfaceWithSupportedOSPlatform(bool net50, bool allowMarshaling
"D3D9ON12_ARGS", // Contains an inline array of IUnknown objects
"NCryptOpenKey", // Generates a SafeHandle based on a UIntPtr
"X509_CERT", // A constant defined as PCSTR
"CIDLData_CreateFromIDArray", // Method with out parameter of a possibly marshaled interop type shared with the BCL,
"ID3D12Resource", // COM interface with base types
"ID2D1RectangleGeometry")] // COM interface with base types
string api,
Expand Down

0 comments on commit fc681a6

Please sign in to comment.