Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pass Vfp Object to a DCOM server ?
Message
De
12/08/2000 21:11:10
Eric Barnett
Barnett Solutions Group, Inc
Sonoma, Californie, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00399459
Message ID:
00404316
Vues:
16
That's a neat solution, but also requires get/set methods. I guess I should have been more specific with my answer: you can't access properties created with AddProperty directly via COM, you must provide an interface to them.

>Actually you can use AddProperty all you want. You just have to provide a means of accessing the new property across the COM barrier. Add the following two methods to your class:
>procedure GetProp
>lparameter tcPEM
>if pemstatus(THIS,tcPEM,5) and upper(pemstatus(THIS,tcPEM,3)) = "PROPERTY" then
>   return eval("THIS."+tcPEM)
>else
>   return .NULL.
>endif
>endproc
>
>procedure SetProp
>lparameter tcPEM, tuValue
>if pemstatus(THIS,tcPEM,5) and upper(pemstatus(THIS,tcPEM,3)) = "PROPERTY" then
>   THIS.&tcPEM = tuValue
>   return .T.
>else
>   return .NULL.
>endif
>endproc
>The properties are there as part of the object but the interface is not published (neither via the VTable - early binding nor via IDispatch - late binding).
>
>The wrapper functions allow VFP to sort through its internal name table and get/set the property values.
Eric Shaneson
Cutting Edge Consulting
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform