-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Microsoft.Win32.OpenFileDialog.ShowDialog does not work #574
Comments
Thanks, @jbe2277. There is an internal email thread discussing the same problem, but the repro wasn't consistent. I'll look at this immediately. |
Info: I'm using the Azure VM with VS 2019. So I'm connected via RDP (Remote Desktop). |
The window handle parameter is correct in RunVistaDialog but corrupted before it reaches the COM component.
|
WPF is returning a struct for the HRESULT instead of Int32, which is no longer supported as of recent (strict) coreclr changes. |
@ryalanms thats unfortunate, we also have a HRESULT struct in our own interop code, made the interop so much more readable. Do you have a link to the coreclr changes? |
Never mind, found dotnet/coreclr#23955 with ongoing discussion about restoring that particular behavior |
Fixed by dotnet/coreclr#23974. |
Calling
Microsoft.Win32.OpenFileDialog.ShowDialog(ownerWindow)
does not work as expected. It does not show the dialog but returns immediately withtrue
. The property FileName is set to empty string "".Reproduce:
System.Waf.sln
in VS 2019.Samples/Writer/Writer.Presentation
as start-up projectExpected: The OpenFileDialog should be shown. You could compare this with the master branch (targets .NET 4.6.1)
Actual: A error message comes from the application that a file with empty file name cannot be opened.
The text was updated successfully, but these errors were encountered: