your case is an example using TMS MemInsight without GUI.
Add the units TMS.MI.Access and TMS.MI.Core to your project
Enable/Disable the MemoryProfiling maybe with an IFDEF DEBUG or IFDEF RELEASE
MemoryProfiler.Active := True | False;
Initialize and activate the ExceptionHandler
ExceptionHandler.Active := True;
Add an ordinary
Application.OnException := DoException;
procedure TForm1.DoException(Sender: TObject; E: Exception);
if Assigned(e) then
Detailled MAP files need to be switched on under "Linker" and the MAP file needs to be accessible. In an upcoming update these can embedded as resource file; currently this is not yet implemented.
Sending this back to your system is up to you as they are so many variations. If you send me a message I can forward you some code I have which might go into TMS MemInsight in one of the next updates.
To solve your last question, you can use GetCurrentName from TMS.MI.Core
procedure TForm1.Button3Click(Sender: TObject);
I hope this answers your question,