Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass Vfp Object to a DCOM server ?
Message
From
12/08/2000 21:11:10
Eric Barnett
Barnett Solutions Group, Inc
Sonoma, California, United States
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00399459
Message ID:
00404316
Views:
13
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform