Information générale
Catégorie:
Visual FoxPro et .NET
Titre:
Implementing a .net class
Versions des environnements
I have created a simple class in vb.net with 1 event and one procedure. I have compiled this and registered it to COM. I can create this class object easily and use it in VFP7 using the creatobject syntax(CREATEOBJECT("TestFoxClass.TestFunctions"). No problems here. What I cannot seem to do is use this .net class using the following syntax in a VFP7 custom class:
g_oMTIEventHandler = CREATEOBJECT("MSTInterfaceEvent")
DEFINE CLASS MSTInterfaceEvent AS custom OLEPUBLIC
IMPLEMENTS __ShellFunctions IN TestFoxClass.TestFunctions
PROCEDURE __ShellFunctions_ShellClosed() AS VOID
g_MSTShell = ""
ENDPROC
ENDDEFINE
When I try to build the VFP7 app I get an error stating that the type library TestFoxClass.TestFunctions cannot be found. This class looks fine in the VFP object viewer and I can create the same class using VB6 and it works fine. What I'm trying to do here is capture an event from a .net class run by a calling VFP app.
What am I missing here?
Any help would be appreciated.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement