Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with OLE Automation
Message
From
05/04/2004 11:36:53
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00892291
Message ID:
00892303
Views:
20
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform