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

Add DataTransferManger interop APIs #1528

Merged
merged 9 commits into from
Mar 14, 2024

Conversation

Gaoyifei1011
Copy link
Contributor

Add DataTransferManger interop APIs

src/cswinrt/strings/ComInteropHelpers.cs Outdated Show resolved Hide resolved
src/cswinrt/strings/ComInteropHelpers.cs Outdated Show resolved Hide resolved
src/cswinrt/strings/ComInteropHelpers.cs Outdated Show resolved Hide resolved
src/cswinrt/strings/ComInteropHelpers.cs Outdated Show resolved Hide resolved
#else
public
#endif
static class DataTransferManagerInterop
Copy link
Member

Choose a reason for hiding this comment

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

Might be nice to add XML docs.

@manodasanW
Copy link
Member

I think for now as long as this new class is similar for the most part to the other interop classes, it is good. These look to be the docs for this interface. I will be retargeting this PR to the staging branch given this is an API surface change and that is our next planned assembly version change.

@manodasanW manodasanW changed the base branch from master to staging/AOT March 8, 2024 03:13
@manodasanW
Copy link
Member

Ran CI build.

@Marv51
Copy link

Marv51 commented Mar 8, 2024

Hey this sounds amazing! I would be so happy for this to be properly supported.
I looked at the class and it looks like this would fix my issues:
#970, microsoft/microsoft-ui-xaml#4886, microsoft/CsWin32#246 and microsoft/win32metadata#867
(I really tried to make this happen in 2021...)

…gerInterop

Use IIDataTransferManagerInteropMethods to implement DataTransferManagerInterop.
Because IDataTransferManagerInterop COM interfaces are not inherited from IInspectable, but IUnknown
Gaoyifei1011 and others added 3 commits March 13, 2024 15:33
Co-authored-by: Manodasan Wignarajah <manodasan@hotmail.com>
Co-authored-by: Manodasan Wignarajah <manodasan@hotmail.com>
Update src/cswinrt/strings/ComInteropHelpers.cs
@@ -499,33 +499,35 @@ namespace Windows.ApplicationModel.DataTransfer
#endif
static class DataTransferManagerInterop
{
private static readonly global::System.Guid IDataTransferManagerInterop_IID = new global::System.Guid("3A3DCD6C-3EAB-43DC-BCDE-45671CE800C8");
private static readonly global::System.Guid IDataTransferManagerInterop_IID = new global::System.Guid(0x3A3DCD6C, 0x3EAB, 0x43DC, 0xBC, 0xDE, 0x45, 0x67, 0x1C, 0xE8, 0x00, 0xC8);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is wrong endianess.

Copy link
Member

Choose a reason for hiding this comment

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

Correct me if I am wrong, but this uses the format where the values goes as parameters and not in the byte array where we need to flip it for endianness, so I think this is correct right?

https://learn.microsoft.com/en-us/dotnet/api/system.guid.-ctor?view=net-8.0#system-guid-ctor(system-int32-system-int16-system-int16-system-byte-system-byte-system-byte-system-byte-system-byte-system-byte-system-byte-system-byte)

@manodasanW
Copy link
Member

I think once the last set of feedback is addressed, we should be good with this change.

@manodasanW
Copy link
Member

Thanks for this change, will merge once CI is done.

@manodasanW
Copy link
Member

CI finished and all tests passed.

@manodasanW manodasanW merged commit 4060a0f into microsoft:staging/AOT Mar 14, 2024
1 check passed
@manodasanW manodasanW linked an issue Mar 19, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please simply wrap the DataTransferManager interop class
5 participants