Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is AddProperty() allowed in COM implementation
Message
De
22/08/2003 12:23:15
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Is AddProperty() allowed in COM implementation
Divers
Thread ID:
00822651
Message ID:
00822651
Vues:
41
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform