Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Implementing a .net class
Message
From
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:
01010077
Views:
23
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform