Hi Hilmar
Thanks for responding.
>You have to do some nasty debugging, trying to find out what causes the C...5 error in your specific case, and then find a reasonable workaround.
The history goes like this. I use "Report Manager" (RM) for my reporting purposes. RM provides an ActiveX that I CREATEOBJECT() on the report form in my app. After the required populating, the ActiveX allows the user to preview the report, but when the report is empty for whatever reasons, the ActiveX, I believe does not do the required clean-ups. Then suddenly my app (no special place, when closing the form, when exiting the app) will throw a C5. I have confirmed this that when I can successfully run the report, how many ever times, I don't get the C5.
Is there anyway to wrap this OCX into a DLL which can be called, hopefully having a seperate memory mamangement apart, from my app. This DLL can accept all such parameter passing that I require from the ActiveX. I call it instead of the OCX, populate parameters, ask for a preview, if it does not have any report to display, atleast my app, hopefully, is untouched by a C5?