We had a similar customer issue with VFP8. We added a extra "Closer" method to the .Net object, and the new method contained calls to GC.Collect() and GC.WaitForPendingFinalizers(). We then called this Closer method in the VS.Net object, after unbinding from it, on the VFP side. This prevented the crash in the customer's application.
>I am getting a dreaded C000005 at address 79221bd8 after running a simple vfp exe that opens a simple .net form and responds to an simple event. The event is being handled fine by VFP, but upon exit the windows error is displayed. What is strange is that when this simple app runs in the VFP IDE it works just fine. No errors. Running it standalone produces the error.
>
>Does anyone here have some experience/sample code in responding to a vb.net dll's events in a VFP executable? I would sure appreciate some help here. Again the code is working just fine; .net dll is being created and .net form is running in new thread, I am implementing an eventhandler in VFP correctly since the event fired by the .net form is being responded to by VFP. It just blows when exiting back to Win XP.
>
>Thanks.
>SJT
Jim Saunders
Microsoft
This posting is provided “AS IS”, with no warranties, and confers no rights.