Richtext causes illegal page in kernel32.dll
Hi there,
first of all I am using D5 (with all updates applied) and RB Enterprise
6.01 under W98SE.
I can print reports without RichEdit controls fine and can close my
application without any errors.
If i put a RichEdit or a DBRichedit on the form I still can print the
report but when the application is closed I get consistently the
following error (translated from german): "Application is closed due to
an illegal operation". A click on the Detail button shows: caused an error due to an illegal page in kernel32.dll at ...
If i remove the Richtext everything is fine again!?!?
Any Ideas?
Thanks for every help.
Robert
first of all I am using D5 (with all updates applied) and RB Enterprise
6.01 under W98SE.
I can print reports without RichEdit controls fine and can close my
application without any errors.
If i put a RichEdit or a DBRichedit on the form I still can print the
report but when the application is closed I get consistently the
following error (translated from german): "Application is closed due to
an illegal operation". A click on the Detail button shows: caused an error due to an illegal page in kernel32.dll at ...
If i remove the Richtext everything is fine again!?!?
Any Ideas?
Thanks for every help.
Robert
This discussion has been closed.
Comments
Have not had any other reports of this.
1. Try testing with the RBuilder\Demos\Reports\Demo.dpr project. This
project contains RichText reports - does this application work okay? If
so, then try to compare with what your own program.
2. Try downloading the latest printer driver.
3. Try downloading a newer version of the RichEd20.dll from MS.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
I tried the demo project and it worked fine.
One difference between the demo and my project is that the Demo is an
EXE and my report is a DLL.
Sorry that I did not mention that in my first posting. I also forgot to
say that I use ADO to access the data in a SQL Server 2000 database.
If I convert the DLL to an EXE, the report prints fine and there is no
page fault when I close the application. Converting it back to a DLL
shows the error immediately.
Are there any special things to consider when using Richtexts in a DLL
and accessing a database via ADO?
Thanks in advance.
Robert
"Nard Moseley (Digital Metaphors)" schrieb:
Prior to closing the application try the code below. When using The RB
RichText controls (and TeeChart controls) a parent window is required.
RB creates an invisible parent window that is owned by the Applicaiton.
The code below will free this window. I think this may fix your issue.
uses
ppDrwCmd;
ppParentWndFree;
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
I tried your suggestion but unfortunately without success. I still get
the illegal page error when closing the application.
Debugging showed that the invisible parent window is already nil when
executing the ppParentWndFree procedure.
Any further ideas?
Robert
"Nard Moseley (Digital Metaphors)" schrieb:
finally I got it working.
The reason of the illegal page in the kernel.dll was, that the DLL
printing the report did not receive the proper handle of the calling
executable.
Thanks for your time and thanks for a great product.
Robert