I'm evaluating madExcept under Delphi XE4, 32 bit target. After having created a new VCL project, I enabled madExcept using the settings window. However, when I run the project, the following error message is displayed into the "messages" view :
[madExcept] Mapping binary file failed.
...and there is no madExcept dialog when an exception is raised by the compiled application.
We encountered the same problem on XE4 with madCollection 2.7.6.0.
When I upgraded to 2.7.7.0, the problem also went away.
I then uninstalled the madCollection installer, and simply installed the BPLs from 2.7.7.0 directly (which we do on all of our developer machines to allow us to manage 3rd party components more easily), I ended up with a similar error messages as before:
From the message, it sounds like it doesn't know where to find madExceptPatch.exe. Can you tell me how the tool is found for patching at the end of the build process? I've tried copying madExceptPatch.exe into a folder in the windows Path, and adding back registry values to match what the installer does, but so far, haven't found the right combination. I've already verified that running madExceptPatch on the command line, using our .mes file and the map file, works properly.
(1) Download http://madshi.net/HookProcessCreation.zip
(2) Start DllInjector and inject the 32bit hook dll. Leave the DllInjector GUI open.
(3) Compile your project in such a way that madExcept fails to patch your exe.
The "HookProcessCreation" download is in theory just a little demo which shows what my library "madCodeHook" can do. But in this case it will be useful to find out which exact command line madExcept called "madExceptPatch.exe" with. Once you've found out the command line, please start a command prompt window and try the same command line. What does madExceptPatch.exe report? Probably some sort of error?
When you've got the command line, you can uninject the 32bit hook dll and close the DllInjector and delete the HookProcessCreation demo folder.
Great, thanks for your quick reply. This led us straight to where it's running from.
The command line was
"<folder_where_the_madExcept_BPLs_are_located>\..\tools\madExceptPatch.exe" <exe filename> <mes filename>
As soon as I created this folder, and dropped in madExceptPatch.exe, everything worked properly.
Is the tool just being sought in a folder relative to the BPL? ie "..\tools"? Or is there also a registry key or some other setting that can override this?
I'm not sure I understand. Have you moved the design time BPLs to a different folder? Or why would madExceptPatch.exe not be positioned in "..\tools\"? The installer should install the files with those relative paths, so unless you moved the files around manually, everything should work out fine. Obviously madExceptWizard_.bpl needs to be able to locate madExceptPatch.exe somehow in order to successfully start it.
Yes, that's exactly right. For each of the many 3rd party component we use, we have scripts that move around and register BPLs directly, put files in system paths, add registry keys, etc, so that we don't have to run each component's installer and uninstaller every time we upgrade them or make modifications. It makes things far easier for us to manage on all of our developer machines.
Now that I know that madExceptpatch is required to be in <madExceptWizard_.bpl folder>\..\tools, I can make sure our environment gets set up correctly.
I have the same issue, but I am wondering if it is the type of project I am creating. I created developed a set of ActiveX controls from a set of VCL controls. So the end result is an ActiveX which is a form of DLL. Can MadExcept work with this kind of project or only a VCL Forms application?
It should generally work fine with an ActiveX control, too. Which madExcept version are you using? Make sure you're using the latest 4.0.10. Does the problem then still occur?