Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Implementing a .net class
Message
 
To
02/05/2005 01:07:22
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01009535
Message ID:
01010276
Views:
20
You might want to try unhooking hte event object before exiting. I have a couple of apps where I do this and I don't have any problems even without that. But then I don't think my code fires on additional threads. I haven't looked closely at it since it just works...

+++ Rick ---

>Rick,
>
>Don't know if you are still reading these or not, but here goes:
>
>I have followed your web example to a 'T', and have noted a few things. Foxpro is responding to the .Net event just fine from what I can see. I can see another thread being created and removed upon exit of the .net form. However, I am still getting the c000005 error when exiting the small foxpro app in both VFP7 and VFP9. Of course everything runs just as expected inside the foxpro IDE. However, as soon as I get outside the IDE and the program runs the eventhandler class, the foxpro exe will error on exit. Here's the fox code for the eventhandler:
>
>oEvents = NEWOBJECT("myclass")
>zz = EVENTHANDLER(frmShell, oEvents)
>RETURN
>
>
>DEFINE CLASS myclass AS session OLEPUBLIC
>
> IMPLEMENTS IJEEvents IN "c:\documents and settings\thompssj\my documents\visual studio projects\testfoxclass2\bin\testfoxclass2.tlb"
>
> PROCEDURE IJEEvents_ShellClosed() AS VOID
> * add user code here
> ENDPROC
>
> PROCEDURE IJEEvents_ButtonClicked() AS VOID
> MESSAGEBOX(".net form button clicked")
> ENDPROC
>
>ENDDEFINE
>
>This is pretty much standard example code right from Help. Again it works fine, the event is triggered, but exiting the foxpro exe in windows causes an error. Tried it on a couple of different machines even.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform