Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with OLE Automation
Message
De
05/04/2004 11:36:53
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00892291
Message ID:
00892303
Vues:
19
>>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
Fil
Voir

Click here to load this message in the networking platform