Hi,
Is it possible to add a custom file in the exe directory as an attachment?
Exe directory is variable. Not a fixed directory in my case.
Thanks & Regards,
Ertan
Custom file adding to attachments
Re: Custom file adding to attachments
Yes, you can. In your exception handler, you can use "exceptIntf.AdditionalAttachments.Add()". See here:
http://help.madshi.net/MESettings.htm#IMEAttachments
http://help.madshi.net/MESettings.htm#IMEAttachments
Re: Custom file adding to attachments
Can I do same using IDE wizard?
Re: Custom file adding to attachments
Yes, but only with a fixed file path.
Re: Custom file adding to attachments
It's an exception handler specific to madExcept. The code should be pretty simple, something like this:
Please note that "stDontSync" means that the exception handler will be called in the context of a secondary thread, which means you should not do anything in there that isn't thread safe. Specifically, you shouldn't do VCL stuff in there.
Code: Select all
uses madExcept;
procedure YourExceptionHandler(const exceptIntf: IMEException; var handled: boolean)
begin
exceptIntf.AdditionalAttachments.Add(...); // see documentation
end;
initialization
RegisterExceptionHandler(YourExceptionHandler, stDontSync);
end.