can I detect wheather madexcept is used inside an delphi application by analyzing the exe file only ?
Is there a simple way by adding a few lines of code to my application and inform the final exe file user if madshi madexcept has been used or not
You can do a plain text search for the text "madexcept". The easiest way to do that that I know of is with command line utilities. I would combine the strings and grep utilities like this:
C:\mydir>strings MyApp.exe | grep -i madexcept MadException MadExceptionT madExcept madExcept U9v;1 madExcept5 A madExcept madExcept madExcept1 c madExceptL c madExcept c madExcept c madExceptL c madExcept c madExcept madExcept c madExceptH This way madExcept can't install the thread hooks. .........
I personally use GnuWin32 as my source for these indispensable utilities.
If you are not a command line sort of a person, use Process Explorer. Run the executable and then run Process Explorer. Find the process and double click it. The brings up the Process Explorer properties dialog which contains a page named Strings. Select that page and click on the save button. Now you have a text file with all the strings in the executable in which you can search.
All this will tell you is that you compiled the madExcept code into your program. You won't know whether or not it is actually active.
If you use
madexcept
with a Delphi application, there should be a resource entry:MAD->EXCEPT
in that executable.To test an external application:
To test inside your own application:
Note that whis however will NOT tell you what options
madexcept
uses. for example there could be an exception filter set to filter access violation exceptions, or a setting that will NOT check frozen threads etc...