-
Notifications
You must be signed in to change notification settings - Fork 214
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
CoInitializeEx return value RPC_E_CHANGED_MODE not handled correctly #72
Comments
Thanks for finding this!
so that it won't bail out if that specific error is returned from the |
mlabbe
added a commit
that referenced
this issue
Sep 27, 2019
semantic compress COM lifetime handling #72
Fix in master branch. Version bumped to 1.1.5. |
btzy
added a commit
to btzy/nativefiledialog-extended
that referenced
this issue
Apr 24, 2021
…LTITHREADED See mlabbe/nativefiledialog#72 for the issue in upstream NFD
btzy
added a commit
to btzy/nativefiledialog-extended
that referenced
this issue
Apr 24, 2021
…LTITHREADED See mlabbe/nativefiledialog#72 for the issue in upstream NFD
btzy
added a commit
to btzy/nativefiledialog-extended
that referenced
this issue
Apr 24, 2021
…COINIT_MULTITHREADED See mlabbe/nativefiledialog#72 for the issue in upstream NFD
btzy
added a commit
to btzy/nativefiledialog-extended
that referenced
this issue
Apr 25, 2021
…COINIT_MULTITHREADED See mlabbe/nativefiledialog#72 for the issue in upstream NFD
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On Windows, in NFD_OpenDialog, COM is initialized like this:
Unfortunately, if COM has already been initialized in the process through COINIT_MULTITHREADED, the above call will fail (but COM will still work). See https://docs.microsoft.com/en-us/windows/win32/api/combaseapi/nf-combaseapi-coinitializeex.
And if the above call fails, NFD_OpenFileDialog just bails. This breaks our application.
I can think of three solutions:
We use this library through https://github.com/saurvs/nfd-rs , but this is easily reproducible by adding a a
CoInitializeEx(NULL, COINIT_MULTITHREADED);
call to main() in test_opendialog.c.The text was updated successfully, but these errors were encountered: