Home Devices

AV after printing in 64bit virtual machine

edited September 2010 in Devices
Hello,

I create reports for print with the classname like in the examples..


lFormClass := TFormClass(GetClass(cClassName));
lForm := lFormClass.Create(Application);
lReport := TrbReportForm(lForm).Report;
..

then I send them to printer:

lReport.Print;

then I destroy the class:

FreeAndNil(lForm);

Now I would like to send to the MAPI Client with ..

lReport.EmailSettings.PreviewInEmailClient := True;
lReport.SendMail;
...

Now I ran into the problem with 64bit 2008 Server (virtual machine)
when I put the E-mail to Tobit...

I get an AV when destroying the "lForm" after printing..

I googled around and found at the outlook bugs that it would be a
quick&dirty idea to send a "Postmessage(Handle,WM_CLOSE,0,0)".. or
include a OnClose Event.

Indeed, it's working on the 64bit virtual machines..
Even, it would be possible to terminate the process by the windows api
directly with an terminateprocess.. ...
But I have no idea, why?

Maybe it's an api-Level counter blocked thread.. or just anything else
what I can't see.

Any idea is welcome.. at the moment I really have no idea how to fix
the problem without quick&dirty...

ralf

Comments

This discussion has been closed.