Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass params by reference
Message
From
18/07/2003 17:30:42
 
 
To
18/07/2003 12:12:18
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00811522
Message ID:
00811699
Views:
16
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform