c++winapisystem-error

Disable System Error Popup On Run time (DLL Dependencies)


I am working on a WINAPI project which has a few .dll dependencies. Just for clarification, see below:

MyApplication.exe
Util.dll
MySpecialValuable.dll

Let's say I took away MySpecialValuable.dll from the folder path; I will get a message like this: My question is, is there a way I can disable the popup entirely - silently exit? Or somehow hide the name of the .dll inside the popup? This may seem pointless to most but I do not want to expose the libraries I am using.


Solution

  • You cannot "silently exit". The process hasn't started executing user code when the dialog is displayed by the system. Imports are resolved by the loader prior to executing user code.

    While there may be ways to configure the system to prevent the error dialog (which I am not aware of), you have other options:

    Make sure you understand, that none of those options will provide a solution to what you are ultimately trying to accomplish. A user could easily enable loader snaps and get full information on every single module that is loaded into your process.