Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is AddProperty() allowed in COM implementation
Message
From
22/08/2003 12:23:15
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Is AddProperty() allowed in COM implementation
Miscellaneous
Thread ID:
00822651
Message ID:
00822651
Views:
40
Hi all,

Is the AddProperty() method allowed in COM implementation? I did not put any validation codes here so let's assume the parameter passed is correct.
COM EXE: ComTest.Exe
define class BizProcs as session olepublic
   processX = null
   procedure NewProperty(processName as string)
      this.AddProperty(processName,createobject(processName))
   endproc
   procedure UseProperty(processName as string)
      this.processX = createobject(processName)
   endproc
enddefine
define class Process1 as session
   procedure RunProcess(cText as string)
     return 'Hello ' + cText
   endproc
endproc

* Implementation:
x=createobject("ComTest.BizProcs")
x.UseProperty("Process1")          && this will work
? x.ProcessX.RunProcess("world")   && this will work
x.NewProperty("Process1")          && this will not work
?x.Process1.RunProcess("world")    && this will not work
x=null
ramil
~~ learning to stand still
Next
Reply
Map
View

Click here to load this message in the networking platform