Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pass params by reference
Message
De
18/07/2003 17:30:42
 
 
À
18/07/2003 12:12:18
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00811522
Message ID:
00811699
Vues:
17
This message has been marked as the solution to the initial question of the thread.
Yes it is possible. But you must initialize the variable before passing to the COM

LOCAL vParam
vParam = ""
oServer = CREATEOBJECT("server.Ref")
oServer.GetRef(@vParam)

HTH


>Hi,
>
>Is it possible to pass a parameter by reference to a COM server?
>
>I know that it is possible to use arrays with COMARRAY but for some reason passing simple variable doesn't seem to work. Server receives the paramaters but the variable in client doesn't change its value.
>
>Server side code is like this:
>
>DEFINE CLASS Ref as Custom OLEPUBLIC
>FUNCTION GetRef(taParam as String @) as VOID
> taParam = "10"
>ENDFUNC
>ENDDEFINE
>
>Client side code:
>
>LOCAL vParam
>oServer = CREATEOBJECT("server.Ref")
>oServer.GetRef(@vParam)
>
>
>vParam is false
>
>Thanks!
Herman
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform