-2

According to Microsoft, "If [the system] cannot locate the DLL, the system terminates the process and displays a dialog box that reports the error. " This is the result I get when I run my application outside of the command line, but I do not get the same system error when I run the application from a shell environment such as command prompt or powershell.

Is there a way to show the same error message when the application is run from a command line interface?

https://msdn.microsoft.com/en-us/library/aa271571(v=vs.60).aspx

jskier12
  • 1
  • 2
  • The system dialog box is shown for command line programs that have missing dependencies. Your reference to parameters is confusing/unclear. – Richard Critten Jan 02 '18 at 22:35
  • Missing arguments aren’t system errors. It’s a decision in the program logic. –  Jan 02 '18 at 22:57

1 Answers1

0

SetErrorMode(GetErrorMode() & ~SEM_FAILCRITICALERRORS);

but I don't think you want to do this, as you do not know in which environment the user will run your application. It is usually now a good idea to popup a dialogbox in e.g. a service environment. What is the problem with examining the error code of whatever is failing e.g. LoadLibrary() and reacting to this error?