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
DataObject.GetData(FileContents) returns null #3026
Comments
I never used this particular format myself so I can't guess which application you might have used. You'll probably have to be more specific in how to repro, since DataObject content is highly dependent on how the source application presents it data. |
Select any file in File Explorer, ctrl+C However, the FileContents format returns null. |
Thanks, I can repro the null return value, but it happens both in Desktop Framework and .NET Core. From debugging the .NET Core implementation I see that the clipboard returns a I tried various different files in case this was file-dependent but I could not get it to work, neither in Desktop Framework nor in .NET Core. Do you have a scenario which works for you in Desktop Framework? because you said
|
I've confirmed the "bad data" is actually a .net bug. .net is probably not using the |
Nice! Do you have a fix suggestion? |
@RussKie Yeah I have a full implementation of clipboard APIs - including metafiles, EMF and file streams, here: Specifically see https://github.com/asklar/clipview/blob/master/src/Clipboard/DataObject.cs the parts about |
Hello world, I have a question. Analyzing the memory with HxD on the local PC, after having selected 3 files and pressed Ctrl+C on remote PC and having called I'm talking about 3 files: PIANURA.txt, COLLINA.txt, MONTAGNA.txt; the content is the same as the name, minus the .txt extension.
Does anyone have experience with this stuff? |
.NET Core SDK (reflecting any global.json):
Version: 3.1.201
Commit: b1768b4ae7
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19041
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.201\
Host (useful for support):
Version: 3.1.3
Commit: 4a9f85e9f8
.NET Core SDKs installed:
3.1.201 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
No
Problem description:
IDataObject.GetFormats returns FileContents, but IDataObject.GetData("FileContents") returns null
Expected behavior:
Returns the file contents
Minimal repro:
The text was updated successfully, but these errors were encountered: