Open thlac opened 5 years ago
Need more info, is this ia native app or managed app?
Sorry, that's what I meant by win32, it's a fully native app. I've edited the original post to reflect this.
I can't share the program in question, but you can download something like quassel for win64(irc client), and delete qt5gui.dll to get the same effect.
If you run the same program from cmd.exe
, I'm guessing you'll get a popup about a dll that can't be found.
Assuming so, the cause is this line of code.
You can use P/Invoke to enable popups - see the docs on SetErrorMode
. Personally I think the error mode should be 0
instead of SEM_FAILCRITICALERRORS
, but I can see reasonable people wanting the current behavior. At a minimum though, I think any interactive commands should display the popup.
Yep, that's exactly it, you get an error dialog if you run it in any other way.
I also agree that we probably only want the behaviour interactively, though I'm not sure how the behaviour would be while headless or in a Windows Nano Server setting.
So I ran into an issue where an application unexpectedly would no longer launch when called directly from the shell, i.e. ".\appname.exe"
After troubleshooting for a bit with my trusty old friend Process Monitor, I could see the process opening and closing down again, looking at the Process Exit event, I saw the exit code of -1073741515 (aka. 0xC0000135, aka. STATUS_DLL_NOT_FOUND)
That was a quite easy fix, but it nagged me that I got no indication of the failure, in any other circumstance (running from cmd, double-clicking in explorer, run or even in powershell with Start-Process) a message would pop up stating a DLL was missing, and which one it was.
(I don't know if this issue extends to Linux/MacOS, or even if it can affect those platform)
Steps to reproduce
Expected behavior
Actual behavior
Environment data