General information
Category:
COM/DCOM and 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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only