Information générale
Catégorie:
COM/DCOM et OLE Automation
>>I'm having a little trouble understanding how VFP8 implements OLE automation. I'm kind of new to the subject itself, so forgive me if my question seems a bit stupid.<<
You need to define your class as OLEPUBLIC and then use createobject to create an instance:
DEFINE CLASS OleTest AS custom OLEPUBLIC
FUNCTION HelloWorld
RETURN "Hello World it is now "+TTOC(DATETIME())
ENDFUNC
ENDDEFINE
If you compiled this in an EXE calles vfptest you could then do
oMyOleServer=CREATEOBJECT("vfptest.oletest")
?oMyOleSever.HelloWorld()
Gary.
Précédent
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