Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GeneratedDllImport in Microsoft.Extensions.Hosting.WindowsServices, System.Drawing.Primitives, System.Management, System.Security.Cryptography.ProtectedData, System.Speech, System.Windows.Extensions #61949

Merged
merged 8 commits into from
Nov 23, 2021

Conversation

elinor-fung
Copy link
Member


internal static partial class Interop
{
internal static partial class Ole32
{
#pragma warning disable DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
// TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we annotate blittable types used in interop in CoreLib (like Guid)
[DllImport(Libraries.Ole32)]
internal static extern int CoGetObjectContext([MarshalAs(UnmanagedType.LPStruct)] Guid riid, out IntPtr ppv);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is COM, if it isn't too big of a change I suppose we could change this to Guid*?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a bunch of similar things around Guid, so I figure we can just keep their existing signatures and do a pass when we enable it (it is already noted in #60595).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants